summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorStefan Ringel <linuxtv@stefanringel.de>2014-07-04 14:04:47 +0200
committerEdward Hervey <edward@collabora.com>2014-07-09 07:41:33 +0200
commit43dd0ec62a7b58e77f0d98099dfe27a8846b3a15 (patch)
tree59ad30ae45b00f463fb28756c71bb56216ac1c9f /gst-libs
parentdc1eeec7df430f4acaf364379f007f9f812c5f3c (diff)
downloadgstreamer-plugins-bad-43dd0ec62a7b58e77f0d98099dfe27a8846b3a15.tar.gz
mpegts: use getter for egde linkage descriptor type
https://bugzilla.gnome.org/show_bug.cgi?id=730914
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/mpegts/gst-dvb-descriptor.c51
-rw-r--r--gst-libs/gst/mpegts/gst-dvb-descriptor.h10
2 files changed, 59 insertions, 2 deletions
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.c b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
index b18e90c82..52638fefc 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.c
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
@@ -770,6 +770,57 @@ fail:
return FALSE;
}
+/**
+ * gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over:
+ * @desc: the #GstMpegtsDVBLinkageDescriptor
+ *
+ * Returns: The #GstMpegtsDVBLinkageMobileHandOver or %NULL if an error happened
+ */
+const GstMpegtsDVBLinkageMobileHandOver *
+gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over (const
+ GstMpegtsDVBLinkageDescriptor * desc)
+{
+ g_return_val_if_fail (desc != NULL, NULL);
+ g_return_val_if_fail (desc->linkage_type ==
+ GST_MPEGTS_DVB_LINKAGE_MOBILE_HAND_OVER, NULL);
+
+ return (const GstMpegtsDVBLinkageMobileHandOver *) desc->linkage_data;
+}
+
+/**
+ * gst_mpegts_dvb_linkage_descriptor_get_event:
+ * @desc: the #GstMpegtsDVBLinkageDescriptor
+ *
+ * Returns: The #GstMpegtsDVBLinkageEvent or %NULL if an error happened
+ */
+const GstMpegtsDVBLinkageEvent *
+gst_mpegts_dvb_linkage_descriptor_get_event (const GstMpegtsDVBLinkageDescriptor
+ * desc)
+{
+ g_return_val_if_fail (desc != NULL, NULL);
+ g_return_val_if_fail (desc->linkage_type ==
+ GST_MPEGTS_DVB_LINKAGE_EVENT, NULL);
+
+ return (const GstMpegtsDVBLinkageEvent *) desc->linkage_data;
+}
+
+/**
+ * gst_mpegts_dvb_linkage_descriptor_get_extended_event:
+ * @desc: the #GstMpegtsDVBLinkageDescriptor
+ *
+ * Returns: (element-type GstMpegtsDVBLinkageExtendedEvent): an #GstMpegtsDVBLinkageExtendedEvent array or %NULL if an error happened
+ */
+const GPtrArray *
+gst_mpegts_dvb_linkage_descriptor_get_extended_event (const
+ GstMpegtsDVBLinkageDescriptor * desc)
+{
+ g_return_val_if_fail (desc != NULL, NULL);
+ g_return_val_if_fail (desc->linkage_type ==
+ GST_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT, NULL);
+
+ return (const GPtrArray *) desc->linkage_data;
+}
+
/* GST_MTS_DESC_DVB_SHORT_EVENT (0x4D) */
/**
* gst_mpegts_descriptor_parse_dvb_short_event:
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.h b/gst-libs/gst/mpegts/gst-dvb-descriptor.h
index b03f3283e..ac7d9d408 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.h
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.h
@@ -434,7 +434,6 @@ struct _GstMpegtsDVBLinkageExtendedEvent
* @original_network_id: the original network id
* @service_id: the service id
* @linkage_type: the type which %linkage_data has
- * @linkage_data: the linkage structure depending from %linkage_type
* @private_data_length: the length for %private_data_bytes
* @private_data_bytes: additional data bytes
*/
@@ -444,7 +443,9 @@ struct _GstMpegtsDVBLinkageDescriptor
guint16 original_network_id;
guint16 service_id;
GstMpegtsDVBLinkageType linkage_type;
+ /*< private >*/
gpointer linkage_data;
+ /*< public >*/
guint8 private_data_length;
guint8 *private_data_bytes;
};
@@ -454,7 +455,12 @@ struct _GstMpegtsDVBLinkageDescriptor
GType gst_mpegts_dvb_linkage_descriptor_get_type (void);
void gst_mpegts_dvb_linkage_descriptor_free (GstMpegtsDVBLinkageDescriptor * source);
-
+const GstMpegtsDVBLinkageMobileHandOver * gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over
+ (const GstMpegtsDVBLinkageDescriptor * desc);
+const GstMpegtsDVBLinkageEvent * gst_mpegts_dvb_linkage_descriptor_get_event
+ (const GstMpegtsDVBLinkageDescriptor * desc);
+const GPtrArray * gst_mpegts_dvb_linkage_descriptor_get_extended_event
+ (const GstMpegtsDVBLinkageDescriptor * desc);
gboolean gst_mpegts_descriptor_parse_dvb_linkage (const GstMpegtsDescriptor * descriptor,
GstMpegtsDVBLinkageDescriptor ** res);