add possibility to reserve a demux from python (via rawChannel)
authorghost <andreas.monzner@multimedia-labs.de>
Wed, 14 Apr 2010 22:42:04 +0000 (00:42 +0200)
committerghost <andreas.monzner@multimedia-labs.de>
Wed, 14 Apr 2010 22:42:40 +0000 (00:42 +0200)
lib/dvb/dvb.cpp
lib/dvb/dvb.h
lib/dvb/idvb.h

index 17712dde154bb39d5beed4096db20dc79474fa8e..836851c50fb2a582d9183278a233b666d5c05ca8 100644 (file)
@@ -1657,6 +1657,18 @@ void eDVBChannel::SDTready(int result)
        m_SDT = 0;
 }
 
+int eDVBChannel::reserveDemux()
+{
+       ePtr<iDVBDemux> dmx;
+       if (!getDemux(dmx, 0))
+       {
+               uint8_t id;
+               if (!dmx->getCADemuxID(id))
+                       return id;
+       }
+       return -1;
+}
+
 RESULT eDVBChannel::requestTsidOnid(ePyObject callback)
 {
        if (PyCallable_Check(callback))
index 7b3200066d2b9f4508adf932b34f1d2f382c2e9f..405bd55762ceef7a7d9d81cbf861e1d5a554af48 100644 (file)
@@ -268,6 +268,7 @@ public:
        int getUseCount() { return m_use_count; }
 
        RESULT requestTsidOnid(ePyObject callback);
+       int reserveDemux();
 private:
        ePtr<eDVBAllocatedFrontend> m_frontend;
        ePtr<eDVBAllocatedDemux> m_demux, m_decoder_demux;
index d20829bf311b6f7748e924902ea3958c55b74189..996d7909e2301526cb4ec83cd04db86cc49ffd75 100644 (file)
@@ -508,6 +508,7 @@ public:
                /* direct frontend access for raw channels and/or status inquiries. */
        virtual SWIG_VOID(RESULT) getFrontend(ePtr<iDVBFrontend> &SWIG_OUTPUT)=0;
        virtual RESULT requestTsidOnid(SWIG_PYOBJECT(ePyObject) callback) { return -1; }
+       virtual int reserveDemux() { return -1; }
 #ifndef SWIG
        enum
        {