X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/6a1fc924eb21f22f9b522df233a9a98d4c5bdca7..9925392e576717cc0df070ace822a6f392808bb7:/lib/dvb/demux.cpp diff --git a/lib/dvb/demux.cpp b/lib/dvb/demux.cpp index d2a2a545..d7fcaccf 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,29 @@ 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); + + int n = DMX_SOURCE_FRONT0 + fenum; + int res = ::ioctl(fd, DMX_SET_SOURCE, &n); + if (res) + eDebug("DMX_SET_SOURCE failed! - %m"); ::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); + int n = DMX_SOURCE_DVR0 + pvrnum; + int res = ::ioctl(fd, DMX_SET_SOURCE, &n); ::close(fd); return res; +#endif + return 0; } RESULT eDVBDemux::createSectionReader(eMainloop *context, ePtr &reader)