Commit be9a15a9 authored by Guillaume Desmottes's avatar Guillaume Desmottes 🐐 Committed by Nicolas Dufresne

v4l2: rely on gst_v4l2_dup() to set no_initial_format and keep_aspect

gst_v4l2_dup() will now take care of setting
v4l2capture->no_initial_format and keep_aspect instead of doing it
manually.

Fix a typo as keep_aspect was set twice on v4l2output but never on
v4l2capture.

https://bugzilla.gnome.org/show_bug.cgi?id=795028
parent 02d47f25
......@@ -1079,8 +1079,6 @@ gst_v4l2_transform_subinstance_init (GTypeInstance * instance, gpointer g_class)
GST_OBJECT (GST_BASE_TRANSFORM_SRC_PAD (self)),
V4L2_BUF_TYPE_VIDEO_CAPTURE, klass->default_device,
gst_v4l2_get_input, gst_v4l2_set_input, NULL);
self->v4l2capture->no_initial_format = TRUE;
self->v4l2output->keep_aspect = FALSE;
}
static void
......
......@@ -956,8 +956,6 @@ gst_v4l2_video_dec_subinstance_init (GTypeInstance * instance, gpointer g_class)
GST_OBJECT (GST_VIDEO_DECODER_SRC_PAD (self)),
V4L2_BUF_TYPE_VIDEO_CAPTURE, klass->default_device,
gst_v4l2_get_input, gst_v4l2_set_input, NULL);
self->v4l2capture->no_initial_format = TRUE;
self->v4l2output->keep_aspect = FALSE;
}
static void
......
......@@ -1042,8 +1042,6 @@ gst_v4l2_video_enc_subinstance_init (GTypeInstance * instance, gpointer g_class)
GST_OBJECT (GST_VIDEO_ENCODER_SRC_PAD (self)),
V4L2_BUF_TYPE_VIDEO_CAPTURE, klass->default_device,
gst_v4l2_get_input, gst_v4l2_set_input, NULL);
self->v4l2capture->no_initial_format = TRUE;
self->v4l2output->keep_aspect = FALSE;
}
static void
......
......@@ -695,6 +695,7 @@ gst_v4l2_dup (GstV4l2Object * v4l2object, GstV4l2Object * other)
v4l2object->vcap.card, v4l2object->videodev);
v4l2object->never_interlaced = other->never_interlaced;
v4l2object->no_initial_format = other->no_initial_format;
return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment