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 139535 - [v4lsrc] video size with spider is badly negotiated
[v4lsrc] video size with spider is badly negotiated
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 0.9.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-04-09 00:34 UTC by Stephane Loeuillet
Modified: 2005-07-16 16:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
full debug log (6.01 KB, application/x-bzip)
2004-05-03 09:56 UTC, Stephane Loeuillet
Details

Description Stephane Loeuillet 2004-04-09 00:34:33 UTC
using : v4lsrc ! ffmpegcolorspace ! xvimagesink => window has the good size
using : v4lsrc ! spider ! xvimagesink => video is in a 2cm * 1cm thumbnail

so, bad video size renegotiation
Comment 1 David Schleef 2004-04-09 01:40:16 UTC
Both piplelines have unconstrained caps, i.e., many different formats are
equally possible (size, framerate, colorspace).  It is up to the application
writer to either use filtered caps to get the exact format desired, or use a
fixate signal to encourage a good format.  Since gst-launch doesn't have such
hints, the core pretty much picks a format at random; sometimes it doesn't suck.
Comment 2 Ronald Bultje 2004-04-10 00:08:23 UTC
v4lsrc (and others) still need fixate functions, I'd say.
Comment 3 Ronald Bultje 2004-04-28 23:32:49 UTC
Thomas recently added fixate functions to v4lsrc, can you retest?
Comment 4 Stephane Loeuillet 2004-05-01 10:35:38 UTC
no luck, it still fails when using spider

but it adds the following warnings :

(process:9776): GStreamer-CRITICAL **: file gstcaps.c: line 413
(gst_caps_get_structure): assertion `index < caps->structs->len' failed
 
(process:9776): GStreamer-CRITICAL **: file gststructure.c: line 767
(gst_structure_has_field): assertion `structure != NULL' failed
 
(process:9776): GStreamer-CRITICAL **: file gstcaps.c: line 1489
(gst_caps_structure_fixate_field_nearest_int): assertion
`gst_structure_has_field (structure, field_name)' failed
 
(process:9776): GStreamer-CRITICAL **: file gststructure.c: line 767
(gst_structure_has_field): assertion `structure != NULL' failed
 
(process:9776): GStreamer-CRITICAL **: file gstcaps.c: line 1489
(gst_caps_structure_fixate_field_nearest_int): assertion
`gst_structure_has_field (structure, field_name)' failed
Comment 5 Stephane Loeuillet 2004-05-01 10:37:48 UTC
note that with v4l2src, errors are different :ERROR         v4l2src( 9822)
v4l2src_calls.c(216):gst_v4l2src_set_capture:<v4l2src0> (null)
ERROR         v4l2src( 9822)
v4l2src_calls.c(216):gst_v4l2src_set_capture:<v4l2src0> failed to set
pixelformat to 4:2:0, planar, Y-Cr-Cb @ 48x32 for device /dev/video0:
Périphérique ou ressource occupé
ERROR: from element /pipeline0/v4l2src0: Could not get/set settings from/on
resource.
Additional debug info:
v4l2src_calls.c(216): gst_v4l2src_set_capture: /pipeline0/v4l2src0:
failed to set pixelformat to 4:2:0, planar, Y-Cr-Cb @ 48x32 for device
/dev/video0: Périphérique ou ressource occupé
ERROR         v4l2src( 9822)
v4l2src_calls.c(369):gst_v4l2src_capture_stop:<v4l2src0> (null)
ERROR         v4l2src( 9822)
v4l2src_calls.c(369):gst_v4l2src_capture_stop:<v4l2src0> Device is not in
streaming mode
 
(process:9822): GStreamer-WARNING **: could not PAUSE element "v4l2src0" after
error, help!
ERROR         v4l2src( 9822)
v4l2src_calls.c(216):gst_v4l2src_set_capture:<v4l2src0> (null)
ERROR         v4l2src( 9822)
v4l2src_calls.c(216):gst_v4l2src_set_capture:<v4l2src0> failed to set
pixelformat to 24 bpp RGB, le @ 48x32 for device /dev/video0: Périphérique ou
ressource occupé
ERROR: from element /pipeline0/v4l2src0: Could not get/set settings from/on
resource.
Additional debug info:
v4l2src_calls.c(216): gst_v4l2src_set_capture: /pipeline0/v4l2src0:
failed to set pixelformat to 24 bpp RGB, le @ 48x32 for device /dev/video0:
Périphérique ou ressource occupé

"v4l2src device=/dev/video0 ! ffmpegcolorspace ! xvimagesink" works as expected 
Comment 6 Ronald Bultje 2004-05-01 18:00:58 UTC
That's v4l2src. I was talking about v4lsrc. :).
Comment 7 Stephane Loeuillet 2004-05-01 18:46:01 UTC
comment #4 is when using v4lsrc
comment #5 is when doing the same thing with v4lsrc2 (perhaps another unrelated bug)
Comment 8 Thomas Vander Stichele 2004-05-03 09:14:09 UTC
Stephane, for #4 I'd like to see a backtrace from running inside gdb with
--gst-fatal-warnings, so we can fix the criticals and warnings.

Ronald, for #5 maybe you could port over the fixate functions I added, I have no
idea how to test v4l2.

In general, it might make sense to have a fixate function for ffmpegcolorspace
that preserves w/h from the other side, in the same way audioconvert does. 
ffmpegcolorspace gets added so much that it's really annoying to have it cause
an override of negotiations in other parts.
Comment 9 Stephane Loeuillet 2004-05-03 09:56:31 UTC
Created attachment 27322 [details]
full debug log

gst-launch-0.8 --gst-scheduler=basicgthread --gst-fatal-warnings
--gst-debug-level=5 v4lsrc device=/dev/video0 ! spider ! xvimagesink
Comment 10 Stephane Loeuillet 2004-05-03 10:16:42 UTC
Comment on attachment 27322 [details]
full debug log

hum, marked it as plain-text, but it is a bz2 archive
Comment 11 Ronald Bultje 2004-05-03 14:20:44 UTC
Thomas: You mean videoscale. ffcolorspace cannot scale.
Comment 12 Andy Wingo 2005-07-15 09:17:17 UTC
Fixed in HEAD, aside from the fact that v4l2src is not yet ported to 0.9. Open a
new bug for any bad behavior once it has been ported, tho.