Ticket #2019: eventloop_thread_condition.patch
File eventloop_thread_condition.patch, 1.3 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/tv_play.h
567 567 /// runs pipnvp's NuppelVideoPlayer::StartPlaying(). 568 568 pthread_t pipdecode; 569 569 570 /// Condition to signal that the Event thread is up and running 571 QWaitCondition mainLoopCond; 572 QMutex mainLoopCondLock; 573 570 574 // Constants 571 575 static const int kInitFFRWSpeed; ///< 1x, default to normal speed 572 576 static const int kMuteTimeout; ///< Channel changing mute timeout in msec -
libs/libmythtv/tv_play.cpp
484 484 qApp->processEvents(); 485 485 } 486 486 487 mainLoopCondLock.lock(); 487 488 pthread_create(&event, NULL, EventThread, this); 489 mainLoopCond.wait(&mainLoopCondLock); 490 mainLoopCondLock.unlock(); 488 491 489 while (!runMainLoop && !IsErrored())490 usleep(50);491 492 492 return !IsErrored(); 493 493 } 494 494 … … 1503 1503 runMainLoop = true; 1504 1504 exitPlayer = false; 1505 1505 1506 mainLoopCondLock.lock(); 1507 mainLoopCond.wakeAll(); 1508 mainLoopCondLock.unlock(); 1509 1506 1510 while (runMainLoop) 1507 1511 { 1508 1512 stateLock.lock();