diff -u -r -x .svn ./a/mythtv/configure ./b/mythtv/configure --- ./a/mythtv/configure 2007-08-18 11:18:32.000000000 +0200 +++ ./b/mythtv/configure 2007-08-18 11:34:21.000000000 +0200 @@ -154,6 +154,7 @@ echo " --dvb-path=HDRLOC location of directory containing" echo " 'linux/dvb/frontend.h', not the" echo " directory with frontend.h [$dvb_path]" + echo " --dvb-net-id=NETID force the used network ID to NETID, usefull for DVB-C" echo " --disable-x11 disable X11 support" echo " --x11-path=X11LOC location of X11 include files [$x11_include_path-path]" echo " --disable-xrandr disable X11 resolution switching" @@ -1026,6 +1027,7 @@ directx="no" dvb_path="/usr/include" dvb="yes" +dvb_net_id="" dvdv="no" firewire="yes" frontend="yes" @@ -1243,6 +1245,8 @@ ;; --dvb-path=*) dvb_path="$optval" ;; + --dvb-net-id=*) dvb_net_id="$optval" + ;; --x11-path=*) x11_include_path="$optval" ;; --xvmc-lib=*) xvmc_lib="$optval" @@ -2932,6 +2936,9 @@ echo "ivtv support $ivtv" echo "FireWire support $firewire" echo "DVB support $dvb [$dvb_path]" + if test "$dvb_net_id" != "" ; then + echo "DVB network ID $dvb_net_id" + fi echo "DBox2 support $dbox2" echo "HDHomeRun sup. $hdhomerun" echo "IPTV support $iptv" @@ -3259,6 +3266,9 @@ fi if enabled dvb; then + if test "$dvb_net_id" != "" ; then + echo "#define DVB_NET_ID $dvb_net_id" >> $TMPH + fi CONFIG_INCLUDEPATH="$CONFIG_INCLUDEPATH $dvb_path" fi diff -u -r -x .svn ./a/mythtv/libs/libmythtv/channelutil.cpp ./b/mythtv/libs/libmythtv/channelutil.cpp --- ./a/mythtv/libs/libmythtv/channelutil.cpp 2007-08-18 11:18:07.000000000 +0200 +++ ./b/mythtv/libs/libmythtv/channelutil.cpp 2007-08-18 11:23:13.000000000 +0200 @@ -278,7 +278,7 @@ // DVB specific tsid, netid, cd.SymbolRateHz(), -1, - -1, -1, + -1, 'a', -1, cd.FECInnerString(), QString::null, -1, QString::null, diff -u -r -x .svn ./a/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp ./b/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp --- ./a/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp 2007-08-18 11:18:04.000000000 +0200 +++ ./b/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp 2007-08-18 11:43:24.000000000 +0200 @@ -7,6 +7,7 @@ #include "dvbtables.h" #include "premieretables.h" #include "eithelper.h" +#include "config.h" #define PREMIERE_ONID 133 @@ -218,26 +219,38 @@ switch (psip.TableID()) { +#ifdef DVB_NET_ID + // Patch to make DVB-C work.... + // Look in NIT and NITo for the desired network ID, the matching NIT(o) + // will be processed as the normal main network NIT. case TableID::NIT: + case TableID::NITo: { - SetVersionNIT(psip.Version(), psip.LastSection()); - SetNITSectionSeen(psip.Section()); - - if (_cache_tables) - { - NetworkInformationTable *nit = - new NetworkInformationTable(psip); - CacheNIT(nit); - QMutexLocker locker(&_listener_lock); - for (uint i = 0; i < _dvb_main_listeners.size(); i++) - _dvb_main_listeners[i]->HandleNIT(nit); - } - else + if((psip.TableIDExtension() == DVB_NET_ID) && psip.IsCurrent()) +#else + case TableID::NIT: + { +#endif { - NetworkInformationTable nit(psip); - QMutexLocker locker(&_listener_lock); - for (uint i = 0; i < _dvb_main_listeners.size(); i++) - _dvb_main_listeners[i]->HandleNIT(&nit); + SetVersionNIT(psip.Version(), psip.LastSection()); + SetNITSectionSeen(psip.Section()); + + if (_cache_tables) + { + NetworkInformationTable *nit = + new NetworkInformationTable(psip); + CacheNIT(nit); + QMutexLocker locker(&_listener_lock); + for (uint i = 0; i < _dvb_main_listeners.size(); i++) + _dvb_main_listeners[i]->HandleNIT(nit); + } + else + { + NetworkInformationTable nit(psip); + QMutexLocker locker(&_listener_lock); + for (uint i = 0; i < _dvb_main_listeners.size(); i++) + _dvb_main_listeners[i]->HandleNIT(&nit); + } } return true; @@ -275,6 +288,7 @@ return true; } +#ifndef DVB_NET_ID case TableID::NITo: { SetVersionNITo(psip.Version(), psip.LastSection()); @@ -287,6 +301,7 @@ return true; } +#endif case TableID::SDTo: { uint tsid = psip.TableIDExtension();