[mythtv-users] MythTV retuning to channel on channel change when
it's the same channel (Patch incl.)
Joe Votour
joevph at yahoo.com
Sun Aug 24 17:31:01 EDT 2003
Isaac,
New patch enclosed. This one uses the channame_vector
as you mentioned.
BTW, do you have a bug listing or something? At this
point, I can't commit to making modules, but if you
have a bug database or something, I wouldn't mind
perusing it and maybe conributing more fixes.
-- Joe
--- tv_play.cpp.old 2003-08-23 20:48:32.000000000
-0700
+++ tv_play.cpp 2003-08-24 16:22:52.000000000 -0700
@@ -1725,6 +1725,20 @@
{
bool muted = false;
+ // If this is the first time we're changing
channels, then don't check
+ // the channel vector, since it's empty. We'll
just change it.
+ if (!channame_vector.isEmpty())
+ {
+ // The channel vector contains at least one
channel - the last
+ // element of it is a QString (same as the
parameter passed in here),
+ // so we just compare the two. If they're
the same, exit from this
+ // function.
+ if (channame_vector.last() == name)
+ {
+ return;
+ }
+ }
+
if (!activerecorder->CheckChannel(name))
return;
--- Isaac Richards <ijr at po.cwru.edu> wrote:
> On Sunday 24 August 2003 12:08 am, Joe Votour wrote:
> > Here's a patch that prevents MythTV from changing
> > itself to the same channel. If you think it's
> worthy,
> > then please do add it. The only negative effect I
> can
> > think of is if the TV::GetChannelInfo code takes a
> lot
> > of time to execute (since it does appear to do a
> > query).
>
> Why not just compare against the top item in the
> 'channame_vector', which will
> be the currently tuned channel instead of asking the
> backend again for that
> information?
>
> Isaac
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
>
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
More information about the mythtv-users
mailing list