aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-02-02 23:13:48 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-02-02 23:13:48 +0000
commita39683740f78cc2463900d1ba73f7d7e2c69d807 (patch)
treeb13340747eedebecfe686f84b4b682f76b2374ea /lib
parent9412183a3c484b906775b2e117b6ee33c66083f6 (diff)
downloadenigma2-a39683740f78cc2463900d1ba73f7d7e2c69d807.tar.gz
enigma2-a39683740f78cc2463900d1ba73f7d7e2c69d807.zip
set timing pid
Diffstat (limited to 'lib')
-rw-r--r--lib/service/servicedvbrecord.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/service/servicedvbrecord.cpp b/lib/service/servicedvbrecord.cpp
index f4bf5577..5b4f35ed 100644
--- a/lib/service/servicedvbrecord.cpp
+++ b/lib/service/servicedvbrecord.cpp
@@ -102,9 +102,13 @@ int eDVBServiceRecord::doRecord()
int fd = ::open(m_filename.c_str(), O_WRONLY|O_CREAT|O_LARGEFILE, 0644);
if (fd == -1)
{
- eDebug("eDVBServiceRecord - can't open hardcoded recording file!");
+ eDebug("eDVBServiceRecord - can't open recording file!");
return -1;
}
+
+ /* turn off kernel caching strategies */
+ posix_fadvise(fd, 0, 0, POSIX_FADV_RANDOM);
+
ePtr<iDVBDemux> demux;
if (m_service_handler.getDataDemux(demux))
{
@@ -133,6 +137,8 @@ int eDVBServiceRecord::doRecord()
if (program.pmtPid != -1)
pids_to_record.insert(program.pmtPid); // PMT
+ int timing_pid = -1;
+
eDebugNoNewLine("RECORD: have %d video stream(s)", program.videoStreams.size());
if (!program.videoStreams.empty())
{
@@ -142,6 +148,10 @@ int eDVBServiceRecord::doRecord()
i != program.videoStreams.end(); ++i)
{
pids_to_record.insert(i->pid);
+
+ if (timing_pid == -1)
+ timing_pid = i->pid;
+
if (i != program.videoStreams.begin())
eDebugNoNewLine(", ");
eDebugNoNewLine("%04x", i->pid);
@@ -157,6 +167,10 @@ int eDVBServiceRecord::doRecord()
i != program.audioStreams.end(); ++i)
{
pids_to_record.insert(i->pid);
+
+ if (timing_pid == -1)
+ timing_pid = i->pid;
+
if (i != program.audioStreams.begin())
eDebugNoNewLine(", ");
eDebugNoNewLine("%04x", i->pid);
@@ -194,6 +208,9 @@ int eDVBServiceRecord::doRecord()
m_record->removePID(*i);
}
+ if (timing_pid != -1)
+ m_record->setTimingPID(timing_pid);
+
m_pids_active = pids_to_record;
if (m_state != stateRecording)