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 505799 - iSight camera does not work in gstreamer
iSight camera does not work in gstreamer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.15
Other All
: Normal critical
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 506643 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-12-26 21:32 UTC by Lars Strojny
Modified: 2008-01-06 10:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (1.08 KB, patch)
2008-01-05 00:39 UTC, Andrzej Szombierski
none Details | Review

Description Lars Strojny 2007-12-26 21:32:33 UTC
Steps to reproduce:
1. Start the application
2. Application segfaults


Stack trace:
  • #0 gst_value_init_and_copy
    from /usr/lib/libgstreamer-0.10.so.0
  • #1 ??
    from /usr/lib/libgstreamer-0.10.so.0

Other information:
If you need to have a detailed backtrace for gstreamer, I would compile gstreamer with debug symbols activated.
Comment 1 Lars Strojny 2007-12-26 21:34:31 UTC
The cam part from lshal:
udi = '/org/freedesktop/Hal/devices/usb_device_5ac_8501_noserial'
  info.bus = 'usb_device'  (string)
  info.linux.driver = 'usb'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_0_0_0000_00_1d_7'  (string)
  info.product = 'Built-in iSight'  (string)
  info.subsystem = 'usb_device'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_5ac_8501_noserial'  (string)
  info.vendor = 'Apple Computer, Inc.'  (string)
  linux.device_file = '/dev/bus/usb/005/009'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'usb'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-4'  (string)
  usb_device.bus_number = 5  (0x5)  (int)
  usb_device.can_wake_up = false  (bool)
  usb_device.configuration_value = 1  (0x1)  (int)
  usb_device.device_class = 255  (0xff)  (int)
  usb_device.device_protocol = 255  (0xff)  (int)
  usb_device.device_revision_bcd = 388  (0x184)  (int)
  usb_device.device_subclass = 255  (0xff)  (int)
  usb_device.is_self_powered = false  (bool)
  usb_device.linux.device_number = 9  (0x9)  (int)
  usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-4'  (string)
  usb_device.max_power = 100  (0x64)  (int)
  usb_device.num_configurations = 1  (0x1)  (int)
  usb_device.num_interfaces = 2  (0x2)  (int)
  usb_device.num_ports = 0  (0x0)  (int)
  usb_device.product = 'Built-in iSight'  (string)
  usb_device.product_id = 34049  (0x8501)  (int)
  usb_device.speed = 480.0 (480) (double)
  usb_device.speed_bcd = 294912  (0x48000)  (int)
  usb_device.vendor = 'Apple Computer, Inc.'  (string)
  usb_device.vendor_id = 1452  (0x5ac)  (int)
  usb_device.version = 2.0 (2) (double)
  usb_device.version_bcd = 512  (0x200)  (int)


/dev/v4l/video0 is present, driver is uvc-linux (http://linux-uvc.berlios.de/), SVN version behaves the same.
Comment 2 daniel g. siegel 2007-12-26 21:40:39 UTC
are you sure that you are using gstreamer 0.10.15?

does it work with a simple gstreamer pipeline, like:
gst-launch v4l2src ! ffmpegcolorspace ! ximagesink

Comment 3 Lars Strojny 2007-12-26 22:33:15 UTC
Yes, gstreamer is 0.10.15. Pipe does also not work. So I guess I have to file that bug to the gstreamer guys.

$ gst-launch-0.10 v4l2src ! ffmpegcolorspace ! ximagesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
FEHLER: Von Element /pipeline0/v4l2src0: Could not negotiate format
Zusätzliche Debugginginformation:
gstbasesrc.c(2293): gst_base_src_start (): /pipeline0/v4l2src0:
Check your filtered caps, if any
Setting pipeline to NULL ...
FREEING pipeline ...
Comment 4 daniel g. siegel 2007-12-26 22:42:24 UTC
ah ok. i had the same problem here with some older kernels and the wrong isight drivers. please refer to this page http://i-nz.net/projects/linux-kernel/
Comment 5 Lars Strojny 2007-12-26 23:26:42 UTC
Oh, I'm using the latest driver from SVN. I'm a bit confused now. It works pretty fine with mplayer tv://.
Comment 6 daniel g. siegel 2007-12-27 10:59:53 UTC
well, this is either a gstreamer or an isight driver bug
Comment 7 Lars Strojny 2008-01-01 17:15:42 UTC
(gdb) bt
  • #0 gst_value_init_and_copy
    at gstvalue.c line 3216
  • #1 fixate_value
    at gstpad.c line 2113
  • #2 gst_pad_default_fixate
    at gstpad.c line 2151
  • #3 gst_structure_foreach
    at gststructure.c line 914
  • #4 gst_pad_fixate_caps
    at gstpad.c line 2188
  • #5 gst_base_src_default_negotiate
    at gstbasesrc.c line 2163
  • #6 gst_base_src_start
    at gstbasesrc.c line 2198
  • #7 gst_base_src_activate_push
    at gstbasesrc.c line 2434
  • #8 gst_pad_activate_push
    at gstpad.c line 886
  • #9 gst_pad_set_active
    at gstpad.c line 648
  • #10 activate_pads
    at gstelement.c line 2494
  • #11 gst_iterator_fold
    at gstiterator.c line 503
  • #12 iterator_activate_fold_with_resync
    at gstelement.c line 2526
  • #13 gst_element_pads_activate
    at gstelement.c line 2562
  • #14 gst_element_change_state_func
    at gstelement.c line 2636
  • #15 gst_base_src_change_state
    at gstbasesrc.c line 2570
  • #16 gst_element_change_state
    at gstelement.c line 2410
  • #17 gst_element_set_state_func
    at gstelement.c line 2360
  • #18 gst_bin_change_state_func
    at gstbin.c line 1925
  • #19 gst_pipeline_change_state
    at gstpipeline.c line 466
  • #20 gst_element_change_state
    at gstelement.c line 2410
  • #21 gst_element_change_state
    at gstelement.c line 2447
  • #22 gst_element_set_state_func
    at gstelement.c line 2360
  • #23 ??

Comment 8 Lars Strojny 2008-01-01 17:30:04 UTC
I cannot change to component GStreamer but this is likely a Gstreamer or driver bug. Can someone do that with the appropriate rights?
Comment 9 Jaap A. Haitsma 2008-01-01 17:38:36 UTC
Changing to gstreamer
Comment 10 Wim Taymans 2008-01-04 18:39:36 UTC
*** Bug 506643 has been marked as a duplicate of this bug. ***
Comment 11 Wim Taymans 2008-01-04 18:40:04 UTC
The crasher is because the framerate cannot be detected, causing gstreamer to do fancy stuff with an empty framerate list. See Bug #506643.
Comment 12 Lars Strojny 2008-01-04 22:16:56 UTC
What needs to be done in order to detect the frame rate?
Comment 13 Andrzej Szombierski 2008-01-05 00:39:22 UTC
Created attachment 102189 [details] [review]
proposed fix

I've created a short patch which seems to fix the problems for me. I'm not sure if the V4L2 spec allows stepwise frame-rate settings with lower bound equal to the upper bound, but this fix  enables gstreamer to work under such conditions.
BTW, the code for stepwise frame-rate settings looks like it's never been tested, It's obvious that it couldn't have worked correctly as it is attempting to use the same name (frac) to refer to two differently-scoped variables.
Comment 14 Lars Strojny 2008-01-05 03:40:43 UTC
Thanks for you patch Andrzej, however it does not fix the problem here. When executing the pipe I know get the following:
$ gst-launch-0.10 v4l2src ! ffmpegcolorspace ! ximagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
FEHLER: Von Element /pipeline0/v4l2src0: Could not get enough buffers from device '/dev/video0'.
Zusätzliche Debugginginformation:
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 ...
Comment 15 Lars Strojny 2008-01-05 04:16:19 UTC
Please ignore my comment above. I've found #467214 which addresses the issue with receiving too less buffers from the device. The suggested workaround works fine (setting queue-size explicitly). So your fix addressed the problem just fine, thanks Andrzej.
Comment 16 Tim-Philipp Müller 2008-01-05 11:38:20 UTC
Andrzej: have you tried the v4l2src version from CVS? I think this problem has already been fixed (things work fine with my iSight at least).
Comment 17 Andrzej Szombierski 2008-01-06 00:43:15 UTC
Right, I didn't notice that the CVS version was fixed already. It works fine for me, and also fixes the unspecified queue-size problem.
Comment 18 Tim-Philipp Müller 2008-01-06 10:59:25 UTC
Great, thanks for confirming.