From e32897d809aafde7185473669515caac801f524b Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 23 Aug 2011 19:13:21 -0300 Subject: [PATCH] camerabin2: Always set encodebin flags when going to ready When going from NULL to READY we want the encodebin flags to be set, and not only after creating encodebin (on the first run) --- gst/camerabin2/gstcamerabin2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index 60a5b1722b..262ccb0d94 100644 --- a/gst/camerabin2/gstcamerabin2.c +++ b/gst/camerabin2/gstcamerabin2.c @@ -1276,14 +1276,6 @@ gst_camera_bin_create_elements (GstCameraBin2 * camera) g_signal_connect (camera->video_encodebin, "element-added", (GCallback) encodebin_element_added, camera); - /* propagate the flags property by translating appropriate values - * to GstEncFlags values */ - if (camera->flags & GST_CAM_FLAG_NO_AUDIO_CONVERSION) - encbin_flags |= (1 << 0); - if (camera->flags & GST_CAM_FLAG_NO_VIDEO_CONVERSION) - encbin_flags |= (1 << 1); - g_object_set (camera->video_encodebin, "flags", encbin_flags, NULL); - camera->videosink = gst_element_factory_make ("filesink", "videobin-filesink"); if (!camera->videosink) { @@ -1419,6 +1411,14 @@ gst_camera_bin_create_elements (GstCameraBin2 * camera) g_object_set (camera->imagesink, "location", camera->location, NULL); } + /* propagate the flags property by translating appropriate values + * to GstEncFlags values */ + if (camera->flags & GST_CAM_FLAG_NO_AUDIO_CONVERSION) + encbin_flags |= (1 << 0); + if (camera->flags & GST_CAM_FLAG_NO_VIDEO_CONVERSION) + encbin_flags |= (1 << 1); + g_object_set (camera->video_encodebin, "flags", encbin_flags, NULL); + g_object_set (camera->viewfinderbin, "disable-converters", camera->flags & GST_CAM_FLAG_NO_VIEWFINDER_CONVERSION, NULL);