GNOME Bugzilla – Bug 649832
[camerabin2]: negotiation problems when capturing
Last modified: 2012-02-18 20:04:25 UTC
Created attachment 187530 [details] [review] Patch to examples/camerabin2/gst-camera2.c to reproduce the problem If I set "image-capture-caps" and "video-capture-caps" to caps with resolution different than 640X480, camerabin2 errors out. This can be reproduced by tests/examples/camerabin2/gst-camerabin2 if you set "image-capture-caps" and "video-capture-caps" (patch attached). The error is: Error: Device '/dev/video0' cannot capture at 320x240 : gstv4l2object.c(2111): gst_v4l2_object_set_format (): /GstCameraBin2:camera/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstV4l2Src:camerasrc-real-src-actual-src-v4l: Call to S_FMT failed for YUYV @ 320x240: Device or resource busy libv4l2: error setting pixformat: Device or resource busy After talking to Thiago I tested removing "g_object_set (self->output_selector, "pad-negotiation-mode", 0, NULL);" (line 496) from wrappercamerabinsrc. This solves the problem for when image-capture-caps and video-capture-caps are the same, but not for when they are different.
Created attachment 207803 [details] [review] camera2: just for debugging Updated patch for reproducing the issue
commit 39bad1d6ca2600eb9d2ad46e3842b8a564cf6c43 Author: Thiago Santos <thiago.sousa.santos@collabora.com> Date: Thu Feb 16 16:30:02 2012 -0300 wrappercamerabinsrc: Put source to null when resetting caps It seems that v4l2src isn't happy when switching formats on ready state, it works when putting it to NULL. Keep this workaround in wrappercamerabinsrc while v4l2src isn't fixed. Fixes #849832