summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorRussel Winder <russel@winder.org.uk>2018-10-31 18:44:34 +0000
committerSebastian Dröge <sebastian@centricular.com>2018-11-01 14:39:36 +0200
commitdcad6d10315b4e34924542c90d59da1e6e18c1b5 (patch)
treeb464078822afb98686bea8f5a8310233f38f9c0e /gst-libs
parent00acafc209ab8923e5dbd72f22cd71c283ad53da (diff)
downloadgstreamer-plugins-bad-dcad6d10315b4e34924542c90d59da1e6e18c1b5.tar.gz
mpegts: Register a boxed type for GstMpegtsContent
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/mpegts/gst-dvb-descriptor.c17
-rw-r--r--gst-libs/gst/mpegts/gst-dvb-descriptor.h6
2 files changed, 23 insertions, 0 deletions
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.c b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
index 81c85221b..bb016e2fd 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.c
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
@@ -1282,12 +1282,29 @@ gst_mpegts_descriptor_parse_dvb_ca_identifier (const GstMpegtsDescriptor *
}
/* GST_MTS_DESC_DVB_CONTENT (0x54) */
+
+static GstMpegtsContent *
+_gst_mpegts_content_copy (GstMpegtsContent * source)
+{
+ GstMpegtsContent *copy;
+
+ copy = g_slice_dup (GstMpegtsContent, source);
+
+ return copy;
+}
+
static void
_gst_mpegts_content_free (GstMpegtsContent * content)
{
g_slice_free (GstMpegtsContent, content);
}
+G_DEFINE_BOXED_TYPE (GstMpegtsContent,
+ gst_mpegts_content,
+ (GBoxedCopyFunc) _gst_mpegts_content_copy,
+ (GFreeFunc) _gst_mpegts_content_free);
+
+
/**
* gst_mpegts_descriptor_parse_dvb_content:
* @descriptor: a %GST_MTS_DESC_DVB_CONTENT #GstMpegtsDescriptor
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.h b/gst-libs/gst/mpegts/gst-dvb-descriptor.h
index 8b87a1d47..5d1f5f9bb 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.h
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.h
@@ -612,10 +612,16 @@ struct _GstMpegtsContent
guint8 user_byte;
};
+#define GST_TYPE_MPEGTS_CONTENT (gst_mpegts_content_get_type ())
+
+GST_MPEGTS_API
+GType gst_mpegts_content_get_type (void);
+
GST_MPEGTS_API
gboolean gst_mpegts_descriptor_parse_dvb_content (const GstMpegtsDescriptor *
descriptor, GPtrArray ** content);
+
/* GST_MTS_DESC_DVB_PARENTAL_RATING (0x55) */
typedef struct _GstMpegtsDVBParentalRatingItem GstMpegtsDVBParentalRatingItem;