mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
x264enc: Auto-detect interlace mode from caps
If the caps are interlaced, interlacing is always enabled on the encoder. If the interlace-mode field is missing or if it's progressive, the encoder uses the "interlaced" property. https://bugzilla.gnome.org/show_bug.cgi?id=775228
This commit is contained in:
parent
8b8419cefb
commit
f7d82312bb
1 changed files with 6 additions and 2 deletions
|
@ -2264,6 +2264,12 @@ gst_x264_enc_set_format (GstVideoEncoder * video_enc,
|
||||||
|
|
||||||
gst_caps_unref (template_caps);
|
gst_caps_unref (template_caps);
|
||||||
|
|
||||||
|
if (GST_VIDEO_INFO_IS_INTERLACED (&state->info))
|
||||||
|
g_string_append_printf (encoder->option_string, ":interlaced=%d", TRUE);
|
||||||
|
else
|
||||||
|
g_string_append_printf (encoder->option_string, ":interlaced=%d",
|
||||||
|
encoder->interlaced);
|
||||||
|
|
||||||
if (!gst_x264_enc_init_encoder (encoder))
|
if (!gst_x264_enc_init_encoder (encoder))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -2709,8 +2715,6 @@ gst_x264_enc_set_property (GObject * object, guint prop_id,
|
||||||
break;
|
break;
|
||||||
case ARG_INTERLACED:
|
case ARG_INTERLACED:
|
||||||
encoder->interlaced = g_value_get_boolean (value);
|
encoder->interlaced = g_value_get_boolean (value);
|
||||||
g_string_append_printf (encoder->option_string, ":interlaced=%d",
|
|
||||||
encoder->interlaced);
|
|
||||||
break;
|
break;
|
||||||
case ARG_FRAME_PACKING:
|
case ARG_FRAME_PACKING:
|
||||||
encoder->frame_packing = g_value_get_enum (value);
|
encoder->frame_packing = g_value_get_enum (value);
|
||||||
|
|
Loading…
Reference in a new issue