From 7f6e964b3c956b93ac7097127e0c1da7afd3df6c Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Wed, 16 Nov 2005 00:33:30 +0000 Subject: [PATCH] don't use setsource with DVB-API < 3 --- lib/dvb/demux.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/dvb/demux.cpp b/lib/dvb/demux.cpp index d2a2a545..6c783d38 100644 --- a/lib/dvb/demux.cpp +++ b/lib/dvb/demux.cpp @@ -6,7 +6,6 @@ #include #include - #if HAVE_DVB_API_VERSION < 3 #include #ifndef DMX_SET_NEGFILTER_MASK @@ -49,18 +48,24 @@ DEFINE_REF(eDVBDemux) RESULT eDVBDemux::setSourceFrontend(int fenum) { +#if HAVE_DVB_API_VERSION >= 3 int fd = openDemux(); int res = ::ioctl(fd, DMX_SET_SOURCE, DMX_SOURCE_FRONT0 + fenum); ::close(fd); return res; +#endif + return 0; } RESULT eDVBDemux::setSourcePVR(int pvrnum) { +#if HAVE_DVB_API_VERSION >= 3 int fd = openDemux(); int res = ::ioctl(fd, DMX_SET_SOURCE, DMX_SOURCE_DVR0 + pvrnum); ::close(fd); return res; +#endif + return 0; } RESULT eDVBDemux::createSectionReader(eMainloop *context, ePtr &reader) -- 2.30.2