[mythtv-users] Flag to allow channel change script to know whether you're watching Live TV?

Michael PARKER michael.parker at st.com
Mon Jan 17 11:46:22 UTC 2011


> -----Original Message-----
> From: mythtv-users-bounces at mythtv.org [mailto:mythtv-users-bounces at mythtv.org] On Behalf Of
> Mike Perkins
> Sent: 14 January 2011 17:44
> To: Discussion about MythTV
> Subject: Re: [mythtv-users] Flag to allow channel change script to know whether you're
> watching Live TV?
> 
> On 14/01/11 16:26, Ronald Frazier wrote:
> > On Fri, Jan 14, 2011 at 11:03 AM, Mike Perkins
> > <mikep at randomtraveller.org.uk>  wrote:
> >
> >> ...and in case anyone suggests it, sending 'TV' when there's no menu or OSD
> >> on the screen will display the OSD. Yes, this damn button, as well as being
> >> a sure-fire means of escaping out of any menu, is also a toggle button :(
> >
> > So, pressing TV would get you to one of two possible states. Is there
> > any other key that can safely exit you out of that particular OSD
> > without any side effects? If so, than as a fallback option, you could
> > send the TV signal to exit out of anything else, and then a second key
> > just in case the TV key actually opened an OSD. Not elegant, but if
> > nothing else works it would be a fallback option.
> >
> That's the whole point, there isn't. 'TV' when used on it's own toggles the "Now
> and Next" OSD on and off... I haven't found any reliable way of returning a
> Virgin box to a known state. Every single button is a toggle.
> 
> Thinking about it, there might be one possible way, but it may depend on exactly
> which box you have.
> 
> If the box is displaying the OSD and you press "Up channel" or "Down channel"
> the channel will change*... and the OSD gets converted into the standard one
> that gets displayed when the channel is changed, which means it will disappear
> after the preset number of seconds.
> 
> May be worth some experimentation. It won't help if you have the guide up
> though, you'll still get the channel displayed in a PiP window as per OP.
> 
> *Of course, if you change channel this way you may land on one you're not paying
> for, which will result in a modal dialog box you can only clear with the OK
> button...
> 
> --
> 
> Mike Perkins
> 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

I took the view that rather than trying to figure out some universal combination of button presses that would always get me back to the TV screen, I was better to write a small Perl script to grab a frame of video, compare various bits of it with known reference images and determine exactly what was going on on the STB before issuing the "correct" button presses to my Red-Eye Serial IR blaster to get me back to the TV screen.

The problem is that the process takes a few seconds to complete and I don't want to use it on the few occasions I'm watching TV through Myth - the delay in changing channels would be obtrusive and I'd get flak from the wife :o( To limit it's use to only when Myth is performing a scheduled recording means knowing when Myth is or is not in Live TV "mode". Hence my original question - is there an easy way for my Perl script to determine whether Myth is in Live TV mode (other than, I suspect, parsing the end of the backend log)?

Mike


More information about the mythtv-users mailing list