wrappercamerabinsrc: Add video-source-filter during construction
authorHans de Goede <hdegoede@redhat.com>
Mon, 10 Jun 2013 15:00:42 +0000 (17:00 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Tue, 11 Jun 2013 10:47:53 +0000 (12:47 +0200)
commit28e64d10312d9df97ba609ee9ca871595fff8db2
treec9013ce82aa8bc72944b1069aba439c120460520
parent5732c53c810562dba6c4dd731f17f78be2821034
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
gst/camerabin2/gstwrappercamerabinsrc.c