how to control libvlc_wait to exit?
Posted: 22 Jun 2011 11:22
hi all,
I had been implement a UI by MFC and the UI use vlc library to stream video. (UI=user interface)
Now I got a problem.
When use press a button of UI.
UI will call a function that name is test_thread.
The source code is below.
The test_thread is work but it will stand at libvlc_wait (vlc).
How i can control the libvlc_wait() to exit ??
I had been implement a UI by MFC and the UI use vlc library to stream video. (UI=user interface)
Now I got a problem.
When use press a button of UI.
UI will call a function that name is test_thread.
The source code is below.
The test_thread is work but it will stand at libvlc_wait (vlc).
How i can control the libvlc_wait() to exit ??
Code: Select all
UINT test_thread( LPVOID Param )
{
//vlc main code
vlc = libvlc_new (set, (const char **)argv);
if (vlc != NULL)
{
libvlc_add_intf (vlc, "globalhotkeys,none");
libvlc_add_intf (vlc, NULL);
libvlc_playlist_play (vlc, -1, 0, NULL);
TRACE("debug 4 \n");
for(int d=0;d<256;d++){
if(argv[d]!=0){
free(argv[d]);
}
}
libvlc_wait (vlc);
libvlc_release (vlc);
}