diff options
author | Tobias Grimm <tobias@e-tobi.loc> | 2009-04-23 23:40:38 +0200 |
---|---|---|
committer | Tobias Grimm <tobias@e-tobi.loc> | 2009-06-20 18:17:42 +0200 |
commit | e125a3bbd31042b4d8d72171f19c1006bee06282 (patch) | |
tree | 4aac3fff10bf0b33e2d02792e379dc29b1af870f | |
parent | 4de3caa67369af756d2ef008ad26453c9c4065ad (diff) | |
download | vdr-patches-e125a3bbd31042b4d8d72171f19c1006bee06282.tar.gz vdr-patches-e125a3bbd31042b4d8d72171f19c1006bee06282.tar.bz2 |
ttxtsubs: Record teletext (subtitels) PID
(provided by Rolf Ahrenberg)
-rw-r--r-- | menu.c | 6 | ||||
-rw-r--r-- | receiver.c | 6 | ||||
-rw-r--r-- | receiver.h | 4 | ||||
-rw-r--r-- | recorder.c | 4 | ||||
-rw-r--r-- | recorder.h | 3 |
5 files changed, 12 insertions, 11 deletions
@@ -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() @@ -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"); } @@ -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 @@ -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) { @@ -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(); |