[mythtv] "The fallacy that is: spawning a decoder thread will
always result in playing" or "Hurry up and wait"
awithers at anduin.com
Thu Aug 7 17:35:46 EDT 2003
I'm not including a patch. My quick attempt at fixing the problem caused
another. I'm hoping that someone more familiar with the code will see a
better solution than what didn't work for me.
Intro done, on to the problem: When a decoder thread is spawned (tv_play.cpp
SpawnDecoder) it is assumed that at some point the decoder thread will start
pthread_create(&decode, NULL, SpawnDecode, nvp);
Normally this is true... unless NuppelVideoPlayer::StartPlaying can't open
if (OpenFile() < 0)
The file open check happens a full 20 lines or so before setting:
playing = true;
and with the IsPlaying() function doing nothing more than returning
'playing', well you see the problem.
PlaybackBox seems to work around this by introducing a timeout waiting for
the decoder thread to start playing. I don't know if that is the right
solution, it wasn't the one I tried.
More information about the mythtv-dev