Index: configure =================================================================== --- configure (revision 6975) +++ configure (working copy) @@ -47,6 +47,7 @@ lirc="yes" joystick_menu="yes" firewire_cable_box="yes" +dbox2_dvb_box="yes" x11="yes" xrandr="yes" xv="yes" @@ -163,6 +164,7 @@ echo " --disable-lirc disable lirc support (Infrared Remotes)" echo " --disable-joystick-menu disable joystick menu" echo " --disable-firewire disable support for FireWire cable boxes" +echo " --disable-dbox2 disable support for Nokia DBOX2 DVB boxes (or compatibles)" echo " --disable-v4l disable Video4Linux support" echo " --disable-ivtv disable ivtv support (PVR-x50) req. v4l support" #echo " --enable-ivtv-sys-header use ivtv system headers instead of myth headers" @@ -724,6 +726,10 @@ ;; --disable-firewire) firewire_cable_box="no" ;; + --enable-dbox2) dbox2_dvb_box="yes" + ;; + --disable-dbox2) dbox2_dvb_box="no" + ;; --enable-dvb) dvb="yes" ;; --disable-dvb) dvb="no" @@ -2540,6 +2546,11 @@ echo "CONFIG_FIREWIRE_LIBS=-lraw1394 -liec61883 -lavc1394" >> $MYTH_CONFIG_MAK fi +if test x"$dbox2_dvb_box" = x"yes" ; then + CCONFIG="$CCONFIG using_dbox2" + CONFIG_DEFINES="$CONFIG_DEFINES USING_DBOX2" +fi + if test x"$lirc" = x"yes" ; then CCONFIG="$CCONFIG using_lirc" echo "CONFIG_LIRC_LIBS=-llirc_client" >> $MYTH_CONFIG_MAK Index: docs/mythtv-HOWTO.sgml =================================================================== --- docs/mythtv-HOWTO.sgml (revision 6975) +++ docs/mythtv-HOWTO.sgml (working copy) @@ -471,6 +471,10 @@ Firewire.

You may use the Firewire output of the DCT6200 or the SA3250. +DBoxII or other devices running Neutrino +

You may use the Ethernet port of an DBoxII or a similar device to capture +MPEG2. Your set top box has to be running the Neutrino GUI. + USB Capture Devices.

The Plextor ConvertX PVR devices are supported through Linux drivers available from growisofs -Z /dev/scd0 -dvd-video DVD +Using the DBoxII within MythTV +

The configuration of the DBoxII for use within MythTV is tricky +(as of May 16 2005), that's why it's covered here. Your DBoxII has to be +running linux and the Neutrino GUI instead of the stock BetaNova firmware. +For further information, please refer to . Additionally, you need to enable the SPTS mode in +Neutrino. +1.) Add a new "Capture Card" in the setup. The "Card type" is "DBOX2 Input", +the other values have to be adjusted according to your setup. +The default values, except for the "DBOX2 host ip", should work fine. +2.) Define a new video source. It doesn't need to be configured, +you just need to define it. MythTV grabs the EPG from the DBoxII. +3.) Connect the DBoxII to the newly defined input source in "input connections". +4.) Since channel scanning is not implemented yet, you need to define channels +in the "Channel Editor". Make sure that you use the same value for +"Channel Name" as on the DBoxII. You can get a list of available +channels from the web interface of Neutrino at http://ip-of-your-box:80/. +Associate the channel with your new video source and repeat when needed. + +You may leave the Setup now and proceed as usual. + Migrating from XMLTV to DataDirect

