improve filterRecordData
[enigma2.git] / lib / dvb / demux.cpp
index 22b09ffe32e29cbdcae44dd02d2aefc3f039bed2..b6143ddf438d24d93d9164601845061da0216b71 100644 (file)
@@ -144,12 +144,15 @@ RESULT eDVBDemux::getSTC(pts_t &pts, int num)
        
        if (ioctl(fd, DMX_GET_STC, &stc) < 0)
        {
+               eDebug("DMX_GET_STC failed!");
                ::close(fd);
                return -1;
        }
        
        pts = stc.stc;
        
+       eDebug("DMX_GET_STC - %lld", pts);
+       
        ::close(fd);
        return 0;
 }
@@ -405,7 +408,7 @@ public:
        
        void saveTimingInformation(const std::string &filename);
 protected:
-       void filterRecordData(const unsigned char *data, int len);
+       int filterRecordData(const unsigned char *data, int len, size_t &current_span_remaining);
 private:
        eMPEGStreamParserTS m_ts_parser;
        eMPEGStreamInformation m_stream_info;
@@ -429,11 +432,13 @@ void eDVBRecordFileThread::saveTimingInformation(const std::string &filename)
        m_stream_info.save(filename.c_str());
 }
 
-void eDVBRecordFileThread::filterRecordData(const unsigned char *data, int len)
+int eDVBRecordFileThread::filterRecordData(const unsigned char *data, int len, size_t &current_span_remaining)
 {
        m_ts_parser.parseData(m_current_offset, data, len);
        
        m_current_offset += len;
+       
+       return len;
 }
 
 DEFINE_REF(eDVBTSRecorder);