Ticket #4376: ticket_4376_causing_embedded_playbackbox_to_hang.diff
| File ticket_4376_causing_embedded_playbackbox_to_hang.diff, 2.7 KB (added by , 18 years ago) |
|---|
-
libs/libmythtv/tv_play.h
215 215 static void InitKeys(void); 216 216 static bool StartTV(ProgramInfo *tvrec = NULL, bool startInGuide = false, 217 217 bool inPlaylist = false, bool initByNetworkCommand = false); 218 static void Set EmbedPbbFunc(RUNPLAYBACKBOX lptr);218 static void SetFuncPtr(const char *, void *); 219 219 220 220 void SetIgnoreKeys(bool ignore) { ignoreKeys = ignore; } 221 221 … … 238 238 239 239 protected: 240 240 void doEditSchedule(int editType = kScheduleProgramGuide); 241 static void *RecordedShowMenuHandler(void *param); 242 241 243 void RunTV(void); 242 244 static void *EventThread(void *param); 243 245 void SetMuteTimer(int timeout); -
libs/libmythtv/tv_play.cpp
252 252 253 253 return playCompleted; 254 254 } 255 256 void TV::SetEmbedPbbFunc(RUNPLAYBACKBOX lptr) 255 256 /** 257 * \brief Import pointers to functions used to embed the TV 258 * window into other containers e.g. playbackbox 259 */ 260 void TV::SetFuncPtr(const char *string, void *lptr) 257 261 { 258 RunPlaybackBoxPtr = lptr; 262 QString name = QString(string); 263 if (name == "playbackbox") 264 RunPlaybackBoxPtr = (RUNPLAYBACKBOX)lptr; 259 265 } 260 266 261 267 void TV::InitKeys(void) … … 5669 5675 nvp->DrawUnusedRects(sync); 5670 5676 } 5671 5677 5678 void *TV::RecordedShowMenuHandler(void *param) 5679 { 5680 TV *obj = (TV *)param; 5681 obj->doEditSchedule(kPlaybackBox); 5682 5683 return NULL; 5684 } 5685 5672 5686 void TV::doEditSchedule(int editType) 5673 5687 { 5674 5688 if (!playbackinfo) … … 5827 5841 5828 5842 void TV::EditSchedule(int editType) 5829 5843 { 5844 if (editType == kPlaybackBox && menurunning != true) 5845 { 5846 menurunning = true; 5847 pthread_t tid; 5848 pthread_attr_t attr; 5849 pthread_attr_init(&attr); 5850 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); 5851 5852 pthread_create(&tid, &attr, TV::RecordedShowMenuHandler, this); 5853 pthread_attr_destroy(&attr); 5854 5855 return; 5856 } 5857 5830 5858 // post the request to the main UI thread 5831 5859 // it will be caught in eventFilter and processed as CustomEvent 5832 5860 // this will create the program guide window (widget) -
programs/mythfrontend/main.cpp
801 801 802 802 TV::InitKeys(); 803 803 804 TV::Set EmbedPbbFunc(PlaybackBox::RunPlaybackBox);804 TV::SetFuncPtr("playbackbox", (void *)PlaybackBox::RunPlaybackBox); 805 805 } 806 806 807 807
