GNOME Bugzilla – Bug 147789
[PATCH] preferred caps patch
Last modified: 2005-04-14 16:56:53 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.
Created attachment 29611 [details] [review] patch
Created attachment 29809 [details] [review] patch
Applied.
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.
reverting, patch adds API and breaks some plugins and playback, needswork. Attaching revert patch.
Created attachment 31952 [details] [review] patch that reverts preferred caps
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.
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.
confirming bug, adding PATCH keyword
Comment on attachment 31952 [details] [review] patch that reverts preferred caps marking committed to make patch-tracker happy.
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.