summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Grimm <tobias@e-tobi.loc>2009-04-23 23:40:38 +0200
committerTobias Grimm <tobias@e-tobi.loc>2009-06-20 18:17:42 +0200
commite125a3bbd31042b4d8d72171f19c1006bee06282 (patch)
tree4aac3fff10bf0b33e2d02792e379dc29b1af870f
parent4de3caa67369af756d2ef008ad26453c9c4065ad (diff)
downloadvdr-patches-e125a3bbd31042b4d8d72171f19c1006bee06282.tar.gz
vdr-patches-e125a3bbd31042b4d8d72171f19c1006bee06282.tar.bz2
ttxtsubs: Record teletext (subtitels) PID
(provided by Rolf Ahrenberg)
-rw-r--r--menu.c6
-rw-r--r--receiver.c6
-rw-r--r--receiver.h4
-rw-r--r--recorder.c4
-rw-r--r--recorder.h3
5 files changed, 12 insertions, 11 deletions
diff --git a/menu.c b/menu.c
index ef5e593..b4fca96 100644
--- a/menu.c
+++ b/menu.c
@@ -30,7 +30,6 @@
#include "timers.h"
#include "transfer.h"
#include "videodir.h"
-#include "vdrttxtsubshooks.h"
#define MAXWAIT4EPGINFO 3 // seconds
#define MODETIMEOUT 3 // seconds
@@ -3756,10 +3755,9 @@ cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer, bool Pause)
isyslog("record %s", fileName);
if (MakeDirs(fileName, true)) {
const cChannel *ch = timer->Channel();
- cTtxtSubsRecorderBase *subsRecorder = cVDRTtxtsubsHookListener::Hook()->NewTtxtSubsRecorder(device, ch);
- recorder = new cRecorder(fileName, ch->GetChannelID(), timer->Priority(), ch->Vpid(), ch->Apids(), ch->Dpids(), ch->Spids(), subsRecorder);
+ int TPid[2] = { ch->Tpid(), 0 };
+ recorder = new cRecorder(fileName, ch->GetChannelID(), timer->Priority(), ch->Vpid(), ch->Apids(), ch->Dpids(), ch->Spids(), TPid);
if (device->AttachReceiver(recorder)) {
- if (subsRecorder) subsRecorder->DeviceAttach();
Recording.WriteInfo();
cStatus::MsgRecording(device, Recording.Name(), Recording.FileName(), true);
if (!Timer && !cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo()
diff --git a/receiver.c b/receiver.c
index f4c0a78..c19bd84 100644
--- a/receiver.c
+++ b/receiver.c
@@ -12,7 +12,7 @@
#include <stdio.h>
#include "tools.h"
-cReceiver::cReceiver(tChannelID ChannelID, int Priority, int Pid, const int *Pids1, const int *Pids2, const int *Pids3)
+cReceiver::cReceiver(tChannelID ChannelID, int Priority, int Pid, const int *Pids1, const int *Pids2, const int *Pids3, const int *Pids4)
{
device = NULL;
channelID = ChannelID;
@@ -32,6 +32,10 @@ cReceiver::cReceiver(tChannelID ChannelID, int Priority, int Pid, const int *Pid
while (*Pids3 && numPids < MAXRECEIVEPIDS)
pids[numPids++] = *Pids3++;
}
+ if (Pids4) {
+ while (*Pids4 && numPids < MAXRECEIVEPIDS)
+ pids[numPids++] = *Pids4++;
+ }
if (numPids >= MAXRECEIVEPIDS)
dsyslog("too many PIDs in cReceiver");
}
diff --git a/receiver.h b/receiver.h
index 35930d2..97d2b0f 100644
--- a/receiver.h
+++ b/receiver.h
@@ -38,10 +38,10 @@ protected:
///< will be delivered only ONCE, so the cReceiver must make sure that
///< it will be able to buffer the data if necessary.
public:
- cReceiver(tChannelID ChannelID, int Priority, int Pid, const int *Pids1 = NULL, const int *Pids2 = NULL, const int *Pids3 = NULL);
+ cReceiver(tChannelID ChannelID, int Priority, int Pid, const int *Pids1 = NULL, const int *Pids2 = NULL, const int *Pids3 = NULL, const int *Pids4 = NULL);
///< Creates a new receiver for the channel with the given ChannelID with
///< the given Priority. Pid is a single PID (typically the video PID), while
- ///< Pids1...Pids3 are pointers to zero terminated lists of PIDs.
+ ///< Pids1...Pids4 are pointers to zero terminated lists of PIDs.
///< If any of these PIDs are 0, they will be silently ignored.
///< The total number of non-zero PIDs must not exceed MAXRECEIVEPIDS.
///< Priority may be any value in the range -99..99. Negative values indicate
diff --git a/recorder.c b/recorder.c
index 4e48a51..decc9e3 100644
--- a/recorder.c
+++ b/recorder.c
@@ -21,8 +21,8 @@
// --- cRecorder -------------------------------------------------------------
-cRecorder::cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids)
-:cReceiver(ChannelID, Priority, VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids)
+cRecorder::cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids, const int *EPids)
+:cReceiver(ChannelID, Priority, VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids, EPids)
,cThread("recording")
,recordingInfo(FileName)
{
diff --git a/recorder.h b/recorder.h
index ac607b5..6929e6f 100644
--- a/recorder.h
+++ b/recorder.h
@@ -15,7 +15,6 @@
#include "remux.h"
#include "ringbuffer.h"
#include "thread.h"
-#include "vdrttxtsubshooks.h"
class cRecorder : public cReceiver, cThread {
private:
@@ -35,7 +34,7 @@ protected:
virtual void Receive(uchar *Data, int Length);
virtual void Action(void);
public:
- cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids, cTtxtSubsRecorderBase *tsr);
+ cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids, const int *EPids = NULL);
// Creates a new recorder for the channel with the given ChannelID and
// the given Priority that will record the given PIDs into the file FileName.
virtual ~cRecorder();