[mythtv] Using TV from the program guide

Jonathan Abrams jona at calluniversal.com
Fri Jun 18 11:34:35 EDT 2004


Greetings,

I'm trying to add functionality to the Program Guide so that you can watch Live TV directly from the program guide.
I've cut and pasted code from ProgramGuide.cpp into GuideGrid.cpp. However, all that happens when I execute the code from the Program Guide is a black window and a hung program. My TV function in GuideGrid is as follows:

void GuideGrid::Playback(ProgramInfo *rec)
{
    if (!rec)
        return;
 
    TV *tv = new TV();
    tv->Init();

    setEnabled(false);
    //state = kKilling; // stop preview playback and don't restart it

    if (tv->LiveTV(true))
    {
         cerr << "Entering Live TV.\n";
        qApp->unlock();
        while (tv->GetState() != kState_None)
        {
            //qApp->unlock();
            qApp->processEvents();
            usleep(10000);
        }
         qApp->lock();

    }

 cerr << "Exited Live TV.\n";
    //state = kStarting; // restart playback preview
    setEnabled(true);

    update(fullRect);

    delete tv;
 update(fullRect);
    
}

Any tips would be appreciated.

- Jonathan Abrams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20040618/46021f65/attachment.htm


More information about the mythtv-dev mailing list