diff --git a/0004-v4l2object-Don-t-probe-UVC-devices-for-being-interla.patch b/0004-v4l2object-Don-t-probe-UVC-devices-for-being-interla.patch new file mode 100644 index 0000000..4162cf1 --- /dev/null +++ b/0004-v4l2object-Don-t-probe-UVC-devices-for-being-interla.patch @@ -0,0 +1,46 @@ +From fefa084bde0850447ca5ed84775c094fcf0b2351 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 8 Jun 2012 20:38:34 +0200 +Subject: [PATCH] v4l2object: Don't probe UVC devices for being interlaced + +UVC devices are never interlaced, and doing VIDIOC_TRY_FMT on them +causes expensive and slow USB IO, so don't probe them for interlaced. + +This shaves 2 seconds of the startup time of cheese with a Logitech +Webcam Pro 9000. + +Signed-off-by: Hans de Goede +--- + sys/v4l2/gstv4l2object.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c +index 6564b91..ce52547 100644 +--- a/sys/v4l2/gstv4l2object.c ++++ b/sys/v4l2/gstv4l2object.c +@@ -1561,10 +1561,18 @@ gst_v4l2_object_probe_caps_for_format_and_size (GstV4l2Object * v4l2object, + gint int_width = width; + gint int_height = height; + +- /* interlaced detection using VIDIOC_TRY/S_FMT */ +- if (!gst_v4l2_object_get_nearest_size (v4l2object, pixelformat, +- &int_width, &int_height, &interlaced)) +- return NULL; ++ if (!strcmp((char *)v4l2object->vcap.driver, "uvcvideo")) { ++ /* ++ * UVC devices are never interlaced, and doing VIDIOC_TRY_FMT on them ++ * causes expensive and slow USB IO, so don't probe them for interlaced ++ */ ++ interlaced = FALSE; ++ } else { ++ /* Interlaced detection using VIDIOC_TRY/S_FMT */ ++ if (!gst_v4l2_object_get_nearest_size (v4l2object, pixelformat, ++ &int_width, &int_height, &interlaced)) ++ return NULL; ++ } + + memset (&ival, 0, sizeof (struct v4l2_frmivalenum)); + ival.index = 0; +-- +1.7.10.2 + diff --git a/gstreamer-plugins-good.spec b/gstreamer-plugins-good.spec index b69d9e5..d18af44 100644 --- a/gstreamer-plugins-good.spec +++ b/gstreamer-plugins-good.spec @@ -6,7 +6,7 @@ Name: %{gstreamer}-plugins-good Version: 0.10.31 -Release: 2%{?dist} +Release: 3%{?dist} Summary: GStreamer plug-ins with good code and licensing Group: Applications/Multimedia @@ -19,6 +19,8 @@ Patch1: 0001-fix-v4l2_munmap.patch Patch2: 0002-clear_DISCONT_flag.patch # https://bugzilla.gnome.org/show_bug.cgi?id=677516 Patch3: 0003-v4l2src-fix.patch +# https://bugzilla.gnome.org/show_bug.cgi?id=677722 +Patch4: 0004-v4l2object-Don-t-probe-UVC-devices-for-being-interla.patch Requires: %{gstreamer} >= %{_gst} Requires(pre): GConf2 @@ -110,6 +112,7 @@ This package contains documentation for the provided plugins. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build @@ -249,6 +252,10 @@ export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/gstreamer-%{majorminor}.schemas > /dev/null || : %changelog +* Fri Jun 10 2012 Hans de Goede - 0.10.31-3 +- v4l2: Don't probe UVC devices for being interlaced, this saves seconds when + starting a pipeline with a v4l2 element (rhbz#797188, gnome#677722) + * Wed Jun 6 2012 Hans de Goede 0.10.31-2 - v4l2src: Cherry pick some patches from upstream hopefully fixing #815581 - v4l2src: Deal with uvc cams which report duplicate framerates, such as