mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
videoencoder: Proxy colorimetry and chroma-site from input to output caps
https://bugzilla.gnome.org/show_bug.cgi?id=771376
This commit is contained in:
parent
e6fd46601c
commit
ad06b54443
1 changed files with 11 additions and 0 deletions
|
@ -1571,6 +1571,7 @@ gst_video_encoder_negotiate_default (GstVideoEncoder * encoder)
|
|||
GstQuery *query = NULL;
|
||||
GstVideoCodecFrame *frame;
|
||||
GstCaps *prevcaps;
|
||||
gchar *colorimetry;
|
||||
|
||||
g_return_val_if_fail (state->caps != NULL, FALSE);
|
||||
|
||||
|
@ -1603,6 +1604,16 @@ gst_video_encoder_negotiate_default (GstVideoEncoder * encoder)
|
|||
gst_video_field_order_to_string (GST_VIDEO_INFO_FIELD_ORDER (info)),
|
||||
NULL);
|
||||
|
||||
colorimetry = gst_video_colorimetry_to_string (&info->colorimetry);
|
||||
if (colorimetry)
|
||||
gst_caps_set_simple (state->caps, "colorimetry", G_TYPE_STRING,
|
||||
colorimetry, NULL);
|
||||
g_free (colorimetry);
|
||||
|
||||
if (info->chroma_site != GST_VIDEO_CHROMA_SITE_UNKNOWN)
|
||||
gst_caps_set_simple (state->caps, "chroma-site", G_TYPE_STRING,
|
||||
gst_video_chroma_to_string (info->chroma_site), NULL);
|
||||
|
||||
if (GST_VIDEO_INFO_MULTIVIEW_MODE (info) != GST_VIDEO_MULTIVIEW_MODE_NONE) {
|
||||
const gchar *caps_mview_mode =
|
||||
gst_video_multiview_mode_to_caps_string (GST_VIDEO_INFO_MULTIVIEW_MODE
|
||||
|
|
Loading…
Reference in a new issue