[mythtv] [patch] two small fixes #2
mian
mythtv at mian.net.au
Wed Mar 17 06:10:59 EST 2004
> dvbchannel fix ensures the chanid being retrieved for the specified
> channel belongs to a DVB source, this fixes the case where you have two
> channel numbers the same, one on V4L and one on DVB and if the V4L one was
> first in the database it would be retrieved instead.
>
this one also ensures the channel being retrieved belongs to the DVB card
we are currently recording on via our parent aswell fixing the case where
there may be 2 DVB cards with the same channel number on different
networks so only checking type would not strict enough, (eg; Foxtel
Cartoon Network on DVB-S and SBS FTA on DVB-T both having a channel 28).
-------------- next part --------------
Index: libs/libmythtv/tv_rec.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/tv_rec.h,v
retrieving revision 1.52
diff -u -r1.52 tv_rec.h
--- libs/libmythtv/tv_rec.h 10 Feb 2004 22:08:31 -0000 1.52
+++ libs/libmythtv/tv_rec.h 17 Mar 2004 11:03:23 -0000
@@ -91,6 +91,7 @@
bool IsBusy(void);
bool IsReallyRecording(void);
+ int GetCaptureCardNum(void) { return m_capturecardnum; }
float GetFramerate(void);
long long GetFramesWritten(void);
long long GetFilePosition(void);
Index: libs/libmythtv/dvbchannel.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/dvbchannel.cpp,v
retrieving revision 1.21
diff -u -r1.21 dvbchannel.cpp
--- libs/libmythtv/dvbchannel.cpp 13 Mar 2004 08:57:21 -0000 1.21
+++ libs/libmythtv/dvbchannel.cpp 17 Mar 2004 11:03:24 -0000
@@ -219,8 +219,10 @@
pthread_mutex_lock(db_lock);
MythContext::KickDatabase(db_conn);
- thequery = QString("SELECT chanid FROM channel WHERE channum='%1'")
- .arg(channum);
+ thequery = QString("SELECT channel.chanid FROM channel,cardinput,capturecard WHERE channel.channum = '%1' AND "
+ "cardinput.sourceid = channel.sourceid AND cardinput.cardid = '%2' AND "
+ "capturecard.cardid = cardinput.cardid AND capturecard.cardtype = 'DVB'")
+ .arg(channum).arg(pParent->GetCaptureCardNum());
query = db_conn->exec(thequery);
if (!query.isActive())
More information about the mythtv-dev
mailing list