[mythtv] Using TV from the program guide

Kevin Kuphal kuphal at dls.net
Sun Jun 20 21:14:53 EDT 2004


Steven Cruysberghs wrote:

> 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
>>
>>I think you should try pressing the M button while watching live tv
>>before you continue.
>>
>>    
>>
This only works from the program guide as viewed from after watching 
TV.  It does not work when viewing the guide from the scheduleing menu.  
I had submitted a patch a while back that added an option to allow you 
to jump right to the guide when entering "Watch TV" so that you could 
just then parse the guide and hit M to go into TV assuming that most 
people just do that anyways since the chances are you're not going to 
just watch whatever the default or last channel tuned was.  Try looking 
back through the archives to see what was submitted.  As I recall it 
didn't get applied but it's out there against the pre-0.15 code.

Kevin


More information about the mythtv-dev mailing list