mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
videoencoder: Proxy interlace-mode and field-order fields from the input to the output caps
https://bugzilla.gnome.org/show_bug.cgi?id=771376
This commit is contained in:
parent
79809633de
commit
635d1a2a98
1 changed files with 10 additions and 0 deletions
|
@ -539,6 +539,8 @@ _new_output_state (GstCaps * caps, GstVideoCodecState * reference)
|
|||
tgt->fps_n = ref->fps_n;
|
||||
tgt->fps_d = ref->fps_d;
|
||||
|
||||
GST_VIDEO_INFO_FIELD_ORDER (tgt) = GST_VIDEO_INFO_FIELD_ORDER (ref);
|
||||
|
||||
GST_VIDEO_INFO_MULTIVIEW_MODE (tgt) = GST_VIDEO_INFO_MULTIVIEW_MODE (ref);
|
||||
GST_VIDEO_INFO_MULTIVIEW_FLAGS (tgt) = GST_VIDEO_INFO_MULTIVIEW_FLAGS (ref);
|
||||
}
|
||||
|
@ -1593,6 +1595,14 @@ gst_video_encoder_negotiate_default (GstVideoEncoder * encoder)
|
|||
gst_caps_set_simple (state->caps, "codec_data", GST_TYPE_BUFFER,
|
||||
state->codec_data, NULL);
|
||||
|
||||
gst_caps_set_simple (state->caps, "interlace-mode", G_TYPE_STRING,
|
||||
gst_video_interlace_mode_to_string (info->interlace_mode), NULL);
|
||||
if (info->interlace_mode == GST_VIDEO_INTERLACE_MODE_INTERLEAVED &&
|
||||
GST_VIDEO_INFO_FIELD_ORDER (info) != GST_VIDEO_FIELD_ORDER_UNKNOWN)
|
||||
gst_caps_set_simple (state->caps, "field-order", G_TYPE_STRING,
|
||||
gst_video_field_order_to_string (GST_VIDEO_INFO_FIELD_ORDER (info)),
|
||||
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