Generating 'X' audio component records for recording if there is no EPG data

This commit is contained in:
Klaus Schmidinger 2006-02-18 16:03:40 +01:00
parent 492f06175a
commit 91a5940bc4
3 changed files with 29 additions and 7 deletions

View File

@ -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.

View File

@ -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:

View File

@ -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();