summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2006-02-26 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2006-02-26 18:00:00 +0100
commit9d12ac30f006ed63b4c9ab4c1a076b7d4f025022 (patch)
tree4bc65426530c9af8c59a0d6f27fedfe15f7a19fd /recording.c
parentb9bfba20f25a0562d22bb57d611abc3918e1c147 (diff)
downloadvdr-patch-lnbsharing-9d12ac30f006ed63b4c9ab4c1a076b7d4f025022.tar.gz
vdr-patch-lnbsharing-9d12ac30f006ed63b4c9ab4c1a076b7d4f025022.tar.bz2
Version 1.3.44vdr-1.3.44
- Fixed setting the audio language codes in 'Transfer-Mode' (reported by Rolf Ahrenberg). The actual problem was the call to the Transferring() function in cDevice::AttachPlayer() before assigning the player. - Fixed removing the '-' when entering a channel number where there is no other one that fits the input (thanks to Joachim Wilke). - Fixed the 'libsi' function CharArray::checkSize(), which made a previous workaround in libsi/descriptor.c obsolete (thanks to Marcel Wiesweg). - The "Ok" key in the "Jump" mode of the replay progress display now confirms the jump instead of closing the display (thanks to Christoph Haubrich). - The 'summary' field of a timer definition has been renamed to 'aux', and is now only used for external applications to store auxiliary information with a timer, which has no meaning whatsoever to VDR itself. The contents of the 'aux' field of a timer is copied into the recording's 'info.vdr' file, using the tag character '@'. - The description of a recording is now taken exclusively from its related EPG data. If an application wants to use a different description it needs to set it with SVDRP/PUTE and use table ID 0x00, so that it won't be overwritten (as a side effect, however, this also disables VPS for such an event). - There is no more "Summary" menu when pressing "Ok" in the "Timers" menu. The "Ok" key now always opens the "Edit timer" menu. - The upper 16 bit of a timer's "flags" are no longer treated specially when a timer is modified in the "Edit timer" menu. If an external application needs to know if a timer was modified, it has to keep a copy of the timer's data and compare that to the actual data. - The new function cRecordingInfo::ChannelID() can be used to retrieve the ID of the channel a recording was made from. - The 'info.vdr' file of a recording now also contains the 'E' and 'V' records of the EPG event used when creating it. - The option "Setup/OSD/Sort timers" has been removed. Timers are always sorted by their start time and priority. - The "Blue" key in the "Timers" menu now displays the EPG info of the event the selected timer will record (if available). The "On/Off" function has been shifted to the "Red" button. Editing a timer is done by pressing "Ok". - When determining which event a timer is going to record, all available events in the future are now taken into account (no more limit to 4 hours in the future). This has been done so that the event info is available in the "Timers" menu when pressing the "Blue" button. In order to avoid unnecessary work, each timer now has its own timestamp to control whether its schedule has changed since the last time its event has been set. - Fixed setting events to timers in case a non-VPS event has expired. - There is now a log message "timer ... set to event ..." when defining a timer from the EPG menu. - Lines tagged with '#' in the 'info.vdr' file of a recording are now silently ignored when reading that file (suggested by Peter Bieringer). Such lines can be used by external tools to store arbitrary information. - The 'event id' in EPG data has been extended to 32 bit, so that external tools can generate ids that don't collide with those from the DVB data stream (suggested by Matthias Schniedermeyer). - The DrawBitmap() function now has a new parameter 'Overlay' that allows a bitmap to be drawn with a transparent background (thanks to Alexander Hans). - Fixed cSchedule::GetFollowingEvent() in case there is currently no present event running (thanks to Pekka Mauno).
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c38
1 files changed, 32 insertions, 6 deletions
diff --git a/recording.c b/recording.c
index 1efa3f6..b8db264 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.137 2006/02/19 13:09:29 kls Exp $
+ * $Id: recording.c 1.140 2006/02/26 11:59:59 kls Exp $
*/
#include "recording.h"
@@ -261,6 +261,7 @@ cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event)
channelID = Channel ? Channel->GetChannelID() : tChannelID::InvalidID;
ownEvent = Event ? NULL : new cEvent(0);
event = ownEvent ? ownEvent : Event;
+ aux = NULL;
if (Channel) {
// Since the EPG data's component records can carry only a single
// language code, let's see whether the channel's PID data has
@@ -299,6 +300,7 @@ cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event)
cRecordingInfo::~cRecordingInfo()
{
delete ownEvent;
+ free(aux);
}
void cRecordingInfo::SetData(const char *Title, const char *ShortText, const char *Description)
@@ -311,6 +313,12 @@ void cRecordingInfo::SetData(const char *Title, const char *ShortText, const cha
((cEvent *)event)->SetDescription(Description);
}
+void cRecordingInfo::SetAux(const char *Aux)
+{
+ free(aux);
+ aux = Aux ? strdup(Aux) : NULL;
+}
+
bool cRecordingInfo::Read(FILE *f)
{
if (ownEvent) {
@@ -329,6 +337,26 @@ bool cRecordingInfo::Read(FILE *f)
channelID = tChannelID::FromString(t);
}
break;
+ case 'E': {
+ unsigned int EventID;
+ time_t StartTime;
+ int Duration;
+ unsigned int TableID = 0;
+ unsigned int Version = 0xFF;
+ int n = sscanf(t, "%u %ld %d %X %X", &EventID, &StartTime, &Duration, &TableID, &Version);
+ if (n >= 3 && n <= 5) {
+ ownEvent->SetEventID(EventID);
+ ownEvent->SetStartTime(StartTime);
+ ownEvent->SetDuration(Duration);
+ ownEvent->SetTableID(TableID);
+ ownEvent->SetVersion(Version);
+ }
+ }
+ break;
+ case '@': free(aux);
+ aux = strdup(t);
+ break;
+ case '#': break; // comments are ignored
default: if (!ownEvent->Parse(s)) {
esyslog("ERROR: EPG data problem in line %d", line);
return false;
@@ -346,6 +374,8 @@ bool cRecordingInfo::Write(FILE *f, const char *Prefix) const
if (channelID.Valid())
fprintf(f, "%sC %s\n", Prefix, *channelID.ToString());
event->Dump(f, Prefix, true);
+ if (aux)
+ fprintf(f, "%s@ %s\n", Prefix, aux);
return true;
}
@@ -497,11 +527,7 @@ cRecording::cRecording(cTimer *Timer, const cEvent *Event)
lifetime = Timer->Lifetime();
// handle info:
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:
- if (!isempty(Timer->Summary()))
- info->SetData(isempty(info->Title()) ? Timer->File() : NULL, NULL, Timer->Summary());
+ info->SetAux(Timer->Aux());
}
cRecording::cRecording(const char *FileName)