GNOME Bugzilla – Bug 642130
[basetransform] Check for pad alloc caps when suggestion is not fixed
Last modified: 2011-02-14 15:02:05 UTC
In a specific scenario, such as (capsfilter caps must be changed from NULL to some non-fixed raw video caps): v4l2src ! ffmpegcolorspace ! capsfilter ! ... v4l2src doesn't use pad-allocs and capsfilter would keep computing some caps to suggest upstream when ffmpegcolorspace did a pad-alloc, but it would never reach the source as it doesn't do pad-allocs. This degraded performance as this was done for every buffer. The attached patch fixes this by attempting to suggest the same caps as the input caps of the pad-alloc when intersecting the suggestion with the peer caps still results on non-fixed caps.
Created attachment 180689 [details] [review] basetransform: Check for pad alloc caps when suggestion is not fixed If after computing the suggestion with downstream caps we still have a non-fixed suggestion caps try to intersect with the input caps of the pad alloc to avoid useless renegotiations.
(In reply to comment #0) This part wasn't as clear written as it was in my head > In a specific scenario, such as: > > v4l2src ! ffmpegcolorspace ! capsfilter ! ... (capsfilter caps must be changed from NULL to some non-fixed raw video caps after setting to playing) > > v4l2src doesn't use pad-allocs and capsfilter would keep computing some > caps to suggest upstream when ffmpegcolorspace did a pad-alloc, > but it would never reach the source as it doesn't do pad-allocs. This > degraded performance as this was done for every buffer. > > The attached patch fixes this by attempting to suggest the same caps > as the input caps of the pad-alloc when intersecting the suggestion with > the peer caps still results on non-fixed caps.
commit 3aaef921c5493df57c78be1f46c1925d0a49bc53 Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk> Date: Fri Feb 11 17:47:17 2011 -0300 basetransform: Check for pad alloc caps when suggestion is not fixed If after computing the suggestion with downstream caps we still have a non-fixed suggestion caps try to intersect with the input caps of the pad alloc to avoid useless renegotiations. https://bugzilla.gnome.org/show_bug.cgi?id=642130