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 523664 - [v4l2src] get_caps() does not return the caps it's currently using!
[v4l2src] get_caps() does not return the caps it's currently using!
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-21 00:53 UTC by Olivier Crête
Modified: 2010-04-29 22:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Olivier Crête 2008-03-21 00:53:10 UTC
v4l2src returns different caps from its get_caps() function every time I call it.. 

When its called when the pipeline is running, it returns caps that are incompatible with the ones it called setcaps() with. It should at least cache those and return them unioned with whatever else it has. Or maybe the FIXME should be fixed in get_caps()..


Small python program that shows the problem with my Logitech Quickcam Fusion (where 15/1 is not an acceptable framerate once the device has been opened):

import gst,time

pipeline = gst.parse_launch ("v4l2src ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,framerate=(fraction)15/1,width=352, height=288, format=(fourcc)I420 ! identity name=i ! ffmpegcolorspace ! videoscale ! xvimagesink sync=false")

pipeline.set_state(gst.STATE_PLAYING);

time.sleep(1)

i = pipeline.get_by_name("i")

print i.get_pad("src").get_caps().to_string()

pipeline.set_state(gst.STATE_NULL);
Comment 1 Wim Taymans 2008-03-24 17:38:35 UTC
it's videoscale removing framerates from the caps.
Comment 2 Olivier Crête 2008-04-16 19:24:27 UTC
From the videoscale source, I don't see where it does that..
Comment 3 Tim-Philipp Müller 2010-04-29 22:17:39 UTC
I don't understand this bug - can someone enlighten me?

Olivier: Is it still an issue? If yes, what's the output you're seeing?

With an unhandled framerate I just get EMPTY caps, with an acceptable framerate I just get the same caps over and over again (iSight).
Comment 4 Tim-Philipp Müller 2010-04-29 22:18:15 UTC
Oh, and some GST_DEBUG output would be nice too if it still exists..
Comment 5 Olivier Crête 2010-04-29 22:33:28 UTC
I can't reproduce it with recent git, so I guess it must have been fixed somehow. Possibly in BaseTransform or something.
Comment 6 Tim-Philipp Müller 2010-04-29 22:53:44 UTC
Great, thanks for confirming.