summaryrefslogtreecommitdiff
path: root/libsi
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-05-16 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-05-16 18:00:00 +0200
commitc80a53ff6ea22aa14d1f9772b310b77ea0da7c42 (patch)
treec2c6d9dc5c939765abc61fb0f19de00f988aecc9 /libsi
parent9384e56566f56e77d577319a42929e708936e7c7 (diff)
downloadvdr-patch-lnbsharing-vdr-1.3.7.tar.gz
vdr-patch-lnbsharing-vdr-1.3.7.tar.bz2
Version 1.3.7vdr-1.3.7
- Fixed a memory leak in thread handling when using NPTL (thanks to Jon Burgess). - Fixed handling Setup.RecordDolbyDigital, which was broken since version 1.1.6. - Fixed handling text lengths for itemized EPG texts (thanks to Marcel Wiesweg). - Fixed the help for LSTE and LSTR (was broken in 1.3.6). - Improved iso8859-7 fonts (thanks to Dimitrios Dimitrakos). - Added some 3-letter language codes (thanks to Marcus Mönnig). - Added language code handling to the subtitling descriptor in 'libsi' (thanks to Pekka Virtanen). - Moved several menu item classes from menu.c to menuitems.[hc] to make them available for plugins. - The epg2html.pl script now handles '|' in description texts. - The new setup option "OSD/Use small font" can be used to control the use of the small font (see MANUAL for details). - Swapped osd.[hc] and osdbase.[hc] to have the virtual OSD base class named cOsd. Plugins may need to adjust their #include statements. - Colors are now given as AARRGGBB instead of AABBGGRR. The values are mapped to the driver's (wrong) sequence in dvbosd.c (this should really be fixed in the driver, together with the endian problem). - The new OSD setup parameters "Left" and "Top" can be used to define the top left corner of the OSD. - The OSD size parameters are now in pixel (as opposed to formerly characters). When reading a 'setup.conf' file from an older version of VDR, the OSDwidth and OSDheight values will be converted to pixel automatically. - The OSD is now fully device independent. See the comments in VDR/osd.h and the description in PLUGINS.html for information on how a plugin can implement an OSD display on arbitrary hardware. - The OSD (actually its cBitmap class) can now handle XPM files. There are several XPM files in the VDR/symbols directory which can be used by skins (some of these have been taken from the "elchi" patch). See VDR/skinsttng.c for examples on how to use these. - Due to the changes in the OSD handling the DEBUG_OSD option for a textual OSD has been dropped. There will be a plugin that implements a skin with this functionality later. - The entire OSD display can now be implemented via "skins". See VDR/skins.[hc], VDR/skinclassic.[hc], VDR/skinsttng.[hc] and PLUGINS.html for information on how a plugin can implement its own skin. By default VDR comes with a "Classic" skin that implements the OSD display known from previous versions, and the new skin named "ST:TNG Panels", which is also the default skin now. The actual skin can be selected through "Setup/OSD/Skin". - The colors used in a skin can now be configured using "themes". See PLUGINS.html for information on how a skin can make use of themes, and man vdr(5) for the structure of a theme file. The actual theme to use can be selected through "Setup/OSD/Theme". - Added Croatian language texts (thanks to Drazen Dupor). NOTE: there is apparently a problem with the newly introduced iso8859-2 font, because as soon as Setup/OSD/Language is set to Croatian (currently the last one in the list) everything freezes and the vdr processes have to be killed with -9 and the driver needs to be reloaded. Maybe somebody else can find out what's going wrong here... - Added missing NULL checks when accessing sectionHandler in device.c (thanks to Pekka Virtanen). - Fixed setting the time from the DVB data stream (thanks to Helmut Auer for pointing out a frequency/transponder handling mixup). This now also takes the actual source (sat, cable etc.) into account. Please go into "Setup/EPG" and set the "Set system time" and "Use time from transponder" parameters accordingly (this is necessary even if you have already set them before!).
Diffstat (limited to 'libsi')
-rw-r--r--libsi/descriptor.c22
-rw-r--r--libsi/descriptor.h7
2 files changed, 18 insertions, 11 deletions
diff --git a/libsi/descriptor.c b/libsi/descriptor.c
index 82e2a8f..685722e 100644
--- a/libsi/descriptor.c
+++ b/libsi/descriptor.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: descriptor.c 1.10 2004/03/13 15:08:12 kls Exp $
+ * $Id: descriptor.c 1.12 2004/03/26 15:25:28 kls Exp $
* *
***************************************************************************/
@@ -78,12 +78,13 @@ void ExtendedEventDescriptor::Item::Parse() {
return ret;
}*/
-int ExtendedEventDescriptors::getMaximumTextLength() {
- return getMaximumTextPlainLength()+getMaximumTextItemizedLength();
+int ExtendedEventDescriptors::getMaximumTextLength(const char *separation1, const char *separation2) {
+ //add length of plain text, of itemized text with separators, and for one separator between the two fields.
+ return getMaximumTextPlainLength()+getMaximumTextItemizedLength(separation1, separation2)+strlen(separation2);
}
char *ExtendedEventDescriptors::getText(const char *separation1, const char *separation2) {
- char *text=new char[getMaximumTextLength()+strlen(separation1)+strlen(separation2)];
+ char *text=new char[getMaximumTextLength(separation1, separation2)];
return getText(text, separation1, separation2);
}
@@ -171,20 +172,21 @@ char *ExtendedEventDescriptors::getTextPlain(char *buffer) {
return buffer;
}
-int ExtendedEventDescriptors::getMaximumTextItemizedLength() {
+int ExtendedEventDescriptors::getMaximumTextItemizedLength(const char *separation1, const char *separation2) {
int ret=0;
+ int sepLength=strlen(separation1)+strlen(separation2)-2;
for (int i=0;i<length;i++) {
ExtendedEventDescriptor *d=(ExtendedEventDescriptor *)array[i];
if (!d)
continue;
- //the size for the two separating characters is included ;-)
- ret+=d->itemLoop.getLength();
+ //The length includes two 8-bit length fields which have already been subtracted from sepLength
+ ret+=d->itemLoop.getLength()+sepLength;
}
return ret;
}
char *ExtendedEventDescriptors::getTextItemized(const char *separation1, const char *separation2) {
- char *text=new char[getMaximumTextItemizedLength()+strlen(separation1)+strlen(separation2)];
+ char *text=new char[getMaximumTextItemizedLength(separation1, separation2)];
return getTextItemized(text, separation1, separation2);
}
@@ -547,6 +549,10 @@ int SubtitlingDescriptor::Subtitling::getAncillaryPageId() const {
void SubtitlingDescriptor::Subtitling::Parse() {
s=data.getData<const item_subtitling>();
+ languageCode[0]=s->lang_code1;
+ languageCode[1]=s->lang_code2;
+ languageCode[2]=s->lang_code3;
+ languageCode[3]=0;
}
int ServiceMoveDescriptor::getNewOriginalNetworkId() const {
diff --git a/libsi/descriptor.h b/libsi/descriptor.h
index 3368b0a..db3bba6 100644
--- a/libsi/descriptor.h
+++ b/libsi/descriptor.h
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: descriptor.h 1.7 2004/03/07 11:13:54 kls Exp $
+ * $Id: descriptor.h 1.9 2004/03/26 15:26:03 kls Exp $
* *
***************************************************************************/
@@ -50,7 +50,7 @@ private:
class ExtendedEventDescriptors : public DescriptorGroup {
public:
- int getMaximumTextLength();
+ int getMaximumTextLength(const char *separation1="\t", const char *separation2="\n");
//Returns a concatenated version of first the non-itemized and then the itemized text
//same semantics as with SI::String
char *getText(const char *separation1="\t", const char *separation2="\n");
@@ -66,7 +66,7 @@ public:
//Between the description and the text the separation1 character is used,
//separation2 used between two pairs. Example:
//Director\tSteven Spielberg\nActor\tMichael Mendl\n
- int getMaximumTextItemizedLength();
+ int getMaximumTextItemizedLength(const char *separation1="\t", const char *separation2="\n");
char *getTextItemized(const char *separation1="\t", const char *separation2="\n");
char *getTextItemized(char *buffer, const char *separation1="\t", const char *separation2="\n");
//returns the itemized text pair by pair. Maximum length for buffers is 256.
@@ -285,6 +285,7 @@ class SubtitlingDescriptor : public Descriptor {
public:
class Subtitling : public Descriptor {
public:
+ char languageCode[4];
int getSubtitlingType() const;
int getCompositionPageId() const;
int getAncillaryPageId() const;