diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2013-12-16 10:25:22 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2013-12-16 10:25:22 +0100 |
commit | b3f198b67d022ee1a9bbbf6b77cedea578881c96 (patch) | |
tree | 85c13a85fa8e32788e1c8f4c130879d0f3704a77 /gst/videoparsers/gstvc1parse.c | |
parent | 3faa8920cef0a920f01dd316b0e4bf79c9232806 (diff) |
vc1parse: Post VIDEO_CODEC tag
Diffstat (limited to 'gst/videoparsers/gstvc1parse.c')
-rw-r--r-- | gst/videoparsers/gstvc1parse.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gst/videoparsers/gstvc1parse.c b/gst/videoparsers/gstvc1parse.c index 7495df2fab..9868afa766 100644 --- a/gst/videoparsers/gstvc1parse.c +++ b/gst/videoparsers/gstvc1parse.c @@ -81,7 +81,8 @@ #include "gstvc1parse.h" -#include <gst/base/gstbytereader.h> +#include <gst/base/base.h> +#include <gst/pbutils/pbutils.h> #include <string.h> GST_DEBUG_CATEGORY (vc1_parse_debug); @@ -1218,6 +1219,25 @@ gst_vc1_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) { GstVC1Parse *vc1parse = GST_VC1_PARSE (parse); + if (!vc1parse->sent_codec_tag) { + GstTagList *taglist; + GstCaps *caps; + + taglist = gst_tag_list_new_empty (); + + /* codec tag */ + caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse)); + gst_pb_utils_add_codec_description_to_tag_list (taglist, + GST_TAG_VIDEO_CODEC, caps); + gst_caps_unref (caps); + + gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (vc1parse), + gst_event_new_tag (taglist)); + + /* also signals the end of first-frame processing */ + vc1parse->sent_codec_tag = TRUE; + } + if (vc1parse->input_header_format != vc1parse->output_header_format || vc1parse->input_stream_format != vc1parse->output_stream_format) { GST_WARNING_OBJECT (vc1parse, "stream conversion not implemented yet"); |