On Thu, 2005-02-17 at 18:45 +0000, Dave Smith wrote:
> I've managed to record DVB Radio in 0.17.
>
> By setting myth to record TS rather than PS's, and setting it NOT to wait
> for "SEQ" start header, myth will happily record a transport stream of the
> radio station audio. The slight downside is that the TS recordings for
> everything else is a bit bigger than the PS recording.
>
As far as I can tell myth can't play them back though ?
> You'll have to manually add the radio channels to your DB, entering the
> required mplexid, and serviceid numbers, which you can get from 'scan'
> from the linuxtv-dvb-apps (to get you started, BBC Radio 4 is 14528 on
> DTT). The radio schedules don't appear to be carried in the over-the-air
> DVB schedules, so you'll have to get those from a listings grabber of your
> choice.
>
The attached patch will :
Allow you to scan for radio services
Activate the inbuilt DVB grabber for said radio stations.
Now we just need the player fixed :)
> Hope this helps.
>
Likewise
--
John
>
> On Thu, 17 Feb 2005, Nick Craig-Wood wrote:
>
> > On Thu, Feb 17, 2005 at 11:04:41PM +1100, Hamish Moffatt wrote:
> > > On Wed, Feb 16, 2005 at 01:44:58AM +0100, Mattia Martinello wrote:
> > > > Is there a way to listen for DVB Radio on Mythtv?
> > >
> > > Nope!
> >
> > :-(
> >
> > > You could do it in 0.16 I think if you used the video PID for a
> > > different channel on the same multiplex.
> >
> > That is how I have it set up at the moment.
> >
> > > But not in 0.17, which works out pids for itself. It specifically
> > > ignores non-television channels.
> >
> > That is very annoying! How will I record stuff off Radio 4 now?
> >
> > Can you add in channels manually afterwards?
> >
Index: dbcheck.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/dbcheck.cpp,v
retrieving revision 1.85
diff -u -r1.85 dbcheck.cpp
--- dbcheck.cpp 9 Feb 2005 21:35:13 -0000 1.85
+++ dbcheck.cpp 17 Feb 2005 22:29:33 -0000
@@ -9,7 +9,7 @@
#include "mythcontext.h"
#include "mythdbcon.h"
-const QString currentDatabaseVersion = "1071";
+const QString currentDatabaseVersion = "1072";
static bool UpdateDBVersionNumber(const QString &newnumber);
static bool performActualUpdate(const QString updates[], QString version,
@@ -1398,6 +1398,15 @@
if (!performActualUpdate(updates, "1071", dbver))
return false;
}
+ if (dbver == "1071")
+ {
+ const QString updates[] = {
+"ALTER TABLE cardinput ADD COLUMN radioservices TINYINT(1) DEFAULT 1;",
+""
+};
+ if (!performActualUpdate(updates, "1072", dbver))
+ return false;
+ }
return true;
}
Index: dvbchannel.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/dvbchannel.cpp,v
retrieving revision 1.31
diff -u -r1.31 dvbchannel.cpp
--- dvbchannel.cpp 6 Feb 2005 18:15:30 -0000 1.31
+++ dvbchannel.cpp 17 Feb 2005 22:29:34 -0000
@@ -247,7 +247,7 @@
GENERAL(QString("Successfully tuned to channel %1.").arg(chan));
- if (!chan_opts.pmt.OnAir())
+ if (!chan_opts.pmt.OnAir() && !chan_opts.pmt.RadioService())
{
ERROR(QString("Channel #%1 is off air.").arg(chan));
return false;
Index: scanwizard.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/scanwizard.cpp,v
retrieving revision 1.3
diff -u -r1.3 scanwizard.cpp
--- scanwizard.cpp 6 Feb 2005 18:15:30 -0000 1.3
+++ scanwizard.cpp 17 Feb 2005 22:29:36 -0000
@@ -967,7 +967,8 @@
scanner = new SIScan(dvbchannel,db,&db_lock,parent->videoSource());
scanner->SetForceUpdate(true);
- QString thequery = QString("SELECT freetoaironly FROM cardinput "
+ QString thequery = QString("SELECT freetoaironly,radioservices FROM "
+ "cardinput "
"WHERE cardinput.cardid=%1 AND "
"cardinput.sourceid=%2")
.arg(parent->captureCard())
@@ -976,13 +977,16 @@
pthread_mutex_lock(&db_lock);
QSqlQuery query = db->exec(thequery);
bool freetoair = true;
+ bool radio = true;
if (query.isActive() && query.numRowsAffected() > 0)
{
query.next();
freetoair=query.value(0).toBool();
+ radio=query.value(1).toBool();
}
pthread_mutex_unlock(&db_lock);
scanner->SetFTAOnly(freetoair);
+ scanner->SetRadioServices(radio);
connect(scanner,SIGNAL(ServiceScanComplete(void)),
this,SLOT(scanComplete(void)));
Index: siparser.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/siparser.cpp,v
retrieving revision 1.6
diff -u -r1.6 siparser.cpp
--- siparser.cpp 15 Feb 2005 16:33:08 -0000 1.6
+++ siparser.cpp 17 Feb 2005 22:29:38 -0000
@@ -1149,7 +1149,8 @@
bool eit_requested = false;
#ifdef USING_DVB_EIT
- if ((s.EITPresent) && (s.ServiceType == 1) && ((!PrivateTypes.GuideOnSingleTransport) ||
+ if ((s.EITPresent) && ((s.ServiceType==1) || (s.ServiceType==2)) &&
+ ((!PrivateTypes.GuideOnSingleTransport) ||
((PrivateTypes.GuideOnSingleTransport) &&
(PrivateTypes.GuideTransportID == PrivateTypes.CurrentTransportID))))
{
Index: siscan.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/siscan.cpp,v
retrieving revision 1.6
diff -u -r1.6 siscan.cpp
--- siscan.cpp 9 Feb 2005 21:35:13 -0000 1.6
+++ siscan.cpp 17 Feb 2005 22:29:40 -0000
@@ -31,6 +31,7 @@
ScanTimeout = 0; /* Set scan timeout off by default */
FTAOnly = false;
+ RadioServices = false;
forceUpdate = false;
pthread_mutex_init(&events_lock, NULL);
@@ -158,6 +159,7 @@
if (fAll)
emit ServiceScanComplete();
*/
+ emit PctServiceScanComplete(((transportsToScan-transportsCount)*100)/transportsToScan);
sourceIDTransportTuned = false;
}
else
@@ -183,12 +185,6 @@
if (scanMode == TRANSPORT_LIST)
{
- if (transportsCount == 0)
- {
- emit PctServiceScanComplete(100);
- emit ServiceScanComplete();
- scanMode = IDLE;
- }
if ((!sourceIDTransportTuned) || ((ScanTimeout > 0) && (timer.elapsed() > ScanTimeout)))
{
QValueList<TransportScanList>::Iterator i;
@@ -203,8 +199,9 @@
emit ServiceScanUpdateText((*i).FriendlyName);
SISCAN(QString("Tuning to mplexid %1").arg((*i).mplexid));
transportsCount--;
- emit PctServiceScanComplete(((transportsToScan-transportsCount-1)*100)/transportsToScan);
-
+ if (transportsCount == 0)
+ scanMode = IDLE;
+
bool result = false;
if ((*i).mplexid == -1)
{
@@ -216,9 +213,13 @@
}
else
result = chan->SetTransportByInt((*i).mplexid);
-
+
if (!result)
+ {
+ int pct = ((transportsToScan-transportsCount)*100)/transportsToScan;
+ emit PctServiceScanComplete(pct);
emit ServiceScanUpdateText("Failed to tune");
+ }
else
{
if ((*i).mplexid == -1)
@@ -475,7 +476,7 @@
// Get the freetoaironly field from cardinput
- QString FTAQuery = QString("SELECT freetoaironly from cardinput,dtv_multiplex, "
+ QString FTAQuery = QString("SELECT freetoaironly,radioservices from cardinput,dtv_multiplex, "
"capturecard WHERE "
"cardinput.sourceid = dtv_multiplex.sourceid AND "
"cardinput.cardid = capturecard.cardid AND "
@@ -492,7 +493,8 @@
if (query.numRowsAffected() > 0)
{
query.next();
- FTAOnly = query.value(0).toInt();
+ FTAOnly = query.value(0).toBool();
+ RadioServices = query.value(1).toBool();
}
else
{
@@ -504,7 +506,7 @@
for (s = SDT.begin() ; s != SDT.end() ; ++s )
{
// Its a TV Service so add it also only do FTA
- if(((*s).ServiceType == 1) &&
+ if((((*s).ServiceType==1) || ((*s).ServiceType==2) && RadioServices) &&
(!FTAOnly || (FTAOnly && ((*s).CAStatus == 0))))
{
// See if transport already in database based on serviceid,networkid and transportid
Index: siscan.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/siscan.h,v
retrieving revision 1.2
diff -u -r1.2 siscan.h
--- siscan.h 6 Feb 2005 18:15:30 -0000 1.2
+++ siscan.h 17 Feb 2005 22:29:40 -0000
@@ -62,6 +62,7 @@
void SetSourceID(int _SourceID);
void SetFTAOnly(bool _fFTAOnly) { FTAOnly = _fFTAOnly;}
+ void SetRadioServices(bool _fRadio) { RadioServices = _fRadio;}
void SetForceUpdate(bool _force) { forceUpdate = _force;}
void SetScanTimeout(int _timeout) { ScanTimeout = _timeout;}
@@ -116,6 +117,7 @@
bool threadExit;
bool FTAOnly;
+ bool RadioServices;
bool forceUpdate;
int ScanTimeout;
SCANMODE scanMode;
Index: sitypes.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/sitypes.h,v
retrieving revision 1.3
diff -u -r1.3 sitypes.h
--- sitypes.h 31 Jan 2005 05:49:56 -0000 1.3
+++ sitypes.h 17 Feb 2005 22:29:40 -0000
@@ -406,6 +406,7 @@
PMTObject() { Reset(); }
void Reset();
+ bool RadioService() { return hasAudio; }
bool TelevisionService() { return hasVideo && hasAudio; }
bool OnAir() { return TelevisionService(); }
bool FTA() { return !hasCA; }
Index: videosource.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/videosource.cpp,v
retrieving revision 1.66
diff -u -r1.66 videosource.cpp
--- videosource.cpp 11 Feb 2005 19:06:14 -0000 1.66
+++ videosource.cpp 17 Feb 2005 22:29:43 -0000
@@ -1189,6 +1189,17 @@
};
};
+class RadioServices: public CheckBoxSetting, public CISetting {
+public:
+ RadioServices(const CardInput& parent):
+ CISetting(parent, "radioservices")
+ {
+ setValue(true);
+ setLabel(QObject::tr("Radio channels."));
+ setHelpText(QObject::tr("If set, radio channel will also be included."));
+ };
+};
+
class ExternalChannelCommand: public LineEditSetting, public CISetting {
public:
ExternalChannelCommand(const CardInput& parent):
@@ -1285,6 +1296,7 @@
group->addChild(lnblofhi = new LNBLofHi(*this));
group->addChild(lnbloflo = new LNBLofLo(*this));
group->addChild(new FreeToAir(*this));
+ group->addChild(new RadioServices(*this));
}
#endif
addChild(group);
_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users