summaryrefslogtreecommitdiff
path: root/libdtv/libsi
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-10-21 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-10-21 18:00:00 +0200
commit8465398c6d2a57bc30a07fb61353a7c8ba6db574 (patch)
treef2e14e51ab0a43ebd3c148376c5be73f4bd1434d /libdtv/libsi
parent66bab90b60048a46e401ea506d3aa65c43779700 (diff)
downloadvdr-patch-lnbsharing-8465398c6d2a57bc30a07fb61353a7c8ba6db574.tar.gz
vdr-patch-lnbsharing-8465398c6d2a57bc30a07fb61353a7c8ba6db574.tar.bz2
Version 0.97vdr-0.97
- Implemented a lock file to prevent more than one instance of VDR from removing files from the video directory at the same time. - The new setup parameter SplitEditedFiles can be used to control whether or not the result of an editing process shall be written into separate files. - Fixed handling repeat function when using LIRC (thanks to Matthias Weingart). - The shutdown program (defined with the '-s' option) now also gets the channel number and recording title of the timer (see INSTALL). - New channel data for 'Premiere One', 'Premiere X-Action', 'Fox Kids Türkce' and 'N24' (thanks to Andreas Share, Ulrich Röder, Uwe Scheffler and Simon Bauschulte). Note that if you are using the default 'channels.conf' or 'channels.conf.cable' files you may need to check any exiting timers to see whether they still use the correct channel number. - Fixed the "EPG bugfix" (sometimes had duplicate information in Subtitle and Extended Description). - Fixed checking for valid video device when setting the video mode. - The external command 'sort' is no longer required. VDR now sorts the list of recordings itself, making sure that recordings that stem from repeating timers are sorted chronologically. Sorting is done according to the setting of the current locale, so you may want to make sure LC_COLLATE is set to the desired value (see INSTALL). - Fixed handling 'newline' characters in EPG texts (thanks to Rolf Hakenes for an improved version of his 'libdtv'). Newline characters are always mapped to a single "blank" in VDR, because they would otherwise disturb the Title and Subtitle layout in the channel display (where these are assumed to be single line texts) and would have to be specially handled in the 'epg.data' file and the LSTE command in SVDRP. - Mapping ` ("backtick") characters in EPG texts to ' (single quote). - Fixed timers starting and ending at unexpected times. 'localtime()' was not thread safe, now using localtime_r(). - Removed the "system time seen..." message. - Fixed a bug in the replay mode display when pressing the Green or Yellow button while in trick mode (thanks to Stefan Huelswitt) - Closing all open file descriptors when calling external programs. - The menu timeout now also works when pressing the "Back" button during replay to enter the "Recordings" menu. - Updated 'channels.conf' for the "Bundesliga" channels of Premiere World (thanks to Helmut Schächner). - Fixed reading timers.conf and channels.conf that contain blanks after numeric values. - Fixed handling trick modes near the beginning and end of a recording. - Pressing the "Back" button while replaying a DVD now leads to the DVD menu.
Diffstat (limited to 'libdtv/libsi')
-rw-r--r--libdtv/libsi/Makefile8
-rw-r--r--libdtv/libsi/include/libsi.h178
-rw-r--r--libdtv/libsi/include/si_tables.h66
-rw-r--r--libdtv/libsi/si_debug_services.c62
-rw-r--r--libdtv/libsi/si_debug_services.h2
-rw-r--r--libdtv/libsi/si_parser.c72
6 files changed, 340 insertions, 48 deletions
diff --git a/libdtv/libsi/Makefile b/libdtv/libsi/Makefile
index 4b939b9..38bff93 100644
--- a/libdtv/libsi/Makefile
+++ b/libdtv/libsi/Makefile
@@ -4,9 +4,9 @@
### ###
##############################################################
-## $Revision: 1.1 $
-## $Date: 2001/08/15 14:47:22 $
-## $Author: kls $
+## $Revision: 1.4 $
+## $Date: 2001/10/07 10:24:46 $
+## $Author: hakenes $
##
## (C) 2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
##
@@ -80,4 +80,4 @@ $(SILIB) : $(OBJS)
@echo compiling $<...
@$(CC) $(DEFINES) $(CFLAGS) $(INCDIRS) -c $<
-include Makefile.dep
+-include Makefile.dep
diff --git a/libdtv/libsi/include/libsi.h b/libdtv/libsi/include/libsi.h
index 3790ae1..dda2b1e 100644
--- a/libdtv/libsi/include/libsi.h
+++ b/libdtv/libsi/include/libsi.h
@@ -4,9 +4,9 @@
/// ///
//////////////////////////////////////////////////////////////
-// $Revision: 1.1 $
-// $Date: 2001/06/26 07:18:43 $
-// $Author: kls $
+// $Revision: 1.4 $
+// $Date: 2001/10/07 10:24:46 $
+// $Author: hakenes $
//
// (C) 2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
//
@@ -288,18 +288,20 @@ struct PidInfo {
} while (0)
-#define STREAMTYPE_ISO_VIDEO 1
+#define STREAMTYPE_11172_VIDEO 1
#define STREAMTYPE_13818_VIDEO 2
#define STREAMTYPE_11172_AUDIO 3
#define STREAMTYPE_13818_AUDIO 4
-#define STREAMTYPE_VIDEOTEXT 6
-#define STREAMTYPE_13522_MPEG 7
-#define STREAMTYPE_ITU_222 8
-#define STREAMTYPE_13818_A 9
-#define STREAMTYPE_13818_B 10
-#define STREAMTYPE_13818_C 11
-#define STREAMTYPE_13818_D 12
-#define STREAMTYPE_13818_AUX 13
+#define STREAMTYPE_13818_PRIVATE 5
+#define STREAMTYPE_13818_PES_PRIVATE 6
+#define STREAMTYPE_13522_MHPEG 7
+#define STREAMTYPE_13818_DSMCC 8
+#define STREAMTYPE_ITU_222_1 9
+#define STREAMTYPE_13818_A 10
+#define STREAMTYPE_13818_B 11
+#define STREAMTYPE_13818_C 12
+#define STREAMTYPE_13818_D 13
+#define STREAMTYPE_13818_AUX 14
/* Descriptors */
@@ -331,6 +333,58 @@ struct Iso639LanguageDescriptor {
} while (0)
+/* Ac3Descriptor */
+
+#define AC3_TYPE_FLAG 0x0001
+#define BS_ID_FLAG 0x0002
+#define MAIN_ID_FLAG 0x0004
+#define ASVC_FLAG 0x0008
+
+struct Ac3Descriptor {
+ struct NODE Node;
+ unsigned short Tag;
+ unsigned short PresentFlags;
+ unsigned short Ac3Type;
+ unsigned short BsId;
+ unsigned short MainId;
+ unsigned short Asvc;
+ unsigned short Amount; /* AdditionalData */
+ unsigned char *AdditionalData;
+};
+
+#define CreateAc3Descriptor(descr) \
+ do \
+ { \
+ xCreateNode (((struct Ac3Descriptor *)descr), NULL); \
+ ((struct Ac3Descriptor *)descr)->Tag = DESCR_AC3; \
+ } while (0)
+
+#define AddAc3FlagAndValue(descr, flg, val) \
+ do \
+ { \
+ if ((flg) & AC3_TYPE_FLAG) { \
+ ((struct Ac3Descriptor *)descr)->PresentFlags |= AC3_TYPE_FLAG; \
+ ((struct Ac3Descriptor *)descr)->Ac3Type = (val); } \
+ else if ((flg) & BS_ID_FLAG) { \
+ ((struct Ac3Descriptor *)descr)->PresentFlags |= BS_ID_FLAG; \
+ ((struct Ac3Descriptor *)descr)->BsId = (val); } \
+ else if ((flg) & MAIN_ID_FLAG) { \
+ ((struct Ac3Descriptor *)descr)->PresentFlags |= MAIN_ID_FLAG; \
+ ((struct Ac3Descriptor *)descr)->MainId = (val); } \
+ else if ((flg) & ASVC_FLAG) { \
+ ((struct Ac3Descriptor *)descr)->PresentFlags |= ASVC_FLAG; \
+ ((struct Ac3Descriptor *)descr)->Asvc = (val); } \
+ } while (0)
+
+#define AddAc3AdditionalData(descr, ptr, len) \
+ do \
+ { \
+ xMemAlloc ((len)+1, &(((struct Ac3Descriptor *) \
+ descr)->AdditionalData)); \
+ memcpy ((((struct Ac3Descriptor *)descr)->AdditionalData),(ptr),(len)); \
+ } while (0)
+
+
/* AncillaryDataDescriptor */
struct AncillaryDataDescriptor {
@@ -778,6 +832,106 @@ struct ShortEventDescriptor {
} while (0)
+/* TeletextDescriptor */
+
+struct TeletextDescriptor {
+ struct NODE Node;
+ unsigned short Tag;
+ struct LIST *Items;
+};
+
+#define CreateTeletextDescriptor(descr) \
+ do \
+ { \
+ xCreateNode (((struct TeletextDescriptor *)descr), NULL); \
+ ((struct TeletextDescriptor *)descr)->Tag = DESCR_TELETEXT; \
+ ((struct TeletextDescriptor *)descr)->Items = xNewList (NULL); \
+ } while (0)
+
+#define TELETEXT_TYPE_INITIAL_PAGE 0x0001
+#define TELETEXT_TYPE_SUBTITLE_PAGE 0x0002
+#define TELETEXT_TYPE_ADDITIONAL_INFO 0x0003
+#define TELETEXT_TYPE_PROGRAM_SCHEDULE 0x0004
+#define TELETEXT_TYPE_HEARING_IMPAIRED 0x0005
+
+struct TeletextItem {
+ struct NODE Node;
+ char LanguageCode[4];
+ unsigned short Type;
+ unsigned short MagazineNumber;
+ unsigned short PageNumber;
+};
+
+#define CreateTeletextItem(itm, tp, mg, pg, lc1, lc2, lc3) \
+ do \
+ { \
+ xCreateNode (itm, NULL); \
+ ((struct TeletextItem *)itm)->Type = (tp); \
+ ((struct TeletextItem *)itm)->MagazineNumber = (mg); \
+ ((struct TeletextItem *)itm)->PageNumber = (mg); \
+ ((struct TeletextItem *)itm)->LanguageCode[0] = (lc1); \
+ ((struct TeletextItem *)itm)->LanguageCode[1] = (lc2); \
+ ((struct TeletextItem *)itm)->LanguageCode[2] = (lc3); \
+ ((struct TeletextItem *)itm)->LanguageCode[3] = '\0'; \
+ } while (0)
+
+#define AddTeletextItem(desc, tp, mg, pg, lc1, lc2, lc3) \
+ do \
+ { \
+ struct TeletextItem *item; \
+ \
+ CreateTeletextItem(item, tp, mg, pg, lc1, lc2, lc3); \
+ xAddTail (((struct TeletextDescriptor *)desc)->Items, item); \
+ } while (0)
+
+
+/* SubtitlingDescriptor */
+
+struct SubtitlingDescriptor {
+ struct NODE Node;
+ unsigned short Tag;
+ struct LIST *Items;
+};
+
+#define CreateSubtitlingDescriptor(descr) \
+ do \
+ { \
+ xCreateNode (((struct SubtitlingDescriptor *)descr), NULL); \
+ ((struct SubtitlingDescriptor *)descr)->Tag = DESCR_SUBTITLING; \
+ ((struct SubtitlingDescriptor *)descr)->Items = xNewList (NULL); \
+ } while (0)
+
+struct SubtitlingItem {
+ struct NODE Node;
+ char LanguageCode[4];
+ unsigned char Type;
+ unsigned short CompositionPageId;
+ unsigned short AncillaryPageId;
+};
+
+#define CreateSubtitlingItem(itm, tp, cp, ap, lc1, lc2, lc3) \
+ do \
+ { \
+ xCreateNode (itm, NULL); \
+ ((struct SubtitlingItem *)itm)->Type = (tp); \
+ ((struct SubtitlingItem *)itm)->CompositionPageId = (cp); \
+ ((struct SubtitlingItem *)itm)->AncillaryPageId = (ap); \
+ ((struct SubtitlingItem *)itm)->LanguageCode[0] = (lc1); \
+ ((struct SubtitlingItem *)itm)->LanguageCode[1] = (lc2); \
+ ((struct SubtitlingItem *)itm)->LanguageCode[2] = (lc3); \
+ ((struct SubtitlingItem *)itm)->LanguageCode[3] = '\0'; \
+ } while (0)
+
+#define AddSubtitlingItem(desc, tp, cp, ap, lc1, lc2, lc3) \
+ do \
+ { \
+ struct SubtitlingItem *item; \
+ \
+ CreateSubtitlingItem(item, tp, cp, ap, lc1, lc2, lc3); \
+ xAddTail (((struct SubtitlingDescriptor *)desc)->Items, item); \
+ } while (0)
+
+
/* Prototypes */
diff --git a/libdtv/libsi/include/si_tables.h b/libdtv/libsi/include/si_tables.h
index 517838a..dfda3bf 100644
--- a/libdtv/libsi/include/si_tables.h
+++ b/libdtv/libsi/include/si_tables.h
@@ -5,9 +5,9 @@
/// ///
//////////////////////////////////////////////////////////////
-// $Revision: 1.1 $
-// $Date: 2001/06/25 12:41:20 $
-// $Author: kls $
+// $Revision: 1.3 $
+// $Date: 2001/10/07 10:24:46 $
+// $Author: hakenes $
//
// (C) 2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
//
@@ -26,9 +26,6 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
-#ifndef SI_TABLES_H
-#define SI_TABLES_H
-
#define HILO(x) (x##_hi << 8 | x##_lo)
#define MjdToEpochTime(x) (((x##_hi << 8 | x##_lo)-40587)*86400)
@@ -930,14 +927,29 @@ typedef struct parental_rating_struct {
/* 0x56 teletext_descriptor */
-#define DESCR_TELETEXT_LEN XX
+#define DESCR_TELETEXT_LEN 2
typedef struct descr_teletext_struct {
u_char descriptor_tag :8;
u_char descriptor_length :8;
- /* TBD */
} descr_teletext_t;
#define CastTeletextDescriptor(x) ((descr_teletext_t *)(x))
+#define ITEM_TELETEXT_LEN 5
+typedef struct item_teletext_struct {
+ u_char lang_code1 :8;
+ u_char lang_code2 :8;
+ u_char lang_code3 :8;
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char type :5;
+ u_char magazine_number :3;
+#else
+ u_char magazine_number :3;
+ u_char type :5;
+#endif
+ u_char page_number :8;
+} item_teletext_t;
+#define CastTeletextItem(x) ((item_teletext_t *)(x))
+
/* 0x57 telephone_descriptor */
@@ -963,14 +975,26 @@ typedef struct descr_local_time_offset_struct {
/* 0x59 subtitling_descriptor */
-#define DESCR_SUBTITLING_LEN XX
+#define DESCR_SUBTITLING_LEN 2
typedef struct descr_subtitling_struct {
u_char descriptor_tag :8;
u_char descriptor_length :8;
- /* TBD */
} descr_subtitling_t;
#define CastSubtitlingDescriptor(x) ((descr_subtitling_t *)(x))
+#define ITEM_SUBTITLING_LEN 8
+typedef struct item_subtitling_struct {
+ u_char lang_code1 :8;
+ u_char lang_code2 :8;
+ u_char lang_code3 :8;
+ u_char subtitling_type :8;
+ u_char composition_page_id_hi :8;
+ u_char composition_page_id_lo :8;
+ u_char ancillary_page_id_hi :8;
+ u_char ancillary_page_id_lo :8;
+} item_subtitling_t;
+#define CastSubtitlingItem(x) ((item_subtitling_t *)(x))
+
/* 0x5A terrestrial_delivery_system_descriptor */
@@ -1150,11 +1174,27 @@ typedef struct descr_pdc_struct {
/* 0x6A ac3_descriptor */
-#define DESCR_AC3_LEN XX
+#define DESCR_AC3_LEN 3
typedef struct descr_ac3_struct {
u_char descriptor_tag :8;
u_char descriptor_length :8;
- /* TBD */
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char ac3_type_flag :1;
+ u_char bsid_flag :1;
+ u_char mainid_flag :1;
+ u_char asvc_flag :1;
+ u_char reserved :4;
+#else
+ u_char reserved :4;
+ u_char asvc_flag :1;
+ u_char mainid_flag :1;
+ u_char bsid_flag :1;
+ u_char ac3_type_flag :1;
+#endif
+ u_char ac3_type :8;
+ u_char bsid :8;
+ u_char mainid :8;
+ u_char asvc :8;
} descr_ac3_t;
#define CastAc3Descriptor(x) ((descr_ac3_t *)(x))
@@ -1202,4 +1242,4 @@ typedef struct descr_announcement_support_struct {
} descr_announcement_support_t;
#define CastAnnouncementSupportDescriptor(x) ((descr_announcement_support_t *)(x))
-#endif
+
diff --git a/libdtv/libsi/si_debug_services.c b/libdtv/libsi/si_debug_services.c
index dd09cff..ae2a92a 100644
--- a/libdtv/libsi/si_debug_services.c
+++ b/libdtv/libsi/si_debug_services.c
@@ -4,9 +4,9 @@
/// ///
//////////////////////////////////////////////////////////////
-// $Revision: 1.1 $
-// $Date: 2001/08/15 14:40:55 $
-// $Author: kls $
+// $Revision: 1.4 $
+// $Date: 2001/10/07 10:24:46 $
+// $Author: hakenes $
//
// (C) 2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
//
@@ -34,8 +34,6 @@
#include "si_debug_services.h"
-
-
void siDebugServices (struct LIST *Services)
{
struct Service *Service;
@@ -328,9 +326,9 @@ void siDebugDescriptors (char *Prepend, struct LIST *Descriptors)
((struct ExtendedEventDescriptor *)Descriptor)->LanguageCode);
xForeach (((struct ExtendedEventDescriptor *)Descriptor)->Items, Item)
{
- printf ("%s Item:\n");
- printf ("%s Description: %s\n", xName(Item));
- printf ("%s Text: %s\n", Item->Text);
+ printf ("%s Item:\n", Prepend);
+ printf ("%s Description: %s\n", Prepend, xName(Item));
+ printf ("%s Text: %s\n", Prepend, Item->Text);
}
}
break;
@@ -445,6 +443,52 @@ void siDebugDescriptors (char *Prepend, struct LIST *Descriptors)
}
break;
+ case DESCR_TELETEXT:
+ {
+ struct TeletextItem *Item;
+
+ printf ("%sDescriptor: Teletext\n", Prepend);
+ xForeach (((struct TeletextDescriptor *)Descriptor)->Items, Item)
+ {
+ printf ("%s Item:\n");
+ printf ("%s LanguageCode: %s\n", Prepend, Item->LanguageCode);
+ printf ("%s Type: ", Prepend);
+ switch (Item->Type)
+ {
+ case 0x01: printf ("initial Teletext page\n"); break;
+ case 0x02: printf ("Teletext subtitle page\n"); break;
+ case 0x03: printf ("additional information page\n"); break;
+ case 0x04: printf ("programme schedule page\n"); break;
+ case 0x05: printf ("Teletext subtitle page ");
+ printf ("for hearing impaired people\n"); break;
+ default: printf ("reserved for future use\n"); break;
+ }
+ printf ("%s MagazineNumber: %x\n", Prepend, Item->MagazineNumber);
+ printf ("%s PageNumber: %x\n", Prepend, Item->PageNumber);
+ }
+ }
+ break;
+
+ case DESCR_SUBTITLING:
+ {
+ struct SubtitlingItem *Item;
+
+ printf ("%sDescriptor: Subtitling\n", Prepend);
+ xForeach (((struct SubtitlingDescriptor *)Descriptor)->Items, Item)
+ {
+ printf ("%s Item:\n");
+ printf ("%s LanguageCode: %s\n", Prepend, Item->LanguageCode);
+ printf ("%s Type: ", Prepend);
+ for (i = 0; i < COMPONENT_TYPE_NUMBER; i++)
+ if ((0x03 == ComponentTypes[i].Content) &&
+ (Item->Type == ComponentTypes[i].Type))
+ { printf ("%s\n", ComponentTypes[i].Description); break; }
+ printf ("%s CompositionPageId: %x\n", Prepend, Item->CompositionPageId);
+ printf ("%s AncillaryPageId: %x\n", Prepend, Item->AncillaryPageId);
+ }
+ }
+ break;
+
case DESCR_NW_NAME:
case DESCR_SERVICE_LIST:
case DESCR_STUFFING:
@@ -453,10 +497,8 @@ void siDebugDescriptors (char *Prepend, struct LIST *Descriptors)
case DESCR_VBI_DATA:
case DESCR_VBI_TELETEXT:
case DESCR_MOSAIC:
- case DESCR_TELETEXT:
case DESCR_TELEPHONE:
case DESCR_LOCAL_TIME_OFF:
- case DESCR_SUBTITLING:
case DESCR_TERR_DEL_SYS:
case DESCR_ML_NW_NAME:
case DESCR_ML_BQ_NAME:
diff --git a/libdtv/libsi/si_debug_services.h b/libdtv/libsi/si_debug_services.h
index 33528db..cd4f196 100644
--- a/libdtv/libsi/si_debug_services.h
+++ b/libdtv/libsi/si_debug_services.h
@@ -6,7 +6,7 @@
// $Revision: 1.1 $
// $Date: 2001/06/25 12:29:47 $
-// $Author: kls $
+// $Author: hakenes $
//
// (C) 2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
//
diff --git a/libdtv/libsi/si_parser.c b/libdtv/libsi/si_parser.c
index acafa7b..76d72c8 100644
--- a/libdtv/libsi/si_parser.c
+++ b/libdtv/libsi/si_parser.c
@@ -4,9 +4,9 @@
/// ///
//////////////////////////////////////////////////////////////
-// $Revision: 1.1 $
-// $Date: 2001/08/15 14:41:45 $
-// $Author: kls $
+// $Revision: 1.4 $
+// $Date: 2001/10/07 10:24:46 $
+// $Author: hakenes $
//
// (C) 2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
//
@@ -725,6 +725,62 @@ void siParseDescriptor (struct LIST *Descriptors, u_char *Buffer)
Ptr + DESCR_LINKAGE_LEN);
break;
+ case DESCR_TELETEXT:
+ CreateTeletextDescriptor (Descriptor);
+ Length = GetDescriptorLength (Buffer) - DESCR_TELETEXT_LEN;
+ Ptr += DESCR_TELETEXT_LEN;
+ while (Length > 0)
+ {
+ AddTeletextItem (Descriptor,
+ CastTeletextItem(Ptr)->type,
+ CastTeletextItem(Ptr)->magazine_number,
+ CastTeletextItem(Ptr)->page_number,
+ CastTeletextItem(Ptr)->lang_code1,
+ CastTeletextItem(Ptr)->lang_code2,
+ CastTeletextItem(Ptr)->lang_code3);
+ Length -= ITEM_TELETEXT_LEN;
+ Ptr += ITEM_TELETEXT_LEN;
+ }
+ break;
+
+ case DESCR_AC3:
+ CreateAc3Descriptor (Descriptor);
+ Length = GetDescriptorLength (Buffer);
+ if (CastAc3Descriptor(Buffer)->ac3_type_flag)
+ { Length -= 1; Ptr += 1; AddAc3FlagAndValue (Descriptor,
+ AC3_TYPE_FLAG, CastAc3Descriptor(Buffer)->ac3_type); }
+ if (CastAc3Descriptor(Buffer)->bsid_flag)
+ { Length -= 1; Ptr += 1; AddAc3FlagAndValue (Descriptor,
+ BS_ID_FLAG, CastAc3Descriptor(Buffer)->bsid); }
+ if (CastAc3Descriptor(Buffer)->mainid_flag)
+ { Length -= 1; Ptr += 1; AddAc3FlagAndValue (Descriptor,
+ MAIN_ID_FLAG, CastAc3Descriptor(Buffer)->mainid); }
+ if (CastAc3Descriptor(Buffer)->asvc_flag)
+ { Length -= 1; Ptr += 1; AddAc3FlagAndValue (Descriptor,
+ ASVC_FLAG, CastAc3Descriptor(Buffer)->asvc); }
+ Length -= DESCR_AC3_LEN;
+ Ptr += DESCR_AC3_LEN;
+ if (Length) AddAc3AdditionalData (Descriptor, Ptr, Length);
+ break;
+
+ case DESCR_SUBTITLING:
+ CreateSubtitlingDescriptor (Descriptor);
+ Length = GetDescriptorLength (Buffer) - DESCR_SUBTITLING_LEN;
+ Ptr += DESCR_SUBTITLING_LEN;
+ while (Length > 0)
+ {
+ AddSubtitlingItem (Descriptor,
+ CastSubtitlingItem(Ptr)->subtitling_type,
+ HILO (CastSubtitlingItem(Ptr)->composition_page_id),
+ HILO (CastSubtitlingItem(Ptr)->ancillary_page_id),
+ CastSubtitlingItem(Ptr)->lang_code1,
+ CastSubtitlingItem(Ptr)->lang_code2,
+ CastSubtitlingItem(Ptr)->lang_code3);
+ Length -= ITEM_SUBTITLING_LEN;
+ Ptr += ITEM_SUBTITLING_LEN;
+ }
+ break;
+
case DESCR_VIDEO_STREAM:
case DESCR_AUDIO_STREAM:
case DESCR_HIERARCHY:
@@ -748,10 +804,8 @@ void siParseDescriptor (struct LIST *Descriptors, u_char *Buffer)
case DESCR_VBI_DATA:
case DESCR_VBI_TELETEXT:
case DESCR_MOSAIC:
- case DESCR_TELETEXT:
case DESCR_TELEPHONE:
case DESCR_LOCAL_TIME_OFF:
- case DESCR_SUBTITLING:
case DESCR_TERR_DEL_SYS:
case DESCR_ML_NW_NAME:
case DESCR_ML_BQ_NAME:
@@ -768,7 +822,6 @@ void siParseDescriptor (struct LIST *Descriptors, u_char *Buffer)
case DESCR_TRANSPORT_STREAM:
case DESCR_DSNG:
case DESCR_PDC:
- case DESCR_AC3:
case DESCR_CELL_LIST:
case DESCR_CELL_FREQ_LINK:
case DESCR_ANNOUNCEMENT_SUPPORT:
@@ -799,8 +852,11 @@ char *siGetDescriptorText (u_char *Buffer, u_int Length)
if (*Buffer == 0) break;
if ((*Buffer >= ' ' && *Buffer <= '~') ||
- (*Buffer >= 0xa0 && *Buffer <= 0xff)) *tmp++ = *Buffer++;
- else Buffer++;
+ (*Buffer == '\n') ||
+ (*Buffer >= 0xa0 && *Buffer <= 0xff)) *tmp++ = *Buffer;
+ if (*Buffer == 0x8A) *tmp++ = '\n';
+ if (*Buffer == 0x86 || *Buffer == 0x87) *tmp++ = ' ';
+ Buffer++;
}
*tmp = '\0';
}