+2008-06-16 Zaheer Abbas Merali <zaheerabbas at merali dot org>
+
+ * gst/mpegtsparse/gstmpegdesc.h:
+ * gst/mpegtsparse/mpegtspacketizer.c:
+ Parse the extended event descriptor.
+
2008-06-16 Stefan Kost <ensonic@users.sf.net>
* gst/rtpmanager/gstrtpjitterbuffer.c:
#define DESC_DVB_SHORT_EVENT_description_text(desc) (desc + 6 + DESC_DVB_SHORT_EVENT_name_length(desc) + 1)
#define DESC_DVB_SHORT_EVENT_description_length(desc) (desc[6 + DESC_DVB_SHORT_EVENT_name_length(desc)])
+/* DVB Extended Event Descriptor */
+#define DESC_DVB_EXTENDED_EVENT_descriptor_number(desc) ((desc[2] & 0xF0) >> 4)
+#define DESC_DVB_EXTENDED_EVENT_last_descriptor_number(desc) (desc[2] & 0x0F)
+#define DESC_DVB_EXTENDED_EVENT_iso639_language_code(desc) (desc + 3)
+#define DESC_DVB_EXTENDED_EVENT_items_length(desc) (desc[6])
+#define DESC_DVB_EXTENDED_EVENT_items(desc) (desc + 7)
+#define DESC_DVB_EXTENDED_EVENT_text_length(desc) (desc[6 + DESC_DVB_EXTENDED_EVENT_items_length(desc)])
+#define DESC_DVB_EXTENDED_EVENT_text(desc) (desc + 6 + DESC_DVB_EXTENDED_EVENT_items_length(desc) + 1)
+
/* DVB Satellite Delivery System Descriptor */
#define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_frequency(desc) (desc + 2)
#define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_orbital_position(desc) (desc + 6)
if (descriptors_loop_length) {
guint8 *event_descriptor;
GArray *component_descriptors;
+ GArray *extended_event_descriptors;
GstMPEGDescriptor *mpegdescriptor;
if (data + descriptors_loop_length > end - 4) {
g_free (eventdescription_tmp);
}
}
+ extended_event_descriptors = gst_mpeg_descriptor_find_all (mpegdescriptor,
+ DESC_DVB_EXTENDED_EVENT);
+ if (extended_event_descriptors) {
+ int i;
+ guint8 *extended_descriptor;
+ /*GValue extended_items = { 0 }; */
+ gchar *extended_text = NULL;
+ /*g_value_init (&extended_items, GST_TYPE_LIST); */
+ for (i = 0; i < extended_event_descriptors->len; i++) {
+ extended_descriptor = g_array_index (extended_event_descriptors,
+ guint8 *, i);
+ if (DESC_DVB_EXTENDED_EVENT_descriptor_number (extended_descriptor) ==
+ i) {
+ if (extended_text) {
+ gchar *tmp;
+ gchar *old_extended_text = extended_text;
+ tmp =
+ g_strndup ((gchar *)
+ DESC_DVB_EXTENDED_EVENT_text (extended_descriptor),
+ DESC_DVB_EXTENDED_EVENT_text_length (extended_descriptor));
+ extended_text = g_strdup_printf ("%s%s", extended_text, tmp);
+ g_free (old_extended_text);
+ g_free (tmp);
+ } else {
+ extended_text =
+ g_strndup ((gchar *)
+ DESC_DVB_EXTENDED_EVENT_text (extended_descriptor),
+ DESC_DVB_EXTENDED_EVENT_text_length (extended_descriptor));
+ }
+ }
+ }
+ if (extended_text) {
+ gst_structure_set (event, "extended-text", G_TYPE_STRING,
+ extended_text, NULL);
+ g_free (extended_text);
+ }
+ g_array_free (extended_event_descriptors, TRUE);
+ }
+
component_descriptors = gst_mpeg_descriptor_find_all (mpegdescriptor,
DESC_DVB_COMPONENT);
if (component_descriptors) {