[mythtv] Channel change time

James Courtier-Dutton james.dutton at gmail.com
Sun Jun 6 21:10:20 UTC 2010

On 6 June 2010 20:50, Janne Grunau <janne-mythtv at grunau.be> wrote:
> On Sun, Jun 06, 2010 at 12:21:02PM +0100, James Courtier-Dutton wrote:
>> I have found out where the 2 second delay is.
>>     MPEGStreamData *streamData = NULL;
>>     if (HasFlags(kFlagWaitingForSignal) && !(streamData =
>> TuningSignalCheck())) {
>>         return;
>>     }
>> So maybe this long channel change time is caused by the
>> "TuningSignalCheck()" function call.
> Does it takes 2000ms for a single function call or 2000ms until
> TuningSignalCheck() returns non-NULL?

It is for a single function call.
I have narrowed it down further.
The new function is:
void SignalMonitor::Stop()

which is called from within TuningSignalCheck()
void SignalMonitor::Stop()
    DBG_SM("Stop", "begin");
        QMutexLocker locker(&startStopLock);
        if (running)
            exit = true;
            pthread_join(monitor_thread, NULL);
    DBG_SM("Stop", "end");

I am not sure why this would take 2000ms to execute yet. I will have
to look at the termination parts of monitor_thread().
I will be doing further analysis another day as it is getting late now.

More information about the mythtv-dev mailing list