mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 23:58:17 +00:00
oggstream: new convenience function to get a stream's media type
This will make logging a lot clearer, both in code and in output. https://bugzilla.gnome.org/show_bug.cgi?id=656775
This commit is contained in:
parent
8304b7b40d
commit
96e7bf53e9
2 changed files with 14 additions and 0 deletions
|
@ -225,6 +225,19 @@ gst_ogg_stream_extract_tags (GstOggStream * pad, ogg_packet * packet)
|
|||
mappers[pad->map].extract_tags_func (pad, packet);
|
||||
}
|
||||
|
||||
const char *
|
||||
gst_ogg_stream_get_media_type (GstOggStream * pad)
|
||||
{
|
||||
const GstCaps *caps = pad->caps;
|
||||
const GstStructure *structure;
|
||||
if (!caps)
|
||||
return NULL;
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
if (!structure)
|
||||
return NULL;
|
||||
return gst_structure_get_name (structure);
|
||||
}
|
||||
|
||||
/* some generic functions */
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -125,6 +125,7 @@ gboolean gst_ogg_stream_granulepos_is_key_frame (GstOggStream *pad,
|
|||
gboolean gst_ogg_stream_packet_is_header (GstOggStream *pad, ogg_packet *packet);
|
||||
gint64 gst_ogg_stream_get_packet_duration (GstOggStream * pad, ogg_packet *packet);
|
||||
void gst_ogg_stream_extract_tags (GstOggStream * pad, ogg_packet * packet);
|
||||
const char *gst_ogg_stream_get_media_type (GstOggStream * pad);
|
||||
|
||||
gboolean gst_ogg_map_parse_fisbone (GstOggStream * pad, const guint8 * data, guint size,
|
||||
guint32 * serialno, GstOggSkeleton *type);
|
||||
|
|
Loading…
Reference in a new issue