mpegtsparse: parse carousel identifier descriptor

This commit is contained in:
Miguel Àngel Farré 2009-07-08 10:11:52 +01:00 committed by Zaheer Abbas Merali
parent 66a5549094
commit c90fccd986
2 changed files with 12 additions and 0 deletions

View file

@ -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;

View file

@ -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);
}