mpegts: Add gst_mpegts_section_get_data, to allow us to get the original binary section data.

https://bugzilla.gnome.org/show_bug.cgi?id=724255
This commit is contained in:
Brendan Long 2014-02-12 18:15:44 -06:00 committed by Edward Hervey
parent 142233d917
commit cd3c3ebf01
2 changed files with 14 additions and 0 deletions

View file

@ -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:

View file

@ -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())