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 147789 - [PATCH] preferred caps patch
[PATCH] preferred caps patch
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-07-17 21:43 UTC by David Schleef
Modified: 2005-04-14 16:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (12.73 KB, patch)
2004-07-17 21:43 UTC, David Schleef
none Details | Review
patch (11.89 KB, patch)
2004-07-23 00:48 UTC, David Schleef
none Details | Review
patch that reverts preferred caps (12.85 KB, patch)
2004-09-26 17:29 UTC, Thomas Vander Stichele
committed Details | Review

Description David Schleef 2004-07-17 21:43:28 UTC
Patch that adds preferred format to caps structure.  Negotiation uses this
preference if available, and attempts to guess preferences of pads (using the
fixate function) that don't directly specify a preference.

This patch is API/ABI compatible.

I'm not entirely happy with the patch, as it creates lots of loose ends.  IMO,
it works correctly in many cases only by mere luck.  Clearly, this is better
than the current fixation, which only has bad luck.
Comment 1 David Schleef 2004-07-17 21:43:52 UTC
Created attachment 29611 [details] [review]
patch
Comment 2 David Schleef 2004-07-23 00:48:46 UTC
Created attachment 29809 [details] [review]
patch
Comment 3 David Schleef 2004-08-18 21:48:23 UTC
Applied.
Comment 4 Thomas Vander Stichele 2004-09-25 08:13:04 UTC
The patch creates infinite loops.

snippet of debug:

DEBUG (0x86ee310 - 304458:38:48.971995000)        GST_PADS(27420)
gstpad.c(2675):gst_pad_guess_preferred: fixated to video/x-raw-rgb,
depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)65280,
green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 16, 2147483647
], height=(int)[ 16, 2147483647 ],
framerate=(double)29.970029970029973
DEBUG (0x86ee310 - 304458:38:48.972186000)      videoscale(27420)
gstvideoscale.c(399):gst_videoscale_src_fixate:<vscale:src> asked to fixate caps
video/x-raw-rgb, depth=(int)24, bpp=(int)32, endianness=(int)4321,
red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216,
width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ],
framerate=(double)29.970029970029973
DEBUG (0x86ee310 - 304458:38:48.972365000)        GST_PADS(27420)
gstpad.c(2675):gst_pad_guess_preferred: fixated to video/x-raw-rgb,
depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)65280,
green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 16, 2147483647
], height=(int)[ 16, 2147483647 ],
framerate=(double)29.970029970029973
DEBUG (0x86ee310 - 304458:38:48.972547000)      videoscale(27420)
gstvideoscale.c(399):gst_videoscale_src_fixate:<vscale:src> asked to fixate caps
video/x-raw-rgb, depth=(int)24, bpp=(int)32, endianness=(int)4321,
red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216,
width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ],
framerate=(double)29.970029970029973


I've been told videoscale should be fixed, but not how.

Anyways, I can't release 0.8.6 with this since it will break applications.
Comment 5 Thomas Vander Stichele 2004-09-26 17:29:10 UTC
reverting, patch adds API and breaks some plugins and playback, needswork.
Attaching revert patch.
Comment 6 Thomas Vander Stichele 2004-09-26 17:29:59 UTC
Created attachment 31952 [details] [review]
patch that reverts preferred caps
Comment 7 David Schleef 2004-09-28 03:02:30 UTC
Just remove the (only) call to gst_pad_guess_preferred().  It's not strictly
necessary, and is only an aid to use fixate functions to create preferences.
Comment 8 Thomas Vander Stichele 2004-09-28 10:50:08 UTC
gst-launch  v4lsrc device=/dev/video0 copy-mode=true autoprobe=false !        
video/x-raw-yuv,width=320,height=240,framerate=7.5 ! theoraenc ! fakesink

also fails with a bunch of asserts for caps stuff. works fine with the patch
reverted too.
Comment 9 Stephane Loeuillet 2004-12-12 14:20:50 UTC
confirming bug, adding PATCH keyword
Comment 10 Ronald Bultje 2005-02-03 23:58:06 UTC
Comment on attachment 31952 [details] [review]
patch that reverts preferred caps

marking committed to make patch-tracker happy.
Comment 11 Ronald Bultje 2005-04-14 16:56:53 UTC
Dave told me a while ago he wasn't planning on applying it. Dave, I may be
wrong, in which case you should reopen (and tell us your plan on applying this),
but I'll close this bug as obsolete for now.