summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2014-03-16 11:36:19 +0100
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2014-05-08 15:56:35 -0400
commit7a4b076099aad841efe384c2b1f14986f6eb7e47 (patch)
tree8695eeac87c49da8b3f7e01188e06f3228cc8943 /sys
parent6d5ffe8da2fed37be036089fefa03ba0a610fd4a (diff)
v4l2transform: Move subinstance subclass init near other init
Diffstat (limited to 'sys')
-rw-r--r--sys/v4l2/gstv4l2transform.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/sys/v4l2/gstv4l2transform.c b/sys/v4l2/gstv4l2transform.c
index dbcccc08d..a85086c49 100644
--- a/sys/v4l2/gstv4l2transform.c
+++ b/sys/v4l2/gstv4l2transform.c
@@ -531,6 +531,27 @@ gst_v4l2_transform_init (GstV4l2Transform * self)
}
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)
{
GstElementClass *element_class;
@@ -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)