diff --git a/gst-libs/gst/mpegts/gstmpegtssection.c b/gst-libs/gst/mpegts/gstmpegtssection.c index 4243193103..4913095eb5 100644 --- a/gst-libs/gst/mpegts/gstmpegtssection.c +++ b/gst-libs/gst/mpegts/gstmpegtssection.c @@ -230,6 +230,19 @@ _gst_mpegts_section_copy (GstMpegTsSection * section) return copy; } +/** + * gst_mpegts_section_get_data: + * @section: a #GstMpegTsSection + * + * Gets the original unparsed section data. + * + * Returns: (transfer full): The original unparsed section data. + */ +GBytes * +gst_mpegts_section_get_data (GstMpegTsSection * section) +{ + return g_bytes_new (section->data, section->section_length); +} /** * gst_message_parse_mpegts_section: diff --git a/gst-libs/gst/mpegts/gstmpegtssection.h b/gst-libs/gst/mpegts/gstmpegtssection.h index df27d9dd54..1e8e94cb44 100644 --- a/gst-libs/gst/mpegts/gstmpegtssection.h +++ b/gst-libs/gst/mpegts/gstmpegtssection.h @@ -161,6 +161,7 @@ struct _GstMpegTsSection GstMpegTsPacketizeFunc packetizer; }; +GBytes *gst_mpegts_section_get_data (GstMpegTsSection *section); /* PAT */ #define GST_TYPE_MPEGTS_PAT_PROGRAM (gst_mpegts_pat_program_get_type())