mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
video: Merge upstream stream tags
This commit is contained in:
parent
5989d75e10
commit
b141bfed60
2 changed files with 43 additions and 0 deletions
|
@ -1012,6 +1012,20 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder,
|
|||
gst_video_decoder_flush (decoder, TRUE);
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
|
||||
}
|
||||
case GST_EVENT_TAG:
|
||||
{
|
||||
GstTagList *tags;
|
||||
|
||||
gst_event_parse_tag (event, &tags);
|
||||
|
||||
if (gst_tag_list_get_scope (tags) == GST_TAG_SCOPE_STREAM) {
|
||||
gst_video_decoder_merge_tags (decoder, tags, GST_TAG_MERGE_REPLACE);
|
||||
gst_event_unref (event);
|
||||
event = NULL;
|
||||
ret = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -988,6 +988,35 @@ gst_video_encoder_sink_event_default (GstVideoEncoder * encoder,
|
|||
}
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_TAG:
|
||||
{
|
||||
GstTagList *tags;
|
||||
|
||||
gst_event_parse_tag (event, &tags);
|
||||
|
||||
if (gst_tag_list_get_scope (tags) == GST_TAG_SCOPE_STREAM) {
|
||||
tags = gst_tag_list_copy (tags);
|
||||
|
||||
/* FIXME: make generic based on GST_TAG_FLAG_ENCODED */
|
||||
gst_tag_list_remove_tag (tags, GST_TAG_CODEC);
|
||||
gst_tag_list_remove_tag (tags, GST_TAG_AUDIO_CODEC);
|
||||
gst_tag_list_remove_tag (tags, GST_TAG_VIDEO_CODEC);
|
||||
gst_tag_list_remove_tag (tags, GST_TAG_SUBTITLE_CODEC);
|
||||
gst_tag_list_remove_tag (tags, GST_TAG_CONTAINER_FORMAT);
|
||||
gst_tag_list_remove_tag (tags, GST_TAG_BITRATE);
|
||||
gst_tag_list_remove_tag (tags, GST_TAG_NOMINAL_BITRATE);
|
||||
gst_tag_list_remove_tag (tags, GST_TAG_MAXIMUM_BITRATE);
|
||||
gst_tag_list_remove_tag (tags, GST_TAG_MINIMUM_BITRATE);
|
||||
gst_tag_list_remove_tag (tags, GST_TAG_ENCODER);
|
||||
gst_tag_list_remove_tag (tags, GST_TAG_ENCODER_VERSION);
|
||||
|
||||
gst_video_encoder_merge_tags (encoder, tags, GST_TAG_MERGE_REPLACE);
|
||||
gst_event_unref (event);
|
||||
event = NULL;
|
||||
ret = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue