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 642130 - [basetransform] Check for pad alloc caps when suggestion is not fixed
[basetransform] Check for pad alloc caps when suggestion is not fixed
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: 0.10.33
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-11 21:22 UTC by Thiago Sousa Santos
Modified: 2011-02-14 15:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
basetransform: Check for pad alloc caps when suggestion is not fixed (1.70 KB, patch)
2011-02-11 21:22 UTC, Thiago Sousa Santos
none Details | Review

Description Thiago Sousa Santos 2011-02-11 21:22:15 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.
Comment 1 Thiago Sousa Santos 2011-02-11 21:22:18 UTC
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.
Comment 2 Thiago Sousa Santos 2011-02-11 21:24:15 UTC
(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.
Comment 3 Wim Taymans 2011-02-14 15:02:05 UTC
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