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 503503 - v4l2src Could not get buffers from device '/dev/video0'
v4l2src Could not get buffers from device '/dev/video0'
Status: RESOLVED FIXED
Product: cheese
Classification: Applications
Component: general
0.2.x
Other All
: Normal major
: ---
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
: 508912 513563 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-12-13 22:05 UTC by Jack Deslippe
Modified: 2008-02-02 17:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bug report (5.10 KB, text/plain)
2007-12-15 03:29 UTC, Jack Deslippe
  Details
Python script to check camera (5.56 KB, text/x-python)
2007-12-20 20:19 UTC, Jaap A. Haitsma
  Details
Patch with queue-size=2 (1.06 KB, patch)
2008-01-04 01:03 UTC, Jaap A. Haitsma
committed Details | Review

Description Jack Deslippe 2007-12-13 22:05:16 UTC
Please describe the problem:
I cannot use cheese with my v4l2 UVC camera because I get the error:  Could not get buffers from device '/dev/video0' in detection.  

This is a bug in gstreamer-plugins-good and will aparently be fixed in version 10.7.  However, I can get my camera to work in gstreamer by doing the following command:  gst-launch-0.10 v4l2src queue-size=2 ! ffmpegcolorspace ! ximagesink

So, I changed the Default input entry in gstreamer-properties to 'v4l2src queue-size=2' but cheese still fails - it seems to just ignore the changes I made to gstreamer-properties.  Shouldn't cheese use these settings?

Steps to reproduce:
1. Buy UVC camera
2. Plug into your computer with gstreamer-plugins-good-10.6
3. Notice that cheese doesn't work


Actual results:
Cheese doesn't not detect and cameras.

Expected results:
For it to detect my UVC camera

Does this happen every time?
yep

Other information:
Comment 1 Jaap A. Haitsma 2007-12-14 08:07:06 UTC
I think this has been fixed in cheese SVN and gstreamer 0.10.15. Can you try the version from SVN?
Comment 2 Jack Deslippe 2007-12-15 03:29:17 UTC
Created attachment 100990 [details]
bug report
Comment 3 Jack Deslippe 2007-12-15 03:30:00 UTC
Well.  I gave it a try but the version of cheese in svn crashes on me immediately everytime I try to run it.   I attached the bug report.

Comment 4 Jaap A. Haitsma 2007-12-15 10:44:55 UTC
Thanks, the bug report is not that helpful though. It seems that not all debug symbols are there.

Can you run cheese in gdb to see where it crashes.
Comment 5 Jack Deslippe 2007-12-15 18:29:59 UTC
The output of running cheese in gdb is :

Starting program: /usr/local/bin/cheese 

warning: Missing the separate debug info file: /usr/lib/debug/.build-id/ac/2eeb206486bb7315d6ac4cd64de0cb50838ff6.debug

(Then about 50 more of lines similar to the last one)

warning: Missing the separate debug info file: /usr/lib/debug/.build-id/75/264b0eb027ad1d0566dd0dfd86902d57aea9ef.debug
[New Thread -1287648368 (LWP 32254)]
[New Thread -1300235376 (LWP 32255)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208506080 (LWP 32250)]
cheese_webcam_init (webcam=0x85d5d70) at cheese-webcam.c:591
591         for (i = 0; i < format->num_framerates; i++)


I am not sure if this will be useful to you.
Comment 6 Jaap A. Haitsma 2007-12-15 21:52:32 UTC
It's pretty useful. I think the problem is that format is NULL somehow because we don't read your camera properties correctly.

What's the terminal output you get when you run cheese in a terminal?
Comment 7 Jack Deslippe 2007-12-16 04:01:51 UTC
The only terminal output from running cheese is about 50 lines similar to the following:

warning: Missing the separate debug info file: /usr/lib/debug/.build-id/3b/fcf3e37731d5058d14badc687008e09c95cb1b.debug

Nothing else seems to be outputted.
Comment 8 Jaap A. Haitsma 2007-12-16 09:50:49 UTC
Very weird. Can you step through the code starting at cheese_webcam_detect_webcam_devices

gdb cheese
break cheese_webcam_detect_webcam_devices
run

and then step through the code to see what happens

Thanks

Comment 9 Jack Deslippe 2007-12-18 04:28:52 UTC
Well, I have to admit that I have no idea what I am doing but this is what I did and what happenned:

gdb cheese
GNU gdb Red Hat Linux (6.6-36.fc8rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) break cheese_webcam_detect_webcam_devices
Function "cheese_webcam_detect_webcam_devices" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (cheese_webcam_detect_webcam_devices) pending.
(gdb) run

Starting program: /usr/local/bin/cheese 

warning: Missing the separate debug info file: /usr/lib/debug/.build-id/ac/2eeb206486bb7315d6ac4cd64de0cb50838ff6.debug

(then about 50 more messages like the last one)

[Thread debugging using libthread_db enabled]
[New process 6336]

(then about 50 more messages about the missing debug info file

[New Thread -1208903392 (LWP 6336)]

(more messages about debug info files)

[Detaching after fork from child process 6340. (Try `set detach-on-fork off'.)]

[New Thread -1288139888 (LWP 6341)]
[New Thread -1298629744 (LWP 6342)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208903392 (LWP 6336)]
cheese_webcam_init (webcam=0x850e170) at cheese-webcam.c:591
591         for (i = 0; i < format->num_framerates; i++)

I am pretty sure this is not what you intended me to do since I didn't 'step through anything' ...
Comment 10 Jack Deslippe 2007-12-18 04:32:25 UTC
Also I just tried to do svn update on the cheese directory.  Now I can't seem to compile it - I get this error:  

make  all-recursive
make[1]: Entering directory `/home/jdeslip/Progs/cheese'
Making all in src
make[2]: Entering directory `/home/jdeslip/Progs/cheese/src'
gcc -DHAVE_CONFIG_H -I. -I.. -DBINDIR=\"/usr/local/bin\" -DDATADIR=\"/usr/local/share\" -DPREFIX=\""/usr/local"\" -DSYSCONFDIR=\""/usr/local/etc"\" -DLIBDIR=\""/usr/local/lib"\" -DPACKAGE_DATADIR=\""/usr/local/share/cheese"\" -DPACKAGE_LOCALEDIR=\""/usr/local/share/locale"\" -DORBIT2=1 -pthread -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/orbit-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/libglade-2.0 -I/usr/include/libxml2 -I/usr/include/gstreamer-0.10 -I/usr/include/evolution-data-server-1.12 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/hal      -g -O2 -Wall -Werror -MT cheese-webcam.o -MD -MP -MF .deps/cheese-webcam.Tpo -c -o cheese-webcam.o cheese-webcam.c
cc1: warnings being treated as errors
cheese-webcam.c: In function ‘cheese_webcam_create_webcam_source_bin’:
cheese-webcam.c:583: warning: implicit declaration of function ‘strcmp’
make[2]: *** [cheese-webcam.o] Error 1
make[2]: Leaving directory `/home/jdeslip/Progs/cheese/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jdeslip/Progs/cheese'
make: *** [all] Error 2

Perhaps this is related to why it wasn't working before...
Comment 11 daniel g. siegel 2007-12-18 20:00:11 UTC
sorry, my fault. please try again!
Comment 12 Jack Deslippe 2007-12-20 16:27:29 UTC
Ok, I can now compile cheese again.  But, I am now back to the old problem where cheese immediately crashes.  
Comment 13 daniel g. siegel 2007-12-20 18:51:59 UTC
are you shure, that you are using gstreamer 0.10.15
Comment 14 Jaap A. Haitsma 2007-12-20 20:18:03 UTC
He probably is using the newest gstreamer otherwise configure would fail

jdeslip can debug cheese with gdb

You can find a tutorial about gdb here http://www.unknownroad.com/rtfm/gdbtut/gdbtoc.html

As I said you do

gdb cheese
break cheese_webcam_detect_webcam_devices
run
and then use "step" or "next"
and print variables to see what's wrong
Comment 15 Jaap A. Haitsma 2007-12-20 20:19:08 UTC
Created attachment 101350 [details]
Python script to check camera

Another way to help is running this python script and paste the output overhere
Comment 16 Jack Deslippe 2007-12-24 03:15:28 UTC
Sorry for the delay.  I went on holidays to my parents place.  I will try running this when I get back (in 5 days)
Comment 17 Jack Deslippe 2008-01-03 01:04:03 UTC
ok, I am probably being a complete idiot but I can't get gdb to output anything usefull - right after I type the "run" line into the gdb command line cheese just spits out the 50 or so warnings about "Missing separate debug files" and then it says program received signal SIGSEGV.  What else can I do?  

Here is the about from running 'python detect.py'  -  This is in the 3.0 release of cheese.  

[jdeslip@jdeslippe ~]$ python detect.py 
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- xml -*- -->

<deviceinfo version="0.2">
  <device>
    <match key="unknown" int="0">
      <match key="usb" int="0">
        <merge key="gstreamer.source" type="string">v4l2src</merge>
        <merge key="info.product" type="string">UVC Camera (046d:08c9)</merge>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)30/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)25/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)20/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)15/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)10/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)5/1</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)640, height=(int)480, framerate=(fraction)30/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)640, height=(int)480, framerate=(fraction)25/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)640, height=(int)480, framerate=(fraction)20/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)640, height=(int)480, framerate=(fraction)15/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)640, height=(int)480, framerate=(fraction)10/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)640, height=(int)480, framerate=(fraction)5/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)160, height=(int)120, framerate=(fraction)30/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)160, height=(int)120, framerate=(fraction)25/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)160, height=(int)120, framerate=(fraction)20/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)160, height=(int)120, framerate=(fraction)15/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)160, height=(int)120, framerate=(fraction)10/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)160, height=(int)120, framerate=(fraction)5/1</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)160, height=(int)120, framerate=(fraction)30/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)160, height=(int)120, framerate=(fraction)25/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)160, height=(int)120, framerate=(fraction)20/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)160, height=(int)120, framerate=(fraction)15/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)160, height=(int)120, framerate=(fraction)10/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)160, height=(int)120, framerate=(fraction)5/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)176, height=(int)144, framerate=(fraction)30/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)176, height=(int)144, framerate=(fraction)25/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)176, height=(int)144, framerate=(fraction)20/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)176, height=(int)144, framerate=(fraction)15/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)176, height=(int)144, framerate=(fraction)10/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)176, height=(int)144, framerate=(fraction)5/1</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)176, height=(int)144, framerate=(fraction)30/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)176, height=(int)144, framerate=(fraction)25/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)176, height=(int)144, framerate=(fraction)20/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)176, height=(int)144, framerate=(fraction)15/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)176, height=(int)144, framerate=(fraction)10/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)176, height=(int)144, framerate=(fraction)5/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)320, height=(int)240, framerate=(fraction)30/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)320, height=(int)240, framerate=(fraction)25/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)320, height=(int)240, framerate=(fraction)20/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)320, height=(int)240, framerate=(fraction)15/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)320, height=(int)240, framerate=(fraction)10/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)320, height=(int)240, framerate=(fraction)5/1</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)30/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)20/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)15/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)10/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)5/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)960, height=(int)720, framerate=(fraction)15/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)960, height=(int)720, framerate=(fraction)10/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)960, height=(int)720, framerate=(fraction)5/1</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)960, height=(int)720, framerate=(fraction)10/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)960, height=(int)720, framerate=(fraction)5/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)352, height=(int)288, framerate=(fraction)30/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)352, height=(int)288, framerate=(fraction)25/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)352, height=(int)288, framerate=(fraction)20/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)352, height=(int)288, framerate=(fraction)15/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)352, height=(int)288, framerate=(fraction)10/1</append>
        <append key="gstreamer.capabilities" type="strlist">image/jpeg, width=(int)352, height=(int)288, framerate=(fraction)5/1</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)352, height=(int)288, framerate=(fraction)30/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)352, height=(int)288, framerate=(fraction)25/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)352, height=(int)288, framerate=(fraction)20/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)352, height=(int)288, framerate=(fraction)15/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)352, height=(int)288, framerate=(fraction)10/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)352, height=(int)288, framerate=(fraction)5/1, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)1280, height=(int)960, framerate=(fraction)15/2, format=(fourcc)YUY2</append>
        <append key="gstreamer.capabilities" type="strlist">video/x-raw-yuv, width=(int)1280, height=(int)960, framerate=(fraction)5/1, format=(fourcc)YUY2</append>
      </match>
    </match>
  </device>
</deviceinfo>

Sorry I am a bit a slow.  
Comment 18 Jaap A. Haitsma 2008-01-03 11:45:47 UTC
OK, camera should work

Some more questions:

1) Does  gst-launch-0.10 v4l2src ! ffmpegcolorspace ! ximagesink  work
2) Which version of gstreamer do you have installed. Run  pkg-config --modversion gstreamer-0.10 
3) Did you compile cheese yourself?
4) Can you run cheese --verbose and paste output
Comment 19 Jack Deslippe 2008-01-03 17:08:58 UTC
The first command does not work:

[jdeslip@jdeslippe ~]$ gst-launch-0.10 v4l2src ! ffmpegcolorspace ! ximagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
ERROR: from element /pipeline0/v4l2src0: Could not get enough buffers from device '/dev/video0'.
Additional debug info:
v4l2src_calls.c(1034): gst_v4l2src_capture_init (): /pipeline0/v4l2src0:
we received 0 from device '/dev/video0', we want at least 2
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
FREEING pipeline ...

However, if I do like I said in my original post and add queue-size=2 it does:

[jdeslip@jdeslippe ~]$ gst-launch-0.10 v4l2src queue-size=2 ! ffmpegcolorspace ! ximagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

I am using 0.10.15:

[jdeslip@jdeslippe ~]$ pkg-config --modversion gstreamer-0.10 
0.10.15

Running cheese verbose gives the following output (ommiting lines about missing debug files):

[jdeslip@jdeslippe ~]$ cheese --verbose
device: /dev/video0

(and that is all now...)
Comment 20 Jaap A. Haitsma 2008-01-04 01:03:08 UTC
Created attachment 102080 [details] [review]
Patch with queue-size=2

Can you try cheese from SVN with this patch applied.

It's actually a bug in gstreamer see bug #490034
That has been fixed but there has not been a release yet of gst-plugins-good
Comment 21 robin 2008-01-04 12:59:43 UTC
Running svn cheese with the patch applied renders me a serious backtrace that starts with:

Detected webcam: Laptop Integrated Webcam
device: /dev/v4l/video0
video/x-raw-yuv 352 x 288 num_framerates 4
30/1 15/1 10/1 5/1 
video/x-raw-yuv 640 x 480 num_framerates 2
10/1 5/1 
video/x-raw-yuv 320 x 240 num_framerates 4
30/1 15/1 10/1 5/1 
video/x-raw-yuv 176 x 144 num_framerates 4
30/1 15/1 10/1 5/1 
video/x-raw-yuv 160 x 120 num_framerates 4
30/1 15/1 10/1 5/1 
v4l2src name=video_source device=/dev/v4l/video0 queue-size=2 ! video/x-raw-yuv,width=640,height=480,framerate=10/1 ! identity

** (cheese:7776): WARNING **: Size 4156 is not a multiple of unit size 614400
*** glibc detected *** cheese: munmap_chunk(): invalid pointer: 0x000000000066d630 ***
Comment 22 robin 2008-01-04 13:09:29 UTC
Not quite sure what I am doing, but a gdb where after the crash gives me this:

(gdb) where
  • #0 raise
    from /lib/libc.so.6
  • #1 abort
    from /lib/libc.so.6
  • #2 ??
    from /lib/libc.so.6
  • #3 ??
    from /lib/libc.so.6
  • #4 cheese_window_video_saved_cb
    at cheese-window.c line 152
  • #5 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #6 ??
    from /usr/lib/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #8 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #9 cheese_webcam_bus_message_cb
    at cheese-webcam.c line 228
  • #10 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #11 ??
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #14 gst_bus_async_signal_func
    from /usr/lib/libgstreamer-0.10.so.0
  • #15 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #16 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #17 ??
    from /usr/lib/libglib-2.0.so.0
  • #18 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #19 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #20 main
    at cheese.c line 81

Helpful?
Comment 23 Jack Deslippe 2008-01-05 03:47:07 UTC
The patch fixed cheese for me.  I can now see myself - been a long time.  If you look at my original bug report - it was more of a feature request that when I added queue-size=2 to the v4lsrc line in gconf that cheese should use that setting (i.e. why not just use what gconf is set to?)

Thanks for all the effort.  

-Jack
Comment 24 Jaap A. Haitsma 2008-01-05 12:46:30 UTC
Thanks fix has been committed

2008-01-05  Jaap Haitsma <jaap@haitsma.org>

	* src/cheese-webcam.c: 
	  Force queue-size=2 to make cheese work for some cameras which in
	  gst-plugins-good 0.10.6 have a bug and queue-size is set to 0. 
	  This is fixed in gstreamer CVS already, but no release has been made
	  yet. This patch fixes cheese bug #503503
Comment 25 daniel g. siegel 2008-01-05 14:00:24 UTC
thanks jaap! btw: i think a gconf option would be better than forcing it for all webcams. i dont know about that, but it _could_ produce other bugs for other cams
Comment 26 Jaap A. Haitsma 2008-01-05 15:27:11 UTC
All cameras should have 2 buffers because that's the default for v4l2src and v4lsrc. So we should be fine. We can remove this as soon as we depend of 0.10.7 of gst-plugins-good
Comment 27 daniel g. siegel 2008-01-05 15:35:28 UTC
ok!
Comment 28 robin 2008-01-05 15:43:47 UTC
As this bug is marked as resolved, should I file a new bug with the
"** (cheese:11304): WARNING **: Size 4156 is not a multiple of unit size 614400"
error (see comment #21)?
Comment 29 daniel g. siegel 2008-02-02 17:52:23 UTC
the missing queue-size attribute bug has been fixed in gstreamer 0.10.7, scheduled to be released on February 18th.

therefore we wont add it to the development version of cheese
Comment 30 daniel g. siegel 2008-02-02 17:52:59 UTC
*** Bug 513563 has been marked as a duplicate of this bug. ***
Comment 31 daniel g. siegel 2008-02-02 17:53:08 UTC
*** Bug 508912 has been marked as a duplicate of this bug. ***