[longomatch] Move the source to the READY state before asking for its caps.



commit 009ae2c225e9761a23e7215379268740884af2d7
Author: Xavi Artigas <xartigas fluendo com>
Date:   Tue Dec 16 16:25:28 2014 +0100

    Move the source to the READY state before asking for its caps.

 libcesarplayer/gst-camera-capturer.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libcesarplayer/gst-camera-capturer.c b/libcesarplayer/gst-camera-capturer.c
index 010d597..bb7bebd 100644
--- a/libcesarplayer/gst-camera-capturer.c
+++ b/libcesarplayer/gst-camera-capturer.c
@@ -1042,6 +1042,10 @@ gst_camera_capturer_create_source (GstCameraCapturer *gcc,
    * since the device is set in getcaps and can't be changed later */
   gst_camera_capturer_update_device_id (gcc);
 
+  /* So the internal device of the source is opened and the following getcaps
+   * returns something sensible. */
+  gst_element_set_state (source, GST_STATE_READY);
+
   /* Some capture devices like the Extremecap U3 don't downscale correctly.
    * Choose the highest resolution and downscale later if needed */
   source_pad = gst_element_get_static_pad (source, "src");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]