diff --git a/multimedia/video/gst-plugins-good/actions.py b/multimedia/video/gst-plugins-good/actions.py new file mode 100644 index 0000000000..c17e70ce00 --- /dev/null +++ b/multimedia/video/gst-plugins-good/actions.py @@ -0,0 +1,27 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools + +def setup(): + autotools.configure("--disable-static \ + --disable-esd \ + --disable-rpath \ + --with-package-name='PisiLinux gstreamer-plugins-good package' \ + --with-package-origin='http://www.pisilinux.org' \ + --disable-schemas-install") + + + pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ") + +def build(): + autotools.make() + +def install(): + autotools.install() + + pisitools.dodoc("AUTHORS", "README", "RELEASE") diff --git a/multimedia/video/gst-plugins-good/files/0001-fix-v4l2_munmap.patch b/multimedia/video/gst-plugins-good/files/0001-fix-v4l2_munmap.patch new file mode 100644 index 0000000000..1913fb046c --- /dev/null +++ b/multimedia/video/gst-plugins-good/files/0001-fix-v4l2_munmap.patch @@ -0,0 +1,58 @@ +From 4cd9255f0a8a9e15d81561f00f02d275b5095f70 Mon Sep 17 00:00:00 2001 +From: Oleksij Rempel (Alexey Fisher) +Date: Thu, 01 Mar 2012 13:15:29 +0000 +Subject: v4l2src: fix v4l2_munmap() for compressed formats + +Make sure we always call munmap() with the same size we called mmap() +with before. + +Current v4l2src uses the same structure for VIDIOC_QUERYBUF, VIDIOC_QBUF +and v4l2_munmap calls. The problem is that the video buffer size (length) +may vary for compressed or emulated bufs. VIDIOC_QBUF will change it if +we pass the pointer of a v4l2_buffer. This is why we should avoid using +same variable for mmap and video buffers. + +https://bugzilla.gnome.org/show_bug.cgi?id=671126 +--- +(limited to 'sys/v4l2') + +diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c +index b81c6a4..51419ff 100644 +--- a/sys/v4l2/gstv4l2bufferpool.c ++++ b/sys/v4l2/gstv4l2bufferpool.c +@@ -106,9 +106,9 @@ gst_v4l2_buffer_finalize (GstV4l2Buffer * buffer) + if (!resuscitated) { + GST_LOG_OBJECT (pool->v4l2elem, + "buffer %p (data %p, len %u) not recovered, unmapping", +- buffer, GST_BUFFER_DATA (buffer), buffer->vbuffer.length); ++ buffer, GST_BUFFER_DATA (buffer), buffer->mmap_length); + gst_mini_object_unref (GST_MINI_OBJECT (pool)); +- v4l2_munmap ((void *) GST_BUFFER_DATA (buffer), buffer->vbuffer.length); ++ v4l2_munmap ((void *) GST_BUFFER_DATA (buffer), buffer->mmap_length); + + GST_MINI_OBJECT_CLASS (v4l2buffer_parent_class)->finalize (GST_MINI_OBJECT + (buffer)); +@@ -183,6 +183,7 @@ gst_v4l2_buffer_new (GstV4l2BufferPool * pool, guint index, GstCaps * caps) + GST_LOG_OBJECT (pool->v4l2elem, " length: %u", ret->vbuffer.length); + GST_LOG_OBJECT (pool->v4l2elem, " input: %u", ret->vbuffer.input); + ++ ret->mmap_length = ret->vbuffer.length; + data = (guint8 *) v4l2_mmap (0, ret->vbuffer.length, + PROT_READ | PROT_WRITE, MAP_SHARED, pool->video_fd, + ret->vbuffer.m.offset); +diff --git a/sys/v4l2/gstv4l2bufferpool.h b/sys/v4l2/gstv4l2bufferpool.h +index caad9ac..36ea323 100644 +--- a/sys/v4l2/gstv4l2bufferpool.h ++++ b/sys/v4l2/gstv4l2bufferpool.h +@@ -70,6 +70,9 @@ struct _GstV4l2Buffer { + GstBuffer buffer; + + struct v4l2_buffer vbuffer; ++ /* warning: the size of mmap buffer and ++ * the actual frame-buffer can be different. */ ++ size_t mmap_length; + + /* FIXME: have GstV4l2Src* instead, as this has GstV4l2BufferPool* */ + /* FIXME: do we really want to fix this if GstV4l2Buffer/Pool is shared +-- +cgit v0.9.0.2-2-gbebe diff --git a/multimedia/video/gst-plugins-good/files/0001-sys-v4l2-Some-blind-compilation-fixes.patch b/multimedia/video/gst-plugins-good/files/0001-sys-v4l2-Some-blind-compilation-fixes.patch new file mode 100644 index 0000000000..e03fdac894 --- /dev/null +++ b/multimedia/video/gst-plugins-good/files/0001-sys-v4l2-Some-blind-compilation-fixes.patch @@ -0,0 +1,57 @@ +From fa21c0bb253213c9dc48ce72faaf7090dc8a3554 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Thu, 2 May 2013 16:16:46 -0400 +Subject: [PATCH] sys/v4l2: Some blind compilation fixes + +--- + sys/v4l2/gstv4l2bufferpool.c | 1 - + sys/v4l2/v4l2_calls.c | 12 ++++-------- + 2 files changed, 4 insertions(+), 9 deletions(-) + +diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c +index a0b4c84..3916815 100644 +--- a/sys/v4l2/gstv4l2bufferpool.c ++++ b/sys/v4l2/gstv4l2bufferpool.c +@@ -182,7 +182,6 @@ gst_v4l2_buffer_new (GstV4l2BufferPool * pool, guint index, GstCaps * caps) + GST_LOG_OBJECT (pool->v4l2elem, " MMAP offset: %u", + ret->vbuffer.m.offset); + GST_LOG_OBJECT (pool->v4l2elem, " length: %u", ret->vbuffer.length); +- GST_LOG_OBJECT (pool->v4l2elem, " input: %u", ret->vbuffer.input); + + ret->mmap_length = ret->vbuffer.length; + data = (guint8 *) v4l2_mmap (0, ret->vbuffer.length, +diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c +index 309bfb6..ee3ff9f 100644 +--- a/sys/v4l2/v4l2_calls.c ++++ b/sys/v4l2/v4l2_calls.c +@@ -53,14 +53,6 @@ + + #include "gst/gst-i18n-plugin.h" + +-/* Those are ioctl calls */ +-#ifndef V4L2_CID_HCENTER +-#define V4L2_CID_HCENTER V4L2_CID_HCENTER_DEPRECATED +-#endif +-#ifndef V4L2_CID_VCENTER +-#define V4L2_CID_VCENTER V4L2_CID_VCENTER_DEPRECATED +-#endif +- + GST_DEBUG_CATEGORY_EXTERN (v4l2_debug); + #define GST_CAT_DEFAULT v4l2_debug + +@@ -294,8 +286,12 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) + break; + case V4L2_CID_HFLIP: + case V4L2_CID_VFLIP: ++#ifdef V4L2_CID_HCENTER + case V4L2_CID_HCENTER: ++#endif ++#ifdef V4L2_CID_VCENTER + case V4L2_CID_VCENTER: ++#endif + #ifdef V4L2_CID_PAN_RESET + case V4L2_CID_PAN_RESET: + #endif +-- +1.7.1 + diff --git a/multimedia/video/gst-plugins-good/files/0002-clear_DISCONT_flag.patch b/multimedia/video/gst-plugins-good/files/0002-clear_DISCONT_flag.patch new file mode 100644 index 0000000000..53a98877ac --- /dev/null +++ b/multimedia/video/gst-plugins-good/files/0002-clear_DISCONT_flag.patch @@ -0,0 +1,27 @@ +From 6f707fcbca2c60aed565247567bafdd168980161 Mon Sep 17 00:00:00 2001 +From: Tim-Philipp Müller +Date: Sat, 03 Mar 2012 13:04:48 +0000 +Subject: v4l2: clear DISCONT flag when recycling buffers into the buffer pool + +The base class may have set the DISCONT flag on the first buffer pushed +out. We need to clear that when recycling buffers back into the buffer +pool, otherwise we constantly push out buffers with the discont flag +set, which might upset downstream elements, esp. for compressed +formats like mpeg-ts. +--- +(limited to 'sys/v4l2') + +diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c +index 51419ff..a0b4c84 100644 +--- a/sys/v4l2/gstv4l2bufferpool.c ++++ b/sys/v4l2/gstv4l2bufferpool.c +@@ -98,6 +98,7 @@ gst_v4l2_buffer_finalize (GstV4l2Buffer * buffer) + GST_LOG_OBJECT (pool->v4l2elem, "reviving buffer %p, %d", buffer, index); + gst_buffer_ref (GST_BUFFER (buffer)); + GST_BUFFER_SIZE (buffer) = 0; ++ GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT); + pool->buffers[index] = buffer; + } + +-- +cgit v0.9.0.2-2-gbebe diff --git a/multimedia/video/gst-plugins-good/files/0003-v4l2src-fix.patch b/multimedia/video/gst-plugins-good/files/0003-v4l2src-fix.patch new file mode 100644 index 0000000000..a4bc90e2e5 --- /dev/null +++ b/multimedia/video/gst-plugins-good/files/0003-v4l2src-fix.patch @@ -0,0 +1,28 @@ +--- gst-plugins-good-0.10.31/sys/v4l2/gstv4l2object.c 2011-12-30 14:59:13.000000000 +0100 ++++ gst-plugins-good-0.10.31.fixed/sys/v4l2/gstv4l2object.c 2012-06-05 23:45:16.670981047 +0200 +@@ -1583,6 +1583,7 @@ + + if (ival.type == V4L2_FRMIVAL_TYPE_DISCRETE) { + GValue rate = { 0, }; ++ guint i; + + g_value_init (&rates, GST_TYPE_LIST); + g_value_init (&rate, GST_TYPE_FRACTION); +@@ -1602,7 +1603,16 @@ + + /* swap to get the framerate */ + gst_value_set_fraction (&rate, denom, num); +- gst_value_list_append_value (&rates, &rate); ++ /* avoid duplicate framerates, yes some hw reports duplicates :( */ ++ for (i = 0; i < gst_value_list_get_size(&rates); i++) { ++ const GValue *val = gst_value_list_get_value(&rates, i); ++ if (gst_value_compare(val, &rate) == GST_VALUE_EQUAL) { ++ break; ++ } ++ } ++ if (i == gst_value_list_get_size(&rates)) { ++ gst_value_list_append_value(&rates, &rate); ++ } + + ival.index++; + } while (v4l2_ioctl (fd, VIDIOC_ENUM_FRAMEINTERVALS, &ival) >= 0); diff --git a/multimedia/video/gst-plugins-good/files/0004-v4l2object-Don-t-probe-UVC-devices-for-being-interla.patch b/multimedia/video/gst-plugins-good/files/0004-v4l2object-Don-t-probe-UVC-devices-for-being-interla.patch new file mode 100644 index 0000000000..4162cf13f3 --- /dev/null +++ b/multimedia/video/gst-plugins-good/files/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/multimedia/video/gst-plugins-good/pspec.xml b/multimedia/video/gst-plugins-good/pspec.xml new file mode 100644 index 0000000000..4b2bdadb12 --- /dev/null +++ b/multimedia/video/gst-plugins-good/pspec.xml @@ -0,0 +1,145 @@ + + + + + gst-plugins-good + http://gstreamer.net/ + + PisiLinux Community + admins@pisilinux.org + + GPLv2 + library + A set of good-quality plugins for GStreamer + gst-plugins-good contains a set of mature plugins and elements for GStreamer. + http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.bz2 + + gst-plugins-base-devel + gstreamer-devel + cairo-devel + flac-devel + gdk-pixbuf-devel + libjpeg-turbo-devel + libpng-devel + libsoup-devel + libvpx-devel + aalib-devel + libraw1394-devel + pulseaudio-libs-devel + libv4l-devel + libsoup-gnome + speex-devel + gtk2-devel + orc-devel + libXext-devel + valgrind + libXdamage-devel + libXfixes-devel + libXv-devel + libvorbis-devel + libtheora-devel + libogg-devel + libICE-devel + libSM-devel + + + + 0001-fix-v4l2_munmap.patch + 0002-clear_DISCONT_flag.patch + 0003-v4l2src-fix.patch + 0004-v4l2object-Don-t-probe-UVC-devices-for-being-interla.patch + 0001-sys-v4l2-Some-blind-compilation-fixes.patch + + + + + gst-plugins-good + + orc + flac + zlib + speex + libX11 + libpng + libXv + cairo + glib2 + aalib + bzip2 + libv4l + libsoup + libxml2 + libXext + gstreamer + libXfixes + gdk-pixbuf + libXdamage + libjpeg-turbo + libsoup-gnome + pulseaudio-libs + gst-plugins-base + + + /etc/gconf + /usr/bin + /usr/lib + /usr/share/gstreamer-0.10/presets + /usr/share/doc + /usr/share/man + /usr/share/locale + + + + + + 2014-05-28 + 0.10.31 + Rebuild. + Alihan Öztürk + alihan@pisilinux.org + + + 2014-02-27 + 0.10.31 + Rebuild Unused + Varol Maksutoğlu + waroi@pisilinux.org + + + 2014-0-26 + 0.10.31 + Rebuild + Erdinç Gültekin + admins@pisilinux.org + + + 2013-07-28 + 0.10.31 + missing dep. + Erdinç Gültekin + admins@pisilinux.org + + + 2013-05-09 + 0.10.31 + rebuild for libv4l + Erdinç Gültekin + admins@pisilinux.org + + + 2012-11-09 + 0.10.31 + First release + Serdar Soytetir + kaptan@pisilinux.org + + + diff --git a/multimedia/video/gst-plugins-good/translations.xml b/multimedia/video/gst-plugins-good/translations.xml new file mode 100644 index 0000000000..07d72075f0 --- /dev/null +++ b/multimedia/video/gst-plugins-good/translations.xml @@ -0,0 +1,8 @@ + + + + gst-plugins-good + Gstreamer için temel eklentiler paketi + Ensemble de plug-ins (greffons) de bonne qualité sous la licence préférée de gstreamer. + +