From 9412183a3c484b906775b2e117b6ee33c66083f6 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Thu, 2 Feb 2006 23:13:20 +0000 Subject: [PATCH] record timing information from a single PID --- lib/dvb/demux.cpp | 40 ++++++++++++++++++++++++++++++++++++---- lib/dvb/demux.h | 8 ++++---- lib/dvb/idemux.h | 3 +-- 3 files changed, 41 insertions(+), 10 deletions(-) diff --git a/lib/dvb/demux.cpp b/lib/dvb/demux.cpp index 5be44dc9..710323a1 100644 --- a/lib/dvb/demux.cpp +++ b/lib/dvb/demux.cpp @@ -34,6 +34,7 @@ #include #include #include +#include eDVBDemux::eDVBDemux(int adapter, int demux): adapter(adapter), demux(demux) { @@ -267,14 +268,45 @@ RESULT eDVBSectionReader::connectRead(const Slot1 &r, ePtrm_dvr_busy = 1; } @@ -339,11 +371,11 @@ RESULT eDVBTSRecorder::removePID(int pid) return 0; } -RESULT eDVBTSRecorder::setFormat(int format) +RESULT eDVBTSRecorder::setTimingPID(int pid) { if (m_running) return -1; - m_format = format; + m_thread->setTimingPID(pid); return 0; } diff --git a/lib/dvb/demux.h b/lib/dvb/demux.h index 06c74c9a..f5390063 100644 --- a/lib/dvb/demux.h +++ b/lib/dvb/demux.h @@ -60,7 +60,7 @@ public: RESULT connectRead(const Slot1 &read, ePtr &conn); }; -class eFilePushThread; +class eDVBRecordFileThread; class eDVBTSRecorder: public iDVBTSRecorder, public Object { @@ -73,7 +73,7 @@ public: RESULT addPID(int pid); RESULT removePID(int pid); - RESULT setFormat(int pid); + RESULT setTimingPID(int pid); RESULT setTargetFD(int fd); RESULT setBoundary(off_t max); @@ -85,14 +85,14 @@ private: RESULT startPID(int pid); void stopPID(int pid); - eFilePushThread *m_thread; + eDVBRecordFileThread *m_thread; std::map m_pids; Signal1 m_event; ePtr m_demux; - int m_running, m_format, m_target_fd, m_source_fd; + int m_running, m_target_fd, m_source_fd; }; #endif diff --git a/lib/dvb/idemux.h b/lib/dvb/idemux.h index e48c5d9a..6cf7b024 100644 --- a/lib/dvb/idemux.h +++ b/lib/dvb/idemux.h @@ -62,8 +62,7 @@ public: virtual RESULT addPID(int pid) = 0; virtual RESULT removePID(int pid) = 0; - /* include timestamps? ... */ - virtual RESULT setFormat(int pid) = 0; + virtual RESULT setTimingPID(int pid) = 0; virtual RESULT setTargetFD(int fd) = 0; virtual RESULT setBoundary(off_t max) = 0; -- 2.30.2