[mythtv] Unable to change channels

Matthew Burnham mythtv-dev@snowman.net
Mon, 30 Dec 2002 17:32:22 -0000


This one's been bugging me since I started playing with MythTV, but
being as I didn't get a watchable picture anyway, I didn't pursue it
far. I've now got a reasonable picture by running in a window rather
than fullscreen (it doesn't jump and stutter now), but am unable to
change channel or card input - any presses of up, down or 'c' seem to
'lock up' mythtv.

I tried to trace the problem by seeing what happens when I try to change
channel, and it seems it gets stuck in:
  while (!activenvp->GetPause())

I'm planning to take a look inside GetPause(), but wondered if anyone
else had come across this problem before? Also, what unit is
usleep(300000) in? It seems awfully big, unless its microseconds...

-- log with tv_play.cpp modified as below --

mbb@danew:~/cvs/MC$ mythtv
connecting to backend server: localhost:6543
Changing from None to WatchingLiveTV
player: Can't open audio device: /dev/dsp
open audio:: Device or resource busy
Over/underscanning. V: 0.000000, H: 0.000000, XOff: 0, YOff: 0
Using XV port 46
TV::ChangeChannel
activenvp:1087791112 paused:1
activenvp->Pause()
mythtv: Fatal IO error: client killed

-- end log --

-- tv_play.cpp modified ChangeChannel function --

void TV::ChangeChannel(bool up)
{
    printf("TV::ChangeChannel\n");
    printf("activenvp:%i paused:%i\n", activenvp, paused);
    if (activenvp == nvp)
    {
        if (paused)
            osd->EndPause();
        paused = false;
    }

    printf("activenvp->Pause()\n");
    activenvp->Pause();
    while (!activenvp->GetPause())
        usleep(5);
    printf("got pause\n");

    printf("activerecorder/rbuffer...\n");
    activerecorder->Pause();
    activerbuffer->Reset();
    activerecorder->ChangeChannel(up);
    printf("done\n");

    activenvp->ResetPlaying();
    while (!activenvp->ResetYet())
        usleep(5);

    printf("sleep(300000)...\n");
    usleep(300000);
    printf("done\n");

    if (activenvp == nvp)
        UpdateOSD();

    activenvp->Unpause();

    channelqueued = false;
    channelKeys[0] = channelKeys[1] = channelKeys[2] = ' ';
    channelkeysstored = 0;
    printf("TV::ChangeChannel end\n");
}

-- end log --

-- 
Mat Burnham