mirror of
https://github.com/glest/glest-source.git
synced 2025-08-23 00:12:49 +02:00
- removed some invalid event attachments for libvlc
This commit is contained in:
@@ -669,14 +669,31 @@ bool VideoPlayer::initPlayer() {
|
|||||||
//libvlc_event_attach( eventManager, libvlc_MediaPlayerVout, callbacks, ctxPtr );
|
//libvlc_event_attach( eventManager, libvlc_MediaPlayerVout, callbacks, ctxPtr );
|
||||||
|
|
||||||
//libvlc_event_attach( eventManager, libvlc_MediaListPlayerPlayed, callbacks, ctxPtr );
|
//libvlc_event_attach( eventManager, libvlc_MediaListPlayerPlayed, callbacks, ctxPtr );
|
||||||
libvlc_event_attach( eventManager, libvlc_MediaListPlayerNextItemSet, callbacks, ctxPtr );
|
int event_added = libvlc_event_attach( eventManager, libvlc_MediaListPlayerNextItemSet, callbacks, ctxPtr );
|
||||||
|
if(event_added != 0) {
|
||||||
|
printf("ERROR CANNOT ADD EVENT [libvlc_MediaListPlayerNextItemSet]\n");
|
||||||
|
}
|
||||||
//libvlc_event_attach( eventManager, libvlc_MediaListPlayerStopped, callbacks, ctxPtr );
|
//libvlc_event_attach( eventManager, libvlc_MediaListPlayerStopped, callbacks, ctxPtr );
|
||||||
|
|
||||||
libvlc_event_attach( eventManager, libvlc_VlmMediaInstanceStatusPlaying, callbacks, ctxPtr );
|
// event_added = libvlc_event_attach( eventManager, libvlc_VlmMediaInstanceStatusPlaying, callbacks, ctxPtr );
|
||||||
libvlc_event_attach( eventManager, libvlc_VlmMediaInstanceStatusPause, callbacks, ctxPtr );
|
// if(event_added != 0) {
|
||||||
libvlc_event_attach( eventManager, libvlc_VlmMediaInstanceStatusEnd, callbacks, ctxPtr );
|
// printf("ERROR CANNOT ADD EVENT [libvlc_VlmMediaInstanceStatusPlaying]\n");
|
||||||
libvlc_event_attach( eventManager, libvlc_VlmMediaInstanceStatusError, callbacks, ctxPtr );
|
// }
|
||||||
|
//
|
||||||
|
// event_added = libvlc_event_attach( eventManager, libvlc_VlmMediaInstanceStatusPause, callbacks, ctxPtr );
|
||||||
|
// if(event_added != 0) {
|
||||||
|
// printf("ERROR CANNOT ADD EVENT [libvlc_VlmMediaInstanceStatusPause]\n");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// event_added = libvlc_event_attach( eventManager, libvlc_VlmMediaInstanceStatusEnd, callbacks, ctxPtr );
|
||||||
|
// if(event_added != 0) {
|
||||||
|
// printf("ERROR CANNOT ADD EVENT [libvlc_VlmMediaInstanceStatusEnd]\n");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// event_added = libvlc_event_attach( eventManager, libvlc_VlmMediaInstanceStatusError, callbacks, ctxPtr );
|
||||||
|
// if(event_added != 0) {
|
||||||
|
// printf("ERROR CANNOT ADD EVENT [libvlc_VlmMediaInstanceStatusError]\n");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -773,7 +790,10 @@ bool VideoPlayer::initPlayer() {
|
|||||||
|
|
||||||
successLoadingLib = (play_result == 0);
|
successLoadingLib = (play_result == 0);
|
||||||
|
|
||||||
for(;successLoadingLib == true && ctxPtr->error == false &&
|
time_t waitStart = time(NULL);
|
||||||
|
for(;difftime(time(NULL),waitStart) <= 20 &&
|
||||||
|
successLoadingLib == true &&
|
||||||
|
ctxPtr->error == false &&
|
||||||
ctxPtr->started == false;) {
|
ctxPtr->started == false;) {
|
||||||
SDL_Delay(10);
|
SDL_Delay(10);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user