summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Àngel Farré <miquel.farre@gmail.com>2009-07-08 10:11:52 +0100
committerZaheer Abbas Merali <zaheerabbas@merali.org>2009-07-08 10:33:44 +0100
commitc90fccd98650561ffe512b26faafc348155104fb (patch)
tree22d9dbd6a497520ee280dfd0e58866234519f874
parent66a5549094b3e6bcffc1d7a40a95e9b6160d07bb (diff)
downloadgst-plugins-bad-c90fccd98650561ffe512b26faafc348155104fb.tar.gz
gst-plugins-bad-c90fccd98650561ffe512b26faafc348155104fb.tar.bz2
gst-plugins-bad-c90fccd98650561ffe512b26faafc348155104fb.zip
mpegtsparse: parse carousel identifier descriptor
-rw-r--r--gst/mpegdemux/gstmpegdesc.h4
-rw-r--r--gst/mpegdemux/mpegtspacketizer.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/gst/mpegdemux/gstmpegdesc.h b/gst/mpegdemux/gstmpegdesc.h
index 3f99b843..71b74aa2 100644
--- a/gst/mpegdemux/gstmpegdesc.h
+++ b/gst/mpegdemux/gstmpegdesc.h
@@ -78,6 +78,7 @@
#define DESC_DIRAC_TC_PRIVATE 0xAC
/* DVB tags */
+#define DESC_DVB_CAROUSEL_IDENTIFIER 0x13
#define DESC_DVB_NETWORK_NAME 0x40
#define DESC_DVB_SERVICE_LIST 0x41
#define DESC_DVB_STUFFING 0x42
@@ -315,6 +316,9 @@
#define DESC_DVB_DATA_BROADCAST_ID_data_broadcast_id(desc) (GST_READ_UINT16_BE((desc) + 2))
#define DESC_DVB_DATA_BROADCAST_ID_id_selector_byte(desc) (desc + 4)
+/* DVB Carousel Identifier Descriptor */
+#define DESC_DVB_CAROUSEL_IDENTIFIER_carousel_id(desc) (GST_READ_UINT32_BE((desc) + 2))
+
typedef struct {
guint n_desc;
guint8 data_length;
diff --git a/gst/mpegdemux/mpegtspacketizer.c b/gst/mpegdemux/mpegtspacketizer.c
index 8d8e3c1f..f7e55896 100644
--- a/gst/mpegdemux/mpegtspacketizer.c
+++ b/gst/mpegdemux/mpegtspacketizer.c
@@ -534,6 +534,14 @@ mpegts_packetizer_parse_pmt (MpegTSPacketizer * packetizer,
gst_structure_set (stream_info, "data-broadcast", GST_TYPE_STRUCTURE,
databroadcast_info, NULL);
}
+ desc_data =
+ gst_mpeg_descriptor_find (desc, DESC_DVB_CAROUSEL_IDENTIFIER);
+ if (desc_data) {
+ guint32 carousel_id;
+ carousel_id = DESC_DVB_CAROUSEL_IDENTIFIER_carousel_id (desc_data);
+ gst_structure_set (stream_info, "carousel-id", G_TYPE_UINT,
+ carousel_id, NULL);
+ }
gst_mpeg_descriptor_free (desc);
}