Commit 7a4b0760 authored by Nicolas Dufresne's avatar Nicolas Dufresne

v4l2transform: Move subinstance subclass init near other init

parent 6d5ffe8d
......@@ -530,6 +530,27 @@ gst_v4l2_transform_init (GstV4l2Transform * self)
/* V4L2 object are created in subinstance_init */
}
static void
gst_v4l2_transform_subinstance_init (GTypeInstance * instance, gpointer g_class)
{
GstV4l2TransformClass *klass = GST_V4L2_TRANSFORM_CLASS (g_class);
GstV4l2Transform *self = GST_V4L2_TRANSFORM (instance);
self->v4l2output = gst_v4l2_object_new (GST_ELEMENT (self),
V4L2_BUF_TYPE_VIDEO_OUTPUT, klass->default_device,
gst_v4l2_get_output, gst_v4l2_set_output, NULL);
self->v4l2output->no_initial_format = TRUE;
self->v4l2output->keep_aspect = FALSE;
self->v4l2capture = gst_v4l2_object_new (GST_ELEMENT (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;
g_object_set (self, "device", klass->default_device, NULL);
}
static void
gst_v4l2_transform_class_init (GstV4l2TransformClass * klass)
{
......@@ -618,27 +639,6 @@ gst_v4l2_transform_subclass_init (gpointer g_class, gpointer data)
g_free (cdata);
}
static void
gst_v4l2_transform_subinstance_init (GTypeInstance * instance, gpointer g_class)
{
GstV4l2TransformClass *klass = GST_V4L2_TRANSFORM_CLASS (g_class);
GstV4l2Transform *self = GST_V4L2_TRANSFORM (instance);
self->v4l2output = gst_v4l2_object_new (GST_ELEMENT (self),
V4L2_BUF_TYPE_VIDEO_OUTPUT, klass->default_device,
gst_v4l2_get_output, gst_v4l2_set_output, NULL);
self->v4l2output->no_initial_format = TRUE;
self->v4l2output->keep_aspect = FALSE;
self->v4l2capture = gst_v4l2_object_new (GST_ELEMENT (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;
g_object_set (self, "device", klass->default_device, NULL);
}
/* Probing functions */
gboolean
gst_v4l2_is_transform (GstCaps * sink_caps, GstCaps * src_caps)
......
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