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 608042 - [camerabin-example] v4l2 device busy after setting back to ready and changing the mode
[camerabin-example] v4l2 device busy after setting back to ready and changing...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Linux
: Normal normal
: 0.10.18
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-25 15:41 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2010-01-28 13:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-25 15:41:28 UTC
gst-plugins-bad/tests/examples/camerabin

LIBV4L2_LOG_FILENAME=/tmp/v4l2.log gst-plugin-bad/tests/examples/camerabin/gst-camera

change the resolution
*bang*

- I wonder about the "unknown munmap"
- as we have 2 buffers mapped we should be able to munmap 2
- maybe we get the device busy because of pedning buffers
  (http://www.linuxtv.org/downloads/video4linux/API/V4L2_API/spec-single/v4l2.html#vidioc-g-fmt)

...
request == VIDIOC_DQBUF
result == 0
request == VIDIOC_QBUF
result == 0
request == VIDIOC_STREAMOFF
result == 0
libv4l2: v4l2 unknown munmap 0xb6d45000, 38400
libv4l2: v4l2 unknown munmap 0xb6d3b000, 38400
request == VIDIOC_G_FMT
  pixelformat: YUYV 160x120
  field: 1 bytesperline: 320 imagesize38400
  colorspace: 8, priv: 0
result == 0
VIDIOC_S_FMT app requesting: YUYV
libv4l2: error setting pixformat: Device or resource busy
request == VIDIOC_S_FMT
  pixelformat: YUYV 160x120
  field: 1 bytesperline: 320 imagesize38400
  colorspace: 8, priv: 0
result == -1 (Device or resource busy)
VIDIOC_S_FMT app requesting: YUYV
libv4l2: error setting pixformat: Device or resource busy
request == VIDIOC_S_FMT
  pixelformat: YUYV 160x120
  field: 1 bytesperline: 320 imagesize38400
  colorspace: 8, priv: 0
result == -1 (Device or resource busy)
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-25 21:08:54 UTC
This might be a driver problem. Lower priority therefore.

With my cam at home I have to run it as
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so ./tests/examples/camerabin/gst-camera
and I only get some warnings.
Warning: Internal GStreamer error: clock problem.  Please file a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer.
Warning: Internal GStreamer error: clock problem.  Please file a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-28 13:06:50 UTC
This was a race in the gst-camera test app. Fixed among other things.

commit 0713748e1b63dea9298b00b10b8acffb01170368
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Thu Jan 28 15:00:32 2010 +0200

    camerabin-example: cleanups for mainloop and state-changes. Fixes #608042
    
    Start camerabin via idle handler to have the mainloop already running. Avoid
    some unnecessary state changes. Cleanup the bus usage when restarting.