DataDirect will use different information for your video sources and Index: libs/libmythtv/libmythtv.pro =================================================================== --- libs/libmythtv/libmythtv.pro (revision 6975) +++ libs/libmythtv/libmythtv.pro (working copy) @@ -241,6 +241,10 @@ using_firewire:SOURCES += firewirerecorder.cpp firewirechannel.cpp using_firewire:DEFINES += USING_FIREWIRE + # Support for set top boxes (Nokia DBox2 etc.) + using_dbox2:SOURCES += dbox2recorder.cpp dbox2channel.cpp dbox2epg.cpp + using_dbox2:HEADERS += dbox2recorder.h dbox2channel.h dbox2epg.h + # Support for PVR-150/250/350/500, etc. on Linux using_ivtv:HEADERS += mpegrecorder.h using_ivtv:SOURCES += mpegrecorder.cpp Index: libs/libmythtv/videosource.cpp =================================================================== --- libs/libmythtv/videosource.cpp (revision 6975) +++ libs/libmythtv/videosource.cpp (working copy) @@ -1188,6 +1188,51 @@ CaptureCard& parent; }; +class DBOX2Port: public LineEditSetting, public CCSetting { + public: + DBOX2Port(const CaptureCard& parent): + CCSetting(parent, "dbox2_port") { + setValue("31338"); + setLabel(QObject::tr("DBOX2 Streaming Port")); + setHelpText(QObject::tr("DBOX2 streaming port on your DBOX2.")); + } +}; + +class DBOX2HttpPort: public LineEditSetting, public CCSetting { + public: + DBOX2HttpPort(const CaptureCard& parent): + CCSetting(parent, "dbox2_httpport") { + setValue("80"); + setLabel(QObject::tr("DBOX2 HTTP Port")); + setHelpText(QObject::tr("DBOX2 http port on your DBOX2.")); + } +}; +class DBOX2Host: public LineEditSetting, public CCSetting { + public: + DBOX2Host(const CaptureCard& parent): + CCSetting(parent, "dbox2_host") { + setValue("dbox"); + setLabel(QObject::tr("DBOX2 Host IP")); + setHelpText(QObject::tr("DBOX2 Host IP is the remote device.")); + } +}; + +class DBOX2ConfigurationGroup: public VerticalConfigurationGroup { +public: + DBOX2ConfigurationGroup(CaptureCard& a_parent): + parent(a_parent) { + setUseLabel(false); + addChild(new DBOX2Port(parent)); + addChild(new DBOX2HttpPort(parent)); + addChild(new DBOX2Host(parent)); + }; + private: + CaptureCard& parent; + }; + + + + class V4LConfigurationGroup: public VerticalConfigurationGroup { public: @@ -1273,6 +1318,7 @@ addTarget("HDTV", new pcHDTVConfigurationGroup(parent)); addTarget("MPEG", new MPEGConfigurationGroup(parent)); addTarget("FIREWIRE", new FirewireConfigurationGroup(parent)); + addTarget("DBOX2", new DBOX2ConfigurationGroup(parent)); } void CaptureCardGroup::triggerChanged(const QString& value) @@ -1296,7 +1342,7 @@ { MSqlQuery query(MSqlQuery::InitCon()); query.prepare("SELECT cardtype, videodevice, cardid, " - " firewire_port, firewire_node " + " firewire_port, firewire_node, dbox2_port, dbox2_host, dbox2_httpport " " FROM capturecard WHERE hostname = :HOSTNAME ;"); query.bindValue(":HOSTNAME", gContext->GetHostName()); @@ -1313,6 +1359,13 @@ query.value(4).toString() + "]", query.value(2).toString()); } + else if(query.value(0).toString() == "DBOX2") { + setting->addSelection("[ " + query.value(0).toString() + " " + + "Host IP: " + query.value(6).toString() + ", " + + "Streaming-Port: " + query.value(5).toString() + ", " + + "Http-Port: " + query.value(7).toString() + + "] ", query.value(2).toString()); + } else { setting->addSelection( @@ -1353,6 +1406,7 @@ setting->addSelection(QObject::tr("FireWire Input"), "FIREWIRE"); setting->addSelection(QObject::tr("USB Mpeg-4 Encoder (Plextor ConvertX, etc)"), "GO7007"); + setting->addSelection(QObject::tr("DBOX2 Input"), "DBOX2"); } class CardID: public SelectLabelSetting, public CISetting { @@ -1903,7 +1957,7 @@ MSqlQuery capturecards(MSqlQuery::InitCon()); capturecards.prepare("SELECT cardid, videodevice, cardtype, " - " dvb_diseqc_type, firewire_port, firewire_node " + " dvb_diseqc_type, firewire_port, firewire_node, dbox2_port, dbox2_host, dbox2_httpport " "FROM capturecard " "WHERE hostname = :HOSTNAME"); capturecards.bindValue(":HOSTNAME", gContext->GetHostName()); @@ -1962,6 +2016,29 @@ addSelection(label, index); } } + else if(capturecards.value(2).toString() == "DBOX2") + { + inputs = QStringList("MPEG2TS"); + for (QStringList::iterator i = inputs.begin(); + i != inputs.end(); ++i) + { + CardInput* cardinput = new CardInput(); + cardinput->loadByInput(cardid, *i); + cardinputs.push_back(cardinput); + QString index = QString::number(cardinputs.size()-1); + + QString label; + label = QString("%1 (%2) -> %3") + .arg("[ " + capturecards.value(2).toString() + + "IP: " + capturecards.value(7).toString() + + ", Port: " + capturecards.value(6).toString() + + ", HttpPort: " + capturecards.value(8).toString() + + " ]") + .arg(*i) + .arg(cardinput->getSourceName()); + addSelection(label, index); + } + } else { inputs = VideoDevice::probeInputs(videodevice); Index: libs/libmythtv/dbcheck.cpp =================================================================== --- libs/libmythtv/dbcheck.cpp (revision 6975) +++ libs/libmythtv/dbcheck.cpp (working copy) @@ -10,7 +10,7 @@ #include "mythdbcon.h" /// This is the DB schema version expected by the running MythTV instance. -const QString currentDatabaseVersion = "1089"; +const QString currentDatabaseVersion = "1090"; static bool UpdateDBVersionNumber(const QString &newnumber); static bool performActualUpdate(const QString updates[], QString version, @@ -1977,6 +1977,20 @@ return false; } + if (dbver == "1089") + { + const QString updates[] = { + "INSERT INTO profilegroups SET name = 'DBOX2 Input', cardtype = 'DBOX2', is_default = 1;", + "ALTER TABLE capturecard ADD COLUMN dbox2_port INT UNSIGNED NOT NULL DEFAULT 31338;", + "ALTER TABLE capturecard ADD COLUMN dbox2_httpport INT UNSIGNED NOT NULL DEFAULT 80;", + "ALTER TABLE capturecard ADD COLUMN dbox2_host varchar(32) NULL;", + "" + }; + + if (!performActualUpdate(updates, "1090", dbver)) + return false; + } + // Drop xvmc_buffer_settings at some point // Drop dead DVB tables eventually, too Index: libs/libmythtv/tv_rec.cpp =================================================================== --- libs/libmythtv/tv_rec.cpp (revision 6975) +++ libs/libmythtv/tv_rec.cpp (working copy) @@ -53,6 +53,11 @@ #include "firewirechannel.h" #endif +#ifdef USING_DBOX2 +#include "dbox2recorder.h" +#include "dbox2channel.h" +#endif + const int TVRec::kRequestBufferSize = 256*1000; /** \class TVRec @@ -128,7 +133,7 @@ GetDevices(m_capturecardnum, videodev, vbidev, audiodev, audiosamplerate, inputname, startchannel, cardtype, dvb_options, - firewire_options, skip_btaudio); + firewire_options, dbox2_options, skip_btaudio); if (cardtype == "DVB") { @@ -173,6 +178,23 @@ return false; #endif } + else if (cardtype == "DBOX2") + { +#ifdef USING_DBOX2 + channel = new DBox2Channel(this, &dbox2_options, m_capturecardnum); + channel->Open(); + if (inputname.isEmpty()) + channel->SetChannelByString(startchannel); + else + channel->SwitchToInput(inputname, startchannel); +#else + VERBOSE(VB_IMPORTANT, "ERROR: DBOX2 Input configured, " + "but no DBOX2 support compiled in!"); + VERBOSE(VB_IMPORTANT, "Remove the card from configuration, " + "or recompile MythTV."); + exit(-20); +#endif + } else if ((cardtype == "MPEG") && (videodev.lower().left(5) == "file:")) { // No need to initialize channel.. @@ -834,6 +856,23 @@ errored = true; #endif } + else if (cardtype == "DBOX2") + { +#ifdef USING_DBOX2 + VERBOSE(VB_GENERAL,QString("TVRec::SetupRecorder() Initializing DBOX2 on Host: %1, Streaming-Port: %2, Http-Port: %3") + .arg(dbox2_options.host) + .arg(dbox2_options.port) + .arg(dbox2_options.httpport)); + recorder = new DBox2Recorder(dynamic_cast(channel), m_capturecardnum); + recorder->SetRingBuffer(rbuffer); + recorder->SetOptionsFromProfile(&profile, videodev, audiodev, vbidev, ispip); + recorder->SetOption("port", dbox2_options.port); + recorder->SetOption("host", dbox2_options.host); + recorder->SetOption("httpport", dbox2_options.httpport); + recorder->Initialize(); +#endif + return; + } else if (cardtype == "DVB") { #ifdef USING_DVB @@ -1307,7 +1346,7 @@ void TVRec::GetDevices(int cardnum, QString &video, QString &vbi, QString &audio, int &rate, QString &defaultinput, QString &startchan, QString &type, - dvb_options_t &dvb_opts, firewire_options_t &firewire_opts, + dvb_options_t &dvb_opts, firewire_options_t &firewire_opts, dbox2_options_t &dbox2_opts, bool &skip_bt) { video = ""; @@ -1328,7 +1367,7 @@ "dvb_wait_for_seqstart,dvb_dmx_buf_size," "dvb_pkt_buf_size, skipbtaudio, dvb_on_demand," "firewire_port, firewire_node, firewire_speed," - "firewire_model, firewire_connection " + "firewire_model, firewire_connection, dbox2_port, dbox2_host, dbox2_httpport " "FROM capturecard WHERE cardid = :CARDID ;"); query.bindValue(":CARDID", cardnum); @@ -1377,6 +1416,13 @@ if (test != QString::null) firewire_opts.model = QString::fromUtf8(test); firewire_opts.connection = query.value(17).toInt(); + + dbox2_opts.port = query.value(18).toInt(); + dbox2_opts.httpport = query.value(20).toInt(); + test = query.value(19).toString(); + if (test != QString::null) + dbox2_opts.host = QString::fromUtf8(test); + } query.prepare("SELECT if(startchan!='', startchan, '3') " Index: libs/libmythtv/tv_rec.h =================================================================== --- libs/libmythtv/tv_rec.h (revision 6975) +++ libs/libmythtv/tv_rec.h (working copy) @@ -51,6 +51,13 @@ QString model; } firewire_options_t; +typedef struct _dbox2_options_t +{ + int port; + int httpport; + QString host; +} dbox2_options_t; + class TVRec { public: @@ -188,7 +195,8 @@ void GetDevices(int cardnum, QString &video, QString &vbi, QString &audio, int &rate, QString &defaultinput, QString &startchannel, QString &type, dvb_options_t &dvb_opts, - firewire_options_t &firewire_opts, bool &skip_bt); + firewire_options_t &firewire_opts, dbox2_options_t &dbox2_opts, + bool &skip_bt); void SetupRecorder(class RecordingProfile& profile); void TeardownRecorder(bool killFile = false); @@ -240,11 +248,12 @@ QString liveTVRingBufLoc; QString recprefix; - // Configuration variables from setup rutines + // Configuration variables from setup routines int m_capturecardnum; bool ispip; dvb_options_t dvb_options; firewire_options_t firewire_options; + dbox2_options_t dbox2_options; // State variables QMutex stateChangeLock; Index: libs/libmythtv/siparser.h =================================================================== --- libs/libmythtv/siparser.h (revision 6975) +++ libs/libmythtv/siparser.h (working copy) @@ -75,7 +75,7 @@ * Argentenia has also has announced their Digital TV Standard will be * ATSC over DVB-T * - * Impliemntation of OpenCable or other MPEG-TS based standards (DirecTV?) + * Implementation of OpenCable or other MPEG-TS based standards (DirecTV?) * is also possible with this class if their specs are ever known. * */