summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-02-18 16:03:40 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-02-18 16:03:40 +0100
commit91a5940bc41aabcbc07bf2684a0e2ebb9710027a (patch)
tree468e5c209d724411ea011f73d75aedbba07cc521
parent492f06175ab12b90d5974a909986bdac6d4818a0 (diff)
downloadvdr-91a5940bc41aabcbc07bf2684a0e2ebb9710027a.tar.gz
vdr-91a5940bc41aabcbc07bf2684a0e2ebb9710027a.tar.bz2
Generating 'X' audio component records for recording if there is no EPG data
-rw-r--r--HISTORY3
-rw-r--r--recording.c29
-rw-r--r--recording.h4
3 files changed, 29 insertions, 7 deletions
diff --git a/HISTORY b/HISTORY
index 36bed719..5b06a0b8 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4343,3 +4343,6 @@ Video Disk Recorder Revision History
exceeds the maximum channel number (thanks to Rolf Ahrenberg).
- The language code in the 'X' component records of EPG data can now consist of
two codes, separated by '+'.
+- If a recording starts and there is no EPG data available for the recorded channel,
+ the 'X' audio component records for the 'info.vdr' file are now generated from the
+ channel's PID data.
diff --git a/recording.c b/recording.c
index 67a92b0f..dc509ef5 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.135 2006/02/12 11:34:19 kls Exp $
+ * $Id: recording.c 1.136 2006/02/18 16:03:40 kls Exp $
*/
#include "recording.h"
@@ -256,15 +256,34 @@ void cResumeFile::Delete(void)
// --- cRecordingInfo --------------------------------------------------------
-cRecordingInfo::cRecordingInfo(tChannelID ChannelID, const cEvent *Event)
+cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event)
{
- channelID = ChannelID;
+ channelID = Channel ? Channel->GetChannelID() : tChannelID::InvalidID;
if (Event) {
event = Event;
ownEvent = NULL;
}
- else
+ else {
event = ownEvent = new cEvent(0);
+ if (Channel) {
+ cComponents *Components = NULL;
+ for (int i = 0; i < MAXAPIDS; i++) {
+ if (*Channel->Alang(i)) {
+ if (!Components)
+ Components = new cComponents;
+ Components->SetComponent(Components->NumComponents(), 2, 3, Channel->Alang(i), NULL);
+ }
+ }
+ for (int i = 0; i < MAXDPIDS; i++) {
+ if (*Channel->Dlang(i)) {
+ if (!Components)
+ Components = new cComponents;
+ Components->SetComponent(Components->NumComponents(), 2, 5, Channel->Dlang(i), NULL);
+ }
+ }
+ ownEvent->SetComponents(Components);
+ }
+ }
}
cRecordingInfo::~cRecordingInfo()
@@ -467,7 +486,7 @@ cRecording::cRecording(cTimer *Timer, const cEvent *Event)
priority = Timer->Priority();
lifetime = Timer->Lifetime();
// handle info:
- info = new cRecordingInfo(Timer->Channel()->GetChannelID(), Event);
+ info = new cRecordingInfo(Timer->Channel(), Event);
// this is a somewhat ugly hack to get the 'summary' information from the
// timer into the recording info, but it saves us from having to actually
// copy the entire event data:
diff --git a/recording.h b/recording.h
index 334e7469..4ad4077a 100644
--- a/recording.h
+++ b/recording.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.h 1.50 2006/02/12 11:34:34 kls Exp $
+ * $Id: recording.h 1.51 2006/02/18 16:03:40 kls Exp $
*/
#ifndef __RECORDING_H
@@ -44,7 +44,7 @@ private:
tChannelID channelID;
const cEvent *event;
cEvent *ownEvent;
- cRecordingInfo(tChannelID ChannelID = tChannelID::InvalidID, const cEvent *Event = NULL);
+ cRecordingInfo(const cChannel *Channel = NULL, const cEvent *Event = NULL);
void SetData(const char *Title, const char *ShortText, const char *Description);
public:
~cRecordingInfo();