mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
mpegvideoparse: Use pbutils API to create the VIDEO_CODEC tag string
This commit is contained in:
parent
188b445fdd
commit
6fbc101d19
1 changed files with 9 additions and 8 deletions
|
@ -27,7 +27,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gst/base/gstbytereader.h>
|
#include <gst/base/base.h>
|
||||||
|
#include <gst/pbutils/pbutils.h>
|
||||||
#include <gst/codecparsers/gstmpegvideometa.h>
|
#include <gst/codecparsers/gstmpegvideometa.h>
|
||||||
|
|
||||||
#include "gstmpegvideoparse.h"
|
#include "gstmpegvideoparse.h"
|
||||||
|
@ -943,16 +944,16 @@ gst_mpegv_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
* have already been sent */
|
* have already been sent */
|
||||||
|
|
||||||
if (G_UNLIKELY (mpvparse->send_codec_tag)) {
|
if (G_UNLIKELY (mpvparse->send_codec_tag)) {
|
||||||
gchar *codec;
|
GstCaps *caps;
|
||||||
|
|
||||||
/* codec tag */
|
/* codec tag */
|
||||||
codec =
|
taglist = gst_tag_list_new_empty ();
|
||||||
g_strdup_printf ("MPEG %d Video",
|
caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse));
|
||||||
(mpvparse->config_flags & FLAG_MPEG2) ? 2 : 1);
|
gst_pb_utils_add_codec_description_to_tag_list (taglist,
|
||||||
taglist = gst_tag_list_new (GST_TAG_VIDEO_CODEC, codec, NULL);
|
GST_TAG_VIDEO_CODEC, caps);
|
||||||
g_free (codec);
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (mpvparse),
|
gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (parse),
|
||||||
gst_event_new_tag (taglist));
|
gst_event_new_tag (taglist));
|
||||||
|
|
||||||
mpvparse->send_codec_tag = FALSE;
|
mpvparse->send_codec_tag = FALSE;
|
||||||
|
|
Loading…
Reference in a new issue