summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2018-10-27 13:57:45 +0100
committerSebastian Dröge <sebastian@centricular.com>2018-10-27 13:59:57 +0100
commitff47ef9ab95a238df1f9eafd717743eb5021e26e (patch)
treed41b495f6a9a67f416ca4aa846c8c49b85bbfef4 /gst-libs
parent690a18ee09b1bc3bfd3abeacb78a2e099366c967 (diff)
downloadgstreamer-plugins-bad-ff47ef9ab95a238df1f9eafd717743eb5021e26e.tar.gz
mpegts: Add boxed type for DVB CableDeliverySystem descriptor
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/mpegts/gst-dvb-descriptor.c23
-rw-r--r--gst-libs/gst/mpegts/gst-dvb-descriptor.h7
2 files changed, 29 insertions, 1 deletions
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.c b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
index bd8a069b5..81c85221b 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.c
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
@@ -293,8 +293,29 @@ gst_mpegts_descriptor_parse_satellite_delivery_system (const GstMpegtsDescriptor
return TRUE;
}
-
/* GST_MTS_DESC_DVB_CABLE_DELIVERY_SYSTEM (0x44) */
+static GstMpegtsCableDeliverySystemDescriptor
+ * _gst_mpegts_dvb_cable_delivery_system_descriptor_copy
+ (GstMpegtsCableDeliverySystemDescriptor * source)
+{
+ GstMpegtsCableDeliverySystemDescriptor *copy;
+
+ copy = g_slice_dup (GstMpegtsCableDeliverySystemDescriptor, source);
+
+ return copy;
+}
+
+void gst_mpegts_dvb_cable_delivery_system_descriptor_free
+ (GstMpegtsCableDeliverySystemDescriptor * source)
+{
+ g_slice_free (GstMpegtsCableDeliverySystemDescriptor, source);
+}
+
+G_DEFINE_BOXED_TYPE (GstMpegtsCableDeliverySystemDescriptor,
+ gst_mpegts_dvb_cable_delivery_system_descriptor,
+ (GBoxedCopyFunc) _gst_mpegts_dvb_cable_delivery_system_descriptor_copy,
+ (GFreeFunc) gst_mpegts_dvb_cable_delivery_system_descriptor_free);
+
/**
* gst_mpegts_descriptor_parse_cable_delivery_system:
* @descriptor: a %GST_MTS_DESC_DVB_CABLE_DELIVERY_SYSTEM #GstMpegtsDescriptor
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.h b/gst-libs/gst/mpegts/gst-dvb-descriptor.h
index 80c1fa3c8..8b87a1d47 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.h
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.h
@@ -287,9 +287,16 @@ struct _GstMpegtsCableDeliverySystemDescriptor
GstMpegtsDVBCodeRate fec_inner;
};
+#define GST_TYPE_MPEGTS_DVB_CABLE_DELIVERY_SYSTEM_DESCRIPTOR ( gst_mpegts_dvb_cable_system_delivery_descriptor_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_dvb_cable_delivery_system_descriptor_get_type (void);
+
GST_MPEGTS_API
gboolean gst_mpegts_descriptor_parse_cable_delivery_system (const GstMpegtsDescriptor *descriptor,
GstMpegtsCableDeliverySystemDescriptor *res);
+GST_MPEGTS_API
+void gst_mpegts_dvb_cable_delivery_system_descriptor_free (GstMpegtsCableDeliverySystemDescriptor * source);
/* GST_MTS_DESC_DVB_BOUQUET_NAME (0x47) */