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 701953 - wrappercamerabinsrc: Add video-source-filter during construction
wrappercamerabinsrc: Add video-source-filter during construction
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Linux
: Normal normal
: 1.1.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-10 18:07 UTC by Hans de Goede
Modified: 2013-06-11 10:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] gstwrappercamerabinsrc: Add video-source-filter during construction (1.95 KB, patch)
2013-06-10 18:07 UTC, Hans de Goede
committed Details | Review

Description Hans de Goede 2013-06-10 18:07:22 UTC
Created attachment 246425 [details] [review]
[PATCH] gstwrappercamerabinsrc: Add video-source-filter during construction

By adding the video-source-filter during construction time, rather then
patching it in later (*), we can avoid a potentially expensive renegotiation
later on. And if the video-source-filter also reduces the video-source
caps, we also greatly reduce the amount of caps involved
in negotiation, speeding up pipeline creation further.

I wrote this while working on speeding up the startup of cheese. My cheese
has been modified to add a capsfilter, filtering for only the configured
resolution, with that cheese patch + this patch, the pipeline creation time
goes from aprox 1.1 seconds to aprox 350ms. This is with a Logitech 9000
pro camera, which supports lots of different resolutions at many different
framerates per resolution, causing a caps "explosion" if not filtered.

*) Note the code for this is left in, as it is still necessary if the
video-source-filter is changed between a stop + re-start.
Comment 1 Sebastian Dröge (slomo) 2013-06-11 10:49:13 UTC
It might make sense to use gst_caps_simplify() in the source to make the caps a bit smaller (note that it causes the caps order to change). Also a capsfilter from the application definitely makes sense if you have restrictions from the app anyway.

commit 28e64d10312d9df97ba609ee9ca871595fff8db2
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Mon Jun 10 17:00:42 2013 +0200

    wrappercamerabinsrc: Add video-source-filter during construction
    
    By adding the video-source-filter during construction time, rather then
    patching it in later (*), we can greatly reduce the amount of caps involved
    in negotation, speeding up pipeline creation.
    
    I wrote this while working on speeding up the startup of cheese. My cheese
    has been modified to add a capsfilter, filtering for only the configured
    resolution, with that cheese patch + this patch, the pipeline creation time
    goes from aprox 1.1 seconds to aprox 350ms. This is with a Logitech 9000
    pro camera, which supports lots of different resolutions at many different
    framerates per resolution, causing a caps "explosion" if not filtered.
    
    *) Note the code for this is left in, as it is still necessary if the
    video-source-filter is changed between a stop + re-start.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701953