trade open flags to openPVR function
authorghost <andreas.monzner@multimedia-labs.de>
Tue, 15 Feb 2011 19:38:41 +0000 (20:38 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Tue, 15 Feb 2011 19:38:41 +0000 (20:38 +0100)
refs bug #672

lib/dvb/demux.cpp
lib/dvb/demux.h
lib/dvb/dvb.cpp
lib/dvb/idvb.h

index 37eae19..f4d8618 100644 (file)
@@ -85,11 +85,11 @@ int eDVBDemux::openDemux(void)
        return ::open(filename, O_RDWR);
 }
 
        return ::open(filename, O_RDWR);
 }
 
-int eDVBDemux::openDVR(void)
+int eDVBDemux::openDVR(int flags)
 {
        char filename[128];
        snprintf(filename, 128, "/dev/dvb/adapter%d/dvr%d", adapter, demux);
 {
        char filename[128];
        snprintf(filename, 128, "/dev/dvb/adapter%d/dvr%d", adapter, demux);
-       return ::open(filename, O_WRONLY);
+       return ::open(filename, flags);
 }
 
 DEFINE_REF(eDVBDemux)
 }
 
 DEFINE_REF(eDVBDemux)
index 7dbb521..e73982e 100644 (file)
@@ -26,7 +26,7 @@ public:
        RESULT getCADemuxID(uint8_t &id) { id = demux; return 0; }
        RESULT flush();
        RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &conn);
        RESULT getCADemuxID(uint8_t &id) { id = demux; return 0; }
        RESULT flush();
        RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &conn);
-       int openDVR(void);
+       int openDVR(int flags);
 
        int getRefCount() { return ref; }
 private:
 
        int getRefCount() { return ref; }
 private:
index 30d5f55..399e9f5 100644 (file)
@@ -1799,7 +1799,7 @@ RESULT eDVBChannel::playSource(ePtr<iTsSource> &source, const char *streaminfo_f
                ePtr<eDVBAllocatedDemux> &demux = m_demux ? m_demux : m_decoder_demux;
                if (demux)
                {
                ePtr<eDVBAllocatedDemux> &demux = m_demux ? m_demux : m_decoder_demux;
                if (demux)
                {
-                       m_pvr_fd_dst = demux->get().openDVR();
+                       m_pvr_fd_dst = demux->get().openDVR(O_WRONLY);
                        if (m_pvr_fd_dst < 0)
                        {
                                eDebug("can't open /dev/dvb/adapterX/dvrX - you need to buy the new(!) $$$ box! (%m)"); // or wait for the driver to be improved.
                        if (m_pvr_fd_dst < 0)
                        {
                                eDebug("can't open /dev/dvb/adapterX/dvrX - you need to buy the new(!) $$$ box! (%m)"); // or wait for the driver to be improved.
index f15cd04..66fef39 100644 (file)
@@ -636,6 +636,7 @@ public:
        virtual RESULT getSTC(pts_t &pts, int num=0)=0;
        virtual RESULT getCADemuxID(uint8_t &id)=0;
        virtual RESULT flush()=0;
        virtual RESULT getSTC(pts_t &pts, int num=0)=0;
        virtual RESULT getCADemuxID(uint8_t &id)=0;
        virtual RESULT flush()=0;
+       int openDVR(int flags)=0;
 };
 
 #if HAVE_DVB_API_VERSION < 3 && !defined(VIDEO_EVENT_SIZE_CHANGED)
 };
 
 #if HAVE_DVB_API_VERSION < 3 && !defined(VIDEO_EVENT_SIZE_CHANGED)