summaryrefslogtreecommitdiff
path: root/libdtv/libvdr
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-05-11 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-05-11 18:00:00 +0200
commitc84022554aaacc9b1c3d9627501cdbb8276871f6 (patch)
treec26b34a2d420d52b1f88dae9323b1b975373571f /libdtv/libvdr
parentaf2a135212088f0cba6bd8f98544b271c2f71bef (diff)
downloadvdr-patch-lnbsharing-c84022554aaacc9b1c3d9627501cdbb8276871f6.tar.gz
vdr-patch-lnbsharing-c84022554aaacc9b1c3d9627501cdbb8276871f6.tar.bz2
Version 1.1.31vdr-1.1.31
- Introduced the new function cPlugin::Initialize(), in order to be able to separate the startup of a plugin into an "early" (Initialize()) and "late" (Start()) phase (suggested by Andreas Schultz). Plugin authors should please read the section about "Getting started" in PLUGINS.html and adapt their code if applicable. - Implemented the CableDeliverySystemDescriptor and TerrestrialDeliverySystemDescriptor in libdtv (thanks to Sven Grothklags and Andreas Schultz). - Fixed keeping live video active in case the primary device doesn't have an MPEG decoder (thanks to Wolfgang Goeller for reporting this one). - Implemented cDevice::ActualDevice(), which returns the actual receiving device in case of 'Transfer Mode', or the primary device otherwise. This may be useful for plugins that want to attach a cReceiver to the device where the current live video is actually coming from. - Added VDRVERSNUM to config.h, which can be used by the preprocessor to check the actual VDR version (suggested by Stefan Huelswitt). - Removed the WaitForPut/WaitForGet stuff from cRingBuffer, since it appears to no longer be necessary due to the implementation of cNonBlockingFileReader in dvbplayer.c. Also, the long timeout in WaitForPut caused problems with cReceivers that use a ring buffer and didn't immediately return from their Receive() function if the buffer runs full (thanks to Sascha Volkenandt for reporting this one). - Fixed handling EPG data where the "extended event descriptor" comes before the "short event" or a "time shifted event" (thanks to Jonan Santiago). - Disabled the "Received stuffing section in EIT" log message. - Updated 'channels.conf.terr' for Berlin (thanks to Juri Haberland). - Avoiding short display of the "Main" menu when pressing the "Recordings" button or the "Back" button during replay. - Further increased the timeout until an index file is considerd no longer to be written. - Implemented separate PausePriority and PauseLifetime parameters for the recordings created when pausing live video (suggested by Alfred Zastrow). - Changed C++ style comments in libdtv into C style to avoid warnings in gcc 3.x (thanks to Andreas Schultz).
Diffstat (limited to 'libdtv/libvdr')
-rw-r--r--libdtv/libvdr/libvdr.c120
1 files changed, 55 insertions, 65 deletions
diff --git a/libdtv/libvdr/libvdr.c b/libdtv/libvdr/libvdr.c
index 0ade4d3..e041fd8 100644
--- a/libdtv/libvdr/libvdr.c
+++ b/libdtv/libvdr/libvdr.c
@@ -47,7 +47,8 @@ struct LIST *createVdrProgramInfos (unsigned char *siBuffer)
struct LIST *Result, *EventList;
struct Event *Event;
struct Descriptor *Descriptor;
-
+ int GotVdrProgramInfo;
+
if (!siBuffer) return (NULL);
if (!(EventList = siParseEIT (siBuffer))) return (NULL);
@@ -57,9 +58,18 @@ struct LIST *createVdrProgramInfos (unsigned char *siBuffer)
xForeach (EventList, Event)
{
VdrProgramInfo = NULL;
-
+ GotVdrProgramInfo = 0;
+
xForeach (Event->Descriptors, Descriptor)
{
+ if (!VdrProgramInfo)
+ {
+ CreateVdrProgramInfo(VdrProgramInfo,
+ Event->EventID, Event->TransportStreamID,
+ Event->ServiceID, Event->StartTime,
+ Event->Duration, Event->Status);
+ }
+
switch (Descriptor->Tag)
{
case DESCR_SHORT_EVENT:
@@ -67,43 +77,29 @@ struct LIST *createVdrProgramInfos (unsigned char *siBuffer)
if (!xName(Descriptor) || !xName(Descriptor)[0])
break;
- if (!VdrProgramInfo)
- {
- CreateVdrProgramInfo(VdrProgramInfo,
- Event->EventID, Event->TransportStreamID,
- Event->ServiceID, Event->StartTime,
- Event->Duration, Event->Status);
-
- VdrProgramInfo->ShortName =
- xSetText (xName (Descriptor));
- VdrProgramInfo->ShortText =
- xSetText (((struct ShortEventDescriptor
- *)Descriptor)->Text);
- memcpy (VdrProgramInfo->LanguageCode, ((struct
- ShortEventDescriptor *)Descriptor)->
- LanguageCode, 4);
- }
- }
+ VdrProgramInfo->ShortName =
+ xSetText (xName (Descriptor));
+ VdrProgramInfo->ShortText =
+ xSetText (((struct ShortEventDescriptor
+ *)Descriptor)->Text);
+ memcpy (VdrProgramInfo->LanguageCode, ((struct
+ ShortEventDescriptor *)Descriptor)->
+ LanguageCode, 4);
+ GotVdrProgramInfo = 1;
+ }
break;
case DESCR_TIME_SHIFTED_EVENT:
{
struct tm *StartTime;
- if (!VdrProgramInfo)
- {
- CreateVdrProgramInfo(VdrProgramInfo,
- Event->EventID, Event->TransportStreamID,
- Event->ServiceID, Event->StartTime,
- Event->Duration, Event->Status);
-
- VdrProgramInfo->ReferenceServiceID =
- ((struct TimeShiftedEventDescriptor
- *)Descriptor)->ReferenceServiceID;
- VdrProgramInfo->ReferenceEventID =
- ((struct TimeShiftedEventDescriptor
- *)Descriptor)->ReferenceEventID;
- }
+ VdrProgramInfo->ReferenceServiceID =
+ ((struct TimeShiftedEventDescriptor
+ *)Descriptor)->ReferenceServiceID;
+ VdrProgramInfo->ReferenceEventID =
+ ((struct TimeShiftedEventDescriptor
+ *)Descriptor)->ReferenceEventID;
+ GotVdrProgramInfo = 1;
}
break;
@@ -111,20 +107,18 @@ struct LIST *createVdrProgramInfos (unsigned char *siBuffer)
{
struct ExtendedEventItem *Item;
- if (VdrProgramInfo)
+ if (xName (Descriptor))
+ AddToText (xName (Descriptor),
+ VdrProgramInfo->ExtendedName);
+ xForeach (((struct ExtendedEventDescriptor*)
+ Descriptor)->Items, Item)
{
- if (xName (Descriptor))
- AddToText (xName (Descriptor),
- VdrProgramInfo->ExtendedName);
- xForeach (((struct ExtendedEventDescriptor*)
- Descriptor)->Items, Item)
- {
- AddItemToText (xName (Item),
- VdrProgramInfo->ExtendedText);
- AddItemToText (Item->Text,
- VdrProgramInfo->ExtendedText);
- }
+ AddItemToText (xName (Item),
+ VdrProgramInfo->ExtendedText);
+ AddItemToText (Item->Text,
+ VdrProgramInfo->ExtendedText);
}
+ GotVdrProgramInfo = 1;
}
break;
@@ -132,37 +126,33 @@ struct LIST *createVdrProgramInfos (unsigned char *siBuffer)
{
int i, j;
- if (VdrProgramInfo)
+ for (j = 0; j < ((struct ContentDescriptor*)
+ Descriptor)->Amount; j++)
{
- for (j = 0; j < ((struct ContentDescriptor*)
- Descriptor)->Amount; j++)
- {
- VdrProgramInfo->ContentNibble1 =
- GetContentContentNibble1(Descriptor, j);
- VdrProgramInfo->ContentNibble2 =
- GetContentContentNibble2(Descriptor, j);
- }
+ VdrProgramInfo->ContentNibble1 =
+ GetContentContentNibble1(Descriptor, j);
+ VdrProgramInfo->ContentNibble2 =
+ GetContentContentNibble2(Descriptor, j);
}
+ GotVdrProgramInfo = 1;
}
break;
case DESCR_PARENTAL_RATING:
{
struct ParentalRating *Rating;
-
- if (VdrProgramInfo)
- {
- xForeach (((struct ParentalRatingDescriptor *)
- Descriptor)->Ratings, Rating)
- if (!strncmp (VdrProgramInfo->LanguageCode,
- Rating->LanguageCode, 3))
- VdrProgramInfo->Rating = Rating->Rating;
- }
+
+ xForeach (((struct ParentalRatingDescriptor *)
+ Descriptor)->Ratings, Rating)
+ if (!strncmp (VdrProgramInfo->LanguageCode,
+ Rating->LanguageCode, 3))
+ VdrProgramInfo->Rating = Rating->Rating;
+ GotVdrProgramInfo = 1;
}
break;
}
- }
- if (VdrProgramInfo) xAddTail (Result, VdrProgramInfo);
+ }
+ if (GotVdrProgramInfo) xAddTail (Result, VdrProgramInfo);
}
return (Result);