gst_mpegts_descriptor_parse_dvb_stream_identifier
<SUBSECTION ca_identifier>
gst_mpegts_descriptor_parse_dvb_ca_identifier
+<SUBSECTION service_list>
+GstMpegTsDVBServiceListItem
+gst_mpegts_descriptor_parse_dvb_service_list
<SUBSECTION Standard>
GST_TYPE_MPEG_TSDVB_CODE_RATE
gst_mpegts_dvb_code_rate_get_type
return descriptor;
}
+/* GST_MTS_DESC_DVB_SERVICE_LIST (0x41) */
+static void
+_gst_mpegts_dvb_service_list_item_free (GstMpegTsDVBServiceListItem * item)
+{
+ g_slice_free (GstMpegTsDVBServiceListItem, item);
+}
+
+/**
+ * gst_mpegts_descriptor_parse_dvb_service_list:
+ * @descriptor: a %GST_MTS_DESC_DVB_SERVICE_LIST #GstMpegTsDescriptor
+ * @list: (out) (transfer full) (element-type GstMpegTsDVBServiceListItem):
+ * the list of services
+ *
+ * Parses out a list of services from the @descriptor:
+ *
+ * Returns: %TRUE if the parsing happened correctly, else %FALSE.
+ */
+gboolean
+gst_mpegts_descriptor_parse_dvb_service_list (const GstMpegTsDescriptor *
+ descriptor, GPtrArray ** list)
+{
+ guint8 *data, i;
+
+ g_return_val_if_fail (descriptor != NULL && list != NULL, FALSE);
+ /* a entry has 3 bytes, 2 for service id, 1 for service type */
+ __common_desc_checks (descriptor, GST_MTS_DESC_DVB_SERVICE_LIST, 3, FALSE);
+
+ data = (guint8 *) descriptor->data + 2;
+
+ *list = g_ptr_array_new_with_free_func ((GDestroyNotify)
+ _gst_mpegts_dvb_service_list_item_free);
+
+ for (i = 0; i < descriptor->length - 2; i += 3) {
+ GstMpegTsDVBServiceListItem *item =
+ g_slice_new0 (GstMpegTsDVBServiceListItem);
+
+ g_ptr_array_add (*list, item);
+ item->service_id = GST_READ_UINT16_BE (data);
+ data += 2;
+
+ item->type = *data;
+ data += 1;
+ }
+
+ return TRUE;
+}
+
/* GST_MTS_DESC_DVB_SATELLITE_DELIVERY_SYSTEM (0x43) */
/**
* gst_mpegts_descriptor_parse_satellite_delivery_system:
const gchar * service_name,
const gchar * service_provider);
+/* GST_MTS_DESC_DVB_SERVICE_LIST (0x41) */
+typedef struct _GstMpegTsDVBServiceListItem GstMpegTsDVBServiceListItem;
+
+/**
+ * GstMpegTsDVBServiceListItem:
+ * @service_id: the id of a service
+ * @type: the type of a service
+ */
+struct _GstMpegTsDVBServiceListItem
+{
+ guint16 service_id;
+ GstMpegTsDVBServiceType type;
+};
+
+gboolean gst_mpegts_descriptor_parse_dvb_service_list (const GstMpegTsDescriptor * descriptor,
+ GPtrArray ** list);
+
/* GST_MTS_DESC_DVB_LINKAGE (0x4A) */
/**
* GstMpegTsDVBLinkageType: