diff options
author | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2010-12-20 18:09:26 -0300 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2010-12-23 13:24:56 -0300 |
commit | 2513e9f01b8a141484d789ec04ac3423641aa2fe (patch) | |
tree | d4cccda9fcda17f5e06a21b7c3c96603e38bf6d4 /gst/camerabin2 | |
parent | 7ed49bda4f9d56ecbc48db18a6b0e3a0d52aba69 (diff) |
wrappercamerabinsrc: Add converters for viewfinder branch
Viewfinder branch should have converters as it has to work
always anyway.
Diffstat (limited to 'gst/camerabin2')
-rw-r--r-- | gst/camerabin2/gstwrappercamerabinsrc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c index 7fbcc7525..19567ab62 100644 --- a/gst/camerabin2/gstwrappercamerabinsrc.c +++ b/gst/camerabin2/gstwrappercamerabinsrc.c @@ -235,6 +235,7 @@ gst_wrapper_camera_bin_src_construct_pipeline (GstBaseCameraSrc * bcamsrc) GstBin *cbin = GST_BIN (bcamsrc); GstElement *tee; gboolean ret = FALSE; + GstElement *videoscale; GST_DEBUG_OBJECT (self, "constructing pipeline"); @@ -279,6 +280,17 @@ gst_wrapper_camera_bin_src_construct_pipeline (GstBaseCameraSrc * bcamsrc) goto done; self->tee_vf_srcpad = gst_element_get_request_pad (tee, "src%d"); + g_object_set (tee, "alloc-pad", self->tee_vf_srcpad, NULL); + + /* the viewfinder should always work, so we add some converters to it */ + if (!gst_camerabin_create_and_add_element (cbin, "ffmpegcolorspace")) + goto done; + if (!(videoscale = gst_camerabin_create_and_add_element (cbin, "videoscale"))) + goto done; + + gst_object_unref (self->tee_vf_srcpad); + self->tee_vf_srcpad = gst_element_get_static_pad (videoscale, "src"); + self->tee_image_srcpad = gst_element_get_request_pad (tee, "src%d"); self->tee_video_srcpad = gst_element_get_request_pad (tee, "src%d"); @@ -287,7 +299,6 @@ gst_wrapper_camera_bin_src_construct_pipeline (GstBaseCameraSrc * bcamsrc) gst_pad_add_buffer_probe (self->tee_video_srcpad, G_CALLBACK (gst_wrapper_camera_bin_src_vidsrc_probe), self); - g_object_set (tee, "alloc-pad", self->tee_vf_srcpad, NULL); /* hook-up the ghostpads */ gst_ghost_pad_set_target (GST_GHOST_PAD (self->vfsrc), self->tee_vf_srcpad); |