After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 649832 - [camerabin2]: negotiation problems when capturing
[camerabin2]: negotiation problems when capturing
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-09 21:47 UTC by Luciana Fujii
Modified: 2012-02-18 20:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to examples/camerabin2/gst-camera2.c to reproduce the problem (1.29 KB, patch)
2011-05-09 21:47 UTC, Luciana Fujii
none Details | Review
camera2: just for debugging (1.35 KB, patch)
2012-02-16 19:36 UTC, Thiago Sousa Santos
none Details | Review

Description Luciana Fujii 2011-05-09 21:47:03 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.
Comment 1 Thiago Sousa Santos 2012-02-16 19:36:29 UTC
Created attachment 207803 [details] [review]
camera2: just for debugging

Updated patch for reproducing the issue
Comment 2 Thiago Sousa Santos 2012-02-17 01:52:12 UTC
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