diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2021-02-16 21:09:29 +0100 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2021-04-17 23:27:30 -0500 |
commit | 273ece360556556182a42e4a75c21560da04f022 (patch) | |
tree | 0aa5477fe4f86f87fb1dd75350e4c78cada806ac /multimedia | |
parent | 9281fbbba337d0de6ee846d431a7541ccbe27b45 (diff) |
multimedia/gst0-plugins-base: Added (gst plugins base set, v0).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'multimedia')
11 files changed, 778 insertions, 0 deletions
diff --git a/multimedia/gst0-plugins-base/README b/multimedia/gst0-plugins-base/README new file mode 100644 index 0000000000000..28f07fc897dcb --- /dev/null +++ b/multimedia/gst0-plugins-base/README @@ -0,0 +1,6 @@ +GStreamer Base Plug-ins is a well-groomed and well-maintained +collection of GStreamer plug-ins and elements, spanning the range of +possible types of elements one would want to write for GStreamer. +It also contains helper libraries and base classes useful for +writing elements. A wide range of video and audio decoders, encoders, +and filters are included. diff --git a/multimedia/gst0-plugins-base/gst0-plugins-base.SlackBuild b/multimedia/gst0-plugins-base/gst0-plugins-base.SlackBuild new file mode 100644 index 0000000000000..dabd9c133ccec --- /dev/null +++ b/multimedia/gst0-plugins-base/gst0-plugins-base.SlackBuild @@ -0,0 +1,114 @@ +#!/bin/sh + +# Slackware build script for gst0-plugins-base + +# Copyright 2008 Michiel van Wessem <michiel@slackbuilds.org> +# Copyright 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2021 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=gst0-plugins-base +SRCNAM=gst-plugins-base +VERSION=${VERSION:-0.10.36} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +DOCS="ABOUT-NLS AUTHORS COPYING* INSTALL NEWS README* RELEASE REQUIREMENTS" + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.xz +cd $SRCNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Thanks AUR for the patches +sed -i -e '/AC_PATH_XTRA/d' -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac +for i in $CWD/patches/* ; do patch -p1 < $i ; done +if [[ $ARCH == i?86 ]]; then patch -p1 < $CWD/x86.patch ; fi + +NOCONFIGURE=1 ./autogen.sh + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --disable-debug \ + --disable-static \ + --build=$ARCH-slackware-linux + +make +sed -e 's/^SUBDIRS_EXT =.*/SUBDIRS_EXT =/' -i Makefile +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/multimedia/gst0-plugins-base/gst0-plugins-base.info b/multimedia/gst0-plugins-base/gst0-plugins-base.info new file mode 100644 index 0000000000000..053dcd0d2b80b --- /dev/null +++ b/multimedia/gst0-plugins-base/gst0-plugins-base.info @@ -0,0 +1,10 @@ +PRGNAM="gst0-plugins-base" +VERSION="0.10.36" +HOMEPAGE="https://gstreamer.freedesktop.org" +DOWNLOAD="https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.xz" +MD5SUM="3d2337841b132fe996e5eb2396ac9438" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="gstreamer0" +MAINTAINER="Matteo Bernardini" +EMAIL="ponce@slackbuilds.org" diff --git a/multimedia/gst0-plugins-base/patches/00-fix-crash-0-byte-ogg.patch b/multimedia/gst0-plugins-base/patches/00-fix-crash-0-byte-ogg.patch new file mode 100644 index 0000000000000..2c03e820b535a --- /dev/null +++ b/multimedia/gst0-plugins-base/patches/00-fix-crash-0-byte-ogg.patch @@ -0,0 +1,22 @@ +From 7f22e3ea7f713867e1fbf2ef71b6a6e36e1f0531 Mon Sep 17 00:00:00 2001 +From: Jonathan Liu <net147@gmail.com> +Date: Sun, 28 Oct 2012 10:07:16 +0000 +Subject: oggstream: fix crash with 0 byte ogg packets + +https://bugzilla.gnome.org/show_bug.cgi?id=687030 +--- +diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c +index c79f088..fe28f2e 100644 +--- a/ext/ogg/gstoggstream.c ++++ b/ext/ogg/gstoggstream.c +@@ -790,7 +790,7 @@ setup_vorbis_mapper (GstOggStream * pad, ogg_packet * packet) + static gboolean + is_header_vorbis (GstOggStream * pad, ogg_packet * packet) + { +- if (packet->bytes > 0 && (packet->packet[0] & 0x01) == 0) ++ if (packet->bytes == 0 || (packet->packet[0] & 0x01) == 0) + return FALSE; + + if (packet->packet[0] == 5) { +-- +cgit v0.9.0.2-2-gbebe diff --git a/multimedia/gst0-plugins-base/patches/01-colorbalance-fix-abi.patch b/multimedia/gst0-plugins-base/patches/01-colorbalance-fix-abi.patch new file mode 100644 index 0000000000000..1e7b8f2c113ce --- /dev/null +++ b/multimedia/gst0-plugins-base/patches/01-colorbalance-fix-abi.patch @@ -0,0 +1,23 @@ +From 0cb4ccb1f09d39820682e052fc106f5fd7fa1309 Mon Sep 17 00:00:00 2001 +From: Stefan Sauer <ensonic@users.sf.net> +Date: Fri, 24 Feb 2012 20:37:00 +0000 +Subject: interfaces: fix ABI class padding after the recent changes + +--- +(limited to 'gst-libs/gst/interfaces/colorbalance.h') + +diff --git a/gst-libs/gst/interfaces/colorbalance.h b/gst-libs/gst/interfaces/colorbalance.h +index fd8ceaa..9f0a1cd 100644 +--- a/gst-libs/gst/interfaces/colorbalance.h ++++ b/gst-libs/gst/interfaces/colorbalance.h +@@ -102,7 +102,7 @@ struct _GstColorBalanceClass { + GstColorBalanceType (*get_balance_type) (GstColorBalance *balance); + + /*< private >*/ +- gpointer _gst_reserved[GST_PADDING]; ++ gpointer _gst_reserved[GST_PADDING-1]; + }; + + GType gst_color_balance_get_type (void); +-- +cgit v0.9.0.2-2-gbebe diff --git a/multimedia/gst0-plugins-base/patches/02-ayuv64-lanczos.patch b/multimedia/gst0-plugins-base/patches/02-ayuv64-lanczos.patch new file mode 100644 index 0000000000000..64106e46506e0 --- /dev/null +++ b/multimedia/gst0-plugins-base/patches/02-ayuv64-lanczos.patch @@ -0,0 +1,236 @@ +From e4f01106d08f3c2a65897bfe919bd65ce55545a8 Mon Sep 17 00:00:00 2001 +From: David Schleef <ds@schleef.org> +Date: Wed, 25 Jan 2012 23:49:00 +0000 +Subject: videoscale: Add AYUV64 path to Lanczos + +--- +diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c +index 7b44647..6df4ba6 100644 +--- a/gst/videoscale/gstvideoscale.c ++++ b/gst/videoscale/gstvideoscale.c +@@ -1199,6 +1199,11 @@ gst_video_scale_transform (GstBaseTransform * trans, GstBuffer * in, + case GST_VIDEO_SCALE_4TAP: + vs_image_scale_4tap_AYUV64 (&dest, &src, videoscale->tmp_buf); + break; ++ case GST_VIDEO_SCALE_LANCZOS: ++ vs_image_scale_lanczos_AYUV64 (&dest, &src, videoscale->tmp_buf, ++ videoscale->sharpness, videoscale->dither, videoscale->submethod, ++ videoscale->envelope, videoscale->sharpen); ++ break; + default: + goto unknown_mode; + } +diff --git a/gst/videoscale/vs_image.h b/gst/videoscale/vs_image.h +index 2312acc..7b34991 100644 +--- a/gst/videoscale/vs_image.h ++++ b/gst/videoscale/vs_image.h +@@ -52,6 +52,9 @@ void vs_image_scale_linear_RGBA (const VSImage *dest, const VSImage *src, + void vs_image_scale_lanczos_AYUV (const VSImage * dest, const VSImage * src, + uint8_t * tmpbuf, double sharpness, gboolean dither, int submethod, + double a, double sharpen); ++void vs_image_scale_lanczos_AYUV64 (const VSImage * dest, const VSImage * src, ++ uint8_t * tmpbuf, double sharpness, gboolean dither, int submethod, ++ double a, double sharpen); + + void vs_image_scale_nearest_RGB (const VSImage *dest, const VSImage *src, + uint8_t *tmpbuf); +diff --git a/gst/videoscale/vs_lanczos.c b/gst/videoscale/vs_lanczos.c +index 1c87ba3..d141a01 100644 +--- a/gst/videoscale/vs_lanczos.c ++++ b/gst/videoscale/vs_lanczos.c +@@ -204,6 +204,9 @@ static void vs_image_scale_lanczos_AYUV_float (const VSImage * dest, + static void vs_image_scale_lanczos_AYUV_double (const VSImage * dest, + const VSImage * src, uint8_t * tmpbuf, double sharpness, gboolean dither, + double a, double sharpen); ++static void vs_image_scale_lanczos_AYUV64_double (const VSImage * dest, ++ const VSImage * src, uint8_t * tmpbuf, double sharpness, gboolean dither, ++ double a, double sharpen); + + static double + sinc (double x) +@@ -590,6 +593,15 @@ vs_image_scale_lanczos_AYUV (const VSImage * dest, const VSImage * src, + } + } + ++void ++vs_image_scale_lanczos_AYUV64 (const VSImage * dest, const VSImage * src, ++ uint8_t * tmpbuf, double sharpness, gboolean dither, int submethod, ++ double a, double sharpen) ++{ ++ vs_image_scale_lanczos_AYUV64_double (dest, src, tmpbuf, sharpness, dither, ++ a, sharpen); ++} ++ + + + #define RESAMPLE_HORIZ_FLOAT(function, dest_type, tap_type, src_type, _n_taps) \ +@@ -813,9 +825,9 @@ RESAMPLE_VERT_DITHER (resample_vert_dither_int16_generic, gint16, gint16, + n_taps, shift) + /* *INDENT-ON* */ + +-#define RESAMPLE_VERT_FLOAT(function, tap_type, src_type, _n_taps, _shift) \ ++#define RESAMPLE_VERT_FLOAT(function, dest_type, clamp, tap_type, src_type, _n_taps, _shift) \ + static void \ +-function (guint8 *dest, \ ++function (dest_type *dest, \ + const tap_type *taps, const src_type *src, int stride, int n_taps, \ + int shift, int n) \ + { \ +@@ -828,13 +840,13 @@ function (guint8 *dest, \ + const src_type *line = PTR_OFFSET(src, stride * l); \ + sum_y += line[i] * taps[l]; \ + } \ +- dest[i] = CLAMP (floor(0.5 + sum_y), 0, 255); \ ++ dest[i] = CLAMP (floor(0.5 + sum_y), 0, clamp); \ + } \ + } + +-#define RESAMPLE_VERT_FLOAT_DITHER(function, tap_type, src_type, _n_taps, _shift) \ ++#define RESAMPLE_VERT_FLOAT_DITHER(function, dest_type, clamp, tap_type, src_type, _n_taps, _shift) \ + static void \ +-function (guint8 *dest, \ ++function (dest_type *dest, \ + const tap_type *taps, const src_type *src, int stride, int n_taps, \ + int shift, int n) \ + { \ +@@ -849,19 +861,24 @@ function (guint8 *dest, \ + sum_y += line[i] * taps[l]; \ + } \ + err_y += sum_y; \ +- dest[i] = CLAMP (floor (err_y), 0, 255); \ ++ dest[i] = CLAMP (floor (err_y), 0, clamp); \ + err_y -= floor (err_y); \ + } \ + } + + /* *INDENT-OFF* */ +-RESAMPLE_VERT_FLOAT (resample_vert_double_generic, double, double, n_taps, ++RESAMPLE_VERT_FLOAT (resample_vert_double_generic, guint8, 255, double, double, n_taps, + shift) +-RESAMPLE_VERT_FLOAT_DITHER (resample_vert_dither_double_generic, double, double, ++RESAMPLE_VERT_FLOAT_DITHER (resample_vert_dither_double_generic, guint8, 255, double, double, + n_taps, shift) + +-RESAMPLE_VERT_FLOAT (resample_vert_float_generic, float, float, n_taps, shift) +-RESAMPLE_VERT_FLOAT_DITHER (resample_vert_dither_float_generic, float, float, ++RESAMPLE_VERT_FLOAT (resample_vert_double_generic_u16, guint16, 65535, double, double, n_taps, ++ shift) ++RESAMPLE_VERT_FLOAT_DITHER (resample_vert_dither_double_generic_u16, guint16, 65535, double, double, ++ n_taps, shift) ++ ++RESAMPLE_VERT_FLOAT (resample_vert_float_generic, guint8, 255, float, float, n_taps, shift) ++RESAMPLE_VERT_FLOAT_DITHER (resample_vert_dither_float_generic, guint8, 255, float, float, + n_taps, shift) + /* *INDENT-ON* */ + +@@ -1556,3 +1573,77 @@ vs_image_scale_lanczos_AYUV_float (const VSImage * dest, const VSImage * src, + scale1d_cleanup (&scale->y_scale1d); + g_free (scale->tmpdata); + } ++ ++static void ++vs_scale_lanczos_AYUV64_double (Scale * scale) ++{ ++ int j; ++ int yi; ++ int tmp_yi; ++ ++ tmp_yi = 0; ++ ++ for (j = 0; j < scale->dest->height; j++) { ++ guint16 *destline; ++ double *taps; ++ ++ destline = (guint16 *) (scale->dest->pixels + scale->dest->stride * j); ++ ++ yi = scale->y_scale1d.offsets[j]; ++ ++ while (tmp_yi < yi + scale->y_scale1d.n_taps) { ++ scale->horiz_resample_func (TMP_LINE_DOUBLE_AYUV (tmp_yi), ++ scale->x_scale1d.offsets, scale->x_scale1d.taps, SRC_LINE (tmp_yi), ++ scale->x_scale1d.n_taps, 0, scale->dest->width); ++ tmp_yi++; ++ } ++ ++ taps = (double *) scale->y_scale1d.taps + j * scale->y_scale1d.n_taps; ++ if (scale->dither) { ++ resample_vert_dither_double_generic_u16 (destline, ++ taps, TMP_LINE_DOUBLE_AYUV (scale->y_scale1d.offsets[j]), ++ sizeof (double) * 4 * scale->dest->width, ++ scale->y_scale1d.n_taps, 0, scale->dest->width * 4); ++ } else { ++ resample_vert_double_generic_u16 (destline, ++ taps, TMP_LINE_DOUBLE_AYUV (scale->y_scale1d.offsets[j]), ++ sizeof (double) * 4 * scale->dest->width, ++ scale->y_scale1d.n_taps, 0, scale->dest->width * 4); ++ } ++ } ++} ++ ++void ++vs_image_scale_lanczos_AYUV64_double (const VSImage * dest, const VSImage * src, ++ uint8_t * tmpbuf, double sharpness, gboolean dither, double a, ++ double sharpen) ++{ ++ Scale s = { 0 }; ++ Scale *scale = &s; ++ int n_taps; ++ ++ scale->dest = dest; ++ scale->src = src; ++ ++ n_taps = scale1d_get_n_taps (src->width, dest->width, a, sharpness); ++ scale1d_calculate_taps (&scale->x_scale1d, ++ src->width, dest->width, n_taps, a, sharpness, sharpen); ++ ++ n_taps = scale1d_get_n_taps (src->height, dest->height, a, sharpness); ++ scale1d_calculate_taps (&scale->y_scale1d, ++ src->height, dest->height, n_taps, a, sharpness, sharpen); ++ ++ scale->dither = dither; ++ ++ scale->horiz_resample_func = ++ (HorizResampleFunc) resample_horiz_double_ayuv_generic; ++ ++ scale->tmpdata = ++ g_malloc (sizeof (double) * scale->dest->width * scale->src->height * 4); ++ ++ vs_scale_lanczos_AYUV64_double (scale); ++ ++ scale1d_cleanup (&scale->x_scale1d); ++ scale1d_cleanup (&scale->y_scale1d); ++ g_free (scale->tmpdata); ++} +-- +cgit v0.9.0.2-2-gbebe +From f8dc679ca7e9542e6f410062df5e332fc8e0ba9d Mon Sep 17 00:00:00 2001 +From: David Schleef <ds@schleef.org> +Date: Sun, 19 Feb 2012 08:03:03 +0000 +Subject: videoscale: fix AYUV64 scaling + +--- +diff --git a/gst/videoscale/vs_lanczos.c b/gst/videoscale/vs_lanczos.c +index d141a01..67cd401 100644 +--- a/gst/videoscale/vs_lanczos.c ++++ b/gst/videoscale/vs_lanczos.c +@@ -728,6 +728,9 @@ RESAMPLE_HORIZ_AYUV_FLOAT (resample_horiz_double_ayuv_generic, double, double, + RESAMPLE_HORIZ_AYUV_FLOAT (resample_horiz_float_ayuv_generic, float, float, + guint8, n_taps) + ++RESAMPLE_HORIZ_AYUV_FLOAT (resample_horiz_double_ayuv_generic_s16, double, double, ++ guint16, n_taps) ++ + RESAMPLE_HORIZ (resample_horiz_int32_int32_u8_generic, gint32, gint32, + guint8, n_taps, shift) + RESAMPLE_HORIZ (resample_horiz_int16_int16_u8_generic, gint16, gint16, +@@ -1636,7 +1639,7 @@ vs_image_scale_lanczos_AYUV64_double (const VSImage * dest, const VSImage * src, + scale->dither = dither; + + scale->horiz_resample_func = +- (HorizResampleFunc) resample_horiz_double_ayuv_generic; ++ (HorizResampleFunc) resample_horiz_double_ayuv_generic_s16; + + scale->tmpdata = + g_malloc (sizeof (double) * scale->dest->width * scale->src->height * 4); +-- +cgit v0.9.0.2-2-gbebe diff --git a/multimedia/gst0-plugins-base/patches/03-videoscale-fix-negotiation.patch b/multimedia/gst0-plugins-base/patches/03-videoscale-fix-negotiation.patch new file mode 100644 index 0000000000000..6e34d41c53ba8 --- /dev/null +++ b/multimedia/gst0-plugins-base/patches/03-videoscale-fix-negotiation.patch @@ -0,0 +1,171 @@ +From 63d1316c0fd4ce22cf4a53f4aa7cb1ca16a07aa8 Mon Sep 17 00:00:00 2001 +From: Tim-Philipp Müller <tim.muller@collabora.co.uk> +Date: Sun, 26 Feb 2012 18:19:57 +0000 +Subject: videoscale: fix negotiation after addition of new formats and methods + +Now that we no longer support all methods for all formats, we +need to cater for that in the transform function: we can't +transform formats not supported by the currently-selected +mehod. + +make check, folks. It's da bomb. +--- +diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c +index 9f072a3..60dd5ff 100644 +--- a/gst/videoscale/gstvideoscale.c ++++ b/gst/videoscale/gstvideoscale.c +@@ -424,10 +424,118 @@ gst_video_scale_get_property (GObject * object, guint prop_id, GValue * value, + } + } + ++#define NEAREST (1 << GST_VIDEO_SCALE_NEAREST) ++#define BILINEAR (1 << GST_VIDEO_SCALE_BILINEAR) ++#define FOURTAP (1 << GST_VIDEO_SCALE_4TAP) ++#define LANCZOS (1 << GST_VIDEO_SCALE_LANCZOS) ++ ++/* or we could just do lookups via table[format] if we could be bothered.. */ ++static const struct ++{ ++ GstVideoFormat format; ++ guint8 methods; ++} formats_methods_table[] = { ++ { ++ GST_VIDEO_FORMAT_RGBx, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_xRGB, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_BGRx, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_xBGR, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_RGBA, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_ARGB, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_BGRA, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_ABGR, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_AYUV, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_ARGB64, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_AYUV64, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_RGB, NEAREST | BILINEAR | FOURTAP}, { ++ GST_VIDEO_FORMAT_BGR, NEAREST | BILINEAR | FOURTAP}, { ++ GST_VIDEO_FORMAT_v308, NEAREST | BILINEAR | FOURTAP}, { ++ GST_VIDEO_FORMAT_YUY2, NEAREST | BILINEAR | FOURTAP}, { ++ GST_VIDEO_FORMAT_YVYU, NEAREST | BILINEAR | FOURTAP}, { ++ GST_VIDEO_FORMAT_UYVY, NEAREST | BILINEAR | FOURTAP}, { ++ GST_VIDEO_FORMAT_Y800, NEAREST | BILINEAR | FOURTAP}, { ++ GST_VIDEO_FORMAT_GRAY8, NEAREST | BILINEAR | FOURTAP}, { ++ GST_VIDEO_FORMAT_GRAY16_LE, NEAREST | BILINEAR | FOURTAP}, { ++ GST_VIDEO_FORMAT_GRAY16_BE, NEAREST | BILINEAR | FOURTAP}, { ++ GST_VIDEO_FORMAT_Y16, NEAREST | BILINEAR | FOURTAP}, { ++ GST_VIDEO_FORMAT_I420, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_YV12, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_Y444, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_Y42B, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_Y41B, NEAREST | BILINEAR | FOURTAP | LANCZOS}, { ++ GST_VIDEO_FORMAT_NV12, NEAREST | BILINEAR}, { ++ GST_VIDEO_FORMAT_RGB16, NEAREST | BILINEAR | FOURTAP}, { ++ GST_VIDEO_FORMAT_RGB15, NEAREST | BILINEAR | FOURTAP} ++}; ++ ++static gboolean ++gst_video_scale_format_supported_for_method (GstVideoFormat format, ++ GstVideoScaleMethod method) ++{ ++ int i; ++ ++ for (i = 0; i < G_N_ELEMENTS (formats_methods_table); ++i) { ++ if (formats_methods_table[i].format == format) ++ return ((formats_methods_table[i].methods & (1 << method)) != 0); ++ } ++ return FALSE; ++} ++ ++static gboolean ++gst_video_scale_transform_supported (GstVideoScale * videoscale, ++ GstVideoScaleMethod method, GstStructure * structure) ++{ ++ const GValue *val; ++ GstVideoFormat fmt; ++ gboolean supported = TRUE; ++ GstStructure *s; ++ GstCaps *c; ++ ++ /* we support these methods for all formats */ ++ if (method == GST_VIDEO_SCALE_NEAREST || method == GST_VIDEO_SCALE_BILINEAR) ++ return TRUE; ++ ++ /* we need fixed caps if we want to use gst_video_parse_caps() */ ++ s = gst_structure_new (gst_structure_get_name (structure), ++ "width", G_TYPE_INT, 1, "height", G_TYPE_INT, 1, NULL); ++ ++ if ((val = gst_structure_get_value (structure, "format"))) { ++ gst_structure_set_value (s, "format", val); ++ } else { ++ if ((val = gst_structure_get_value (structure, "endianness"))) ++ gst_structure_set_value (s, "endianness", val); ++ if ((val = gst_structure_get_value (structure, "red_mask"))) ++ gst_structure_set_value (s, "red_mask", val); ++ if ((val = gst_structure_get_value (structure, "blue_mask"))) ++ gst_structure_set_value (s, "blue_mask", val); ++ if ((val = gst_structure_get_value (structure, "green_mask"))) ++ gst_structure_set_value (s, "green_mask", val); ++ if ((val = gst_structure_get_value (structure, "alpha_mask"))) ++ gst_structure_set_value (s, "alpha_mask", val); ++ if ((val = gst_structure_get_value (structure, "depth"))) ++ gst_structure_set_value (s, "depth", val); ++ if ((val = gst_structure_get_value (structure, "bpp"))) ++ gst_structure_set_value (s, "bpp", val); ++ } ++ c = gst_caps_new_full (s, NULL); ++ if (!gst_video_format_parse_caps (c, &fmt, NULL, NULL)) { ++ GST_ERROR_OBJECT (videoscale, "couldn't parse %" GST_PTR_FORMAT, c); ++ } else if (!gst_video_scale_format_supported_for_method (fmt, method)) { ++ supported = FALSE; ++ } ++ GST_LOG_OBJECT (videoscale, "method %d %ssupported for format %d", ++ method, (supported) ? "" : "not ", fmt); ++ gst_caps_unref (c); ++ ++ return supported; ++} ++ + static GstCaps * + gst_video_scale_transform_caps (GstBaseTransform * trans, + GstPadDirection direction, GstCaps * caps) + { ++ GstVideoScale *videoscale = GST_VIDEO_SCALE (trans); ++ GstVideoScaleMethod method; + GstCaps *ret; + GstStructure *structure; + +@@ -441,6 +549,13 @@ gst_video_scale_transform_caps (GstBaseTransform * trans, + ret = gst_caps_copy (caps); + structure = gst_structure_copy (gst_caps_get_structure (ret, 0)); + ++ GST_OBJECT_LOCK (videoscale); ++ method = videoscale->method; ++ GST_OBJECT_UNLOCK (videoscale); ++ ++ if (!gst_video_scale_transform_supported (videoscale, method, structure)) ++ goto format_not_supported; ++ + gst_structure_set (structure, + "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, + "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL); +@@ -452,9 +567,19 @@ gst_video_scale_transform_caps (GstBaseTransform * trans, + } + gst_caps_append_structure (ret, structure); + ++done: ++ + GST_DEBUG_OBJECT (trans, "returning caps: %" GST_PTR_FORMAT, ret); + + return ret; ++ ++format_not_supported: ++ { ++ gst_structure_free (structure); ++ gst_caps_unref (ret); ++ ret = gst_caps_new_empty (); ++ goto done; ++ } + } + + static gboolean +-- +cgit v0.9.0.2-2-gbebe diff --git a/multimedia/gst0-plugins-base/patches/04-gstaudio-symbols.patch b/multimedia/gst0-plugins-base/patches/04-gstaudio-symbols.patch new file mode 100644 index 0000000000000..7e2ad0f47db89 --- /dev/null +++ b/multimedia/gst0-plugins-base/patches/04-gstaudio-symbols.patch @@ -0,0 +1,10 @@ +--- gst-plugins-base/win32/common/libgstaudio.def.orig 2013-12-10 12:09:41.280012610 +0000 ++++ gst-plugins-base/win32/common/libgstaudio.def 2013-12-10 12:10:12.253127720 +0000 +@@ -24,6 +24,7 @@ + gst_audio_decoder_get_plc_aware + gst_audio_decoder_get_tolerance + gst_audio_decoder_get_type ++ gst_audio_decoder_merge_tags + gst_audio_decoder_set_byte_time + gst_audio_decoder_set_drainable + gst_audio_decoder_set_latency diff --git a/multimedia/gst0-plugins-base/patches/05-enum_headers.patch b/multimedia/gst0-plugins-base/patches/05-enum_headers.patch new file mode 100644 index 0000000000000..1205da2417210 --- /dev/null +++ b/multimedia/gst0-plugins-base/patches/05-enum_headers.patch @@ -0,0 +1,132 @@ +diff --unified --recursive --text package.orig/common/glib-gen.mak package.new/common/glib-gen.mak +--- package.orig/common/glib-gen.mak 2020-03-18 22:16:50.800759634 -0400 ++++ package.new/common/glib-gen.mak 2020-03-18 22:17:26.360479044 -0400 +@@ -5,7 +5,7 @@ + #glib_enum_define=GST_COLOR_BALANCE + #glib_enum_prefix=gst_color_balance + +-enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++enum_headers=$(foreach h,$(glib_enum_headers),\n#include \"$(h)\") + + # these are all the rules generating the relevant files + %-marshal.h: %-marshal.list +diff --unified --recursive --text package.orig/common/gst-glib-gen.mak package.new/common/gst-glib-gen.mak +--- package.orig/common/gst-glib-gen.mak 2020-03-18 22:16:50.800759634 -0400 ++++ package.new/common/gst-glib-gen.mak 2020-03-18 22:17:26.360479044 -0400 +@@ -6,7 +6,7 @@ + #glib_gen_prefix=gst_color_balance + #glib_gen_basename=colorbalance + +-enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++enum_headers=$(foreach h,$(glib_enum_headers),\n#include \"$(h)\") + + # these are all the rules generating the relevant files + $(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list +diff --unified --recursive --text package.orig/gst/encoding/Makefile.in package.new/gst/encoding/Makefile.in +--- package.orig/gst/encoding/Makefile.in 2020-03-18 22:16:50.807426248 -0400 ++++ package.new/gst/encoding/Makefile.in 2020-03-18 22:17:26.620476983 -0400 +@@ -493,7 +493,7 @@ + BUILT_SOURCES = $(built_headers) $(built_sources) + EXTRA_DIST = gstencode-marshal.list + CLEANFILES = $(BUILT_SOURCES) +-enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++enum_headers = $(foreach h,$(glib_enum_headers),\n#include \"$(h)\") + all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +diff --unified --recursive --text package.orig/gst/playback/Makefile.in package.new/gst/playback/Makefile.in +--- package.orig/gst/playback/Makefile.in 2020-03-18 22:16:50.804092941 -0400 ++++ package.new/gst/playback/Makefile.in 2020-03-18 22:17:26.540477618 -0400 +@@ -569,7 +569,7 @@ + BUILT_SOURCES = $(built_headers) $(built_sources) + EXTRA_DIST = gstplay-marshal.list + CLEANFILES = $(BUILT_SOURCES) +-enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++enum_headers = $(foreach h,$(glib_enum_headers),\n#include \"$(h)\") + all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +diff --unified --recursive --text package.orig/gst/tcp/Makefile.in package.new/gst/tcp/Makefile.in +--- package.orig/gst/tcp/Makefile.in 2020-03-18 22:16:50.804092941 -0400 ++++ package.new/gst/tcp/Makefile.in 2020-03-18 22:17:26.457144945 -0400 +@@ -471,7 +471,7 @@ + glib_enum_define = GST_TCP + glib_gen_prefix = gst_tcp + glib_gen_basename = gsttcp +-enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++enum_headers = $(foreach h,$(glib_enum_headers),\n#include \"$(h)\") + built_sources = gsttcp-enumtypes.c gsttcp-marshal.c + built_headers = gsttcp-enumtypes.h gsttcp-marshal.h + BUILT_SOURCES = $(built_sources) $(built_headers) +diff --unified --recursive --text package.orig/gst-libs/gst/app/Makefile.in package.new/gst-libs/gst/app/Makefile.in +--- package.orig/gst-libs/gst/app/Makefile.in 2020-03-18 22:16:50.817426170 -0400 ++++ package.new/gst-libs/gst/app/Makefile.in 2020-03-18 22:17:27.103806485 -0400 +@@ -473,7 +473,7 @@ + glib_enum_define = GST_APP + glib_gen_prefix = __gst_app + glib_gen_basename = gstapp +-enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++enum_headers = $(foreach h,$(glib_enum_headers),\n#include \"$(h)\") + built_sources = gstapp-marshal.c + built_headers = gstapp-marshal.h + BUILT_SOURCES = $(built_sources) $(built_headers) +diff --unified --recursive --text package.orig/gst-libs/gst/audio/Makefile.in package.new/gst-libs/gst/audio/Makefile.in +--- package.orig/gst-libs/gst/audio/Makefile.in 2020-03-18 22:16:50.817426170 -0400 ++++ package.new/gst-libs/gst/audio/Makefile.in 2020-03-18 22:17:27.070473416 -0400 +@@ -544,7 +544,7 @@ + $(GST_BASE_LIBS) $(GST_LIBS) + + libgstaudio_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) +-enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++enum_headers = $(foreach h,$(glib_enum_headers),\n#include \"$(h)\") + @HAVE_INTROSPECTION_TRUE@BUILT_GIRSOURCES = GstAudio-@GST_MAJORMINOR@.gir + @HAVE_INTROSPECTION_TRUE@gir_headers = $(patsubst %,$(srcdir)/%, \ + @HAVE_INTROSPECTION_TRUE@ $(libgstaudio_@GST_MAJORMINOR@include_HEADERS)) \ +diff --unified --recursive --text package.orig/gst-libs/gst/interfaces/Makefile.in package.new/gst-libs/gst/interfaces/Makefile.in +--- package.orig/gst-libs/gst/interfaces/Makefile.in 2020-03-18 22:16:50.814092862 -0400 ++++ package.new/gst-libs/gst/interfaces/Makefile.in 2020-03-18 22:17:26.897141457 -0400 +@@ -551,7 +551,7 @@ + + EXTRA_DIST = interfaces-marshal.list + CLEANFILES = $(BUILT_SOURCES) $(am__append_1) +-enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++enum_headers = $(foreach h,$(glib_enum_headers),\n#include \"$(h)\") + @HAVE_INTROSPECTION_TRUE@BUILT_GIRSOURCES = GstInterfaces-@GST_MAJORMINOR@.gir + @HAVE_INTROSPECTION_TRUE@gir_headers = $(patsubst %,$(srcdir)/%, \ + @HAVE_INTROSPECTION_TRUE@ $(libgstinterfacesinclude_HEADERS)) \ +diff --unified --recursive --text package.orig/gst-libs/gst/pbutils/Makefile.in package.new/gst-libs/gst/pbutils/Makefile.in +--- package.orig/gst-libs/gst/pbutils/Makefile.in 2020-03-18 22:16:50.814092862 -0400 ++++ package.new/gst-libs/gst/pbutils/Makefile.in 2020-03-18 22:17:26.937141140 -0400 +@@ -542,7 +542,7 @@ + + # DISTCLEANFILES is for files generated by configure + DISTCLEANFILES = $(built_headers_configure) +-enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++enum_headers = $(foreach h,$(glib_enum_headers),\n#include \"$(h)\") + @HAVE_INTROSPECTION_TRUE@BUILT_GIRSOURCES = GstPbutils-@GST_MAJORMINOR@.gir + @HAVE_INTROSPECTION_TRUE@gir_headers = $(patsubst %,$(srcdir)/%, \ + @HAVE_INTROSPECTION_TRUE@ $(libgstpbutils_@GST_MAJORMINOR@include_HEADERS)) \ +diff --unified --recursive --text package.orig/gst-libs/gst/rtsp/Makefile.in package.new/gst-libs/gst/rtsp/Makefile.in +--- package.orig/gst-libs/gst/rtsp/Makefile.in 2020-03-18 22:16:50.817426170 -0400 ++++ package.new/gst-libs/gst/rtsp/Makefile.in 2020-03-18 22:17:27.113806406 -0400 +@@ -517,7 +517,7 @@ + glib_enum_define = gst_rtsp + glib_enum_headers = gstrtspdefs.h + glib_gen_basename = gstrtsp +-enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++enum_headers = $(foreach h,$(glib_enum_headers),\n#include \"$(h)\") + @HAVE_INTROSPECTION_TRUE@BUILT_GIRSOURCES = GstRtsp-@GST_MAJORMINOR@.gir + @HAVE_INTROSPECTION_TRUE@gir_headers = $(patsubst %,$(srcdir)/%, \ + @HAVE_INTROSPECTION_TRUE@ $(libgstrtspinclude_HEADERS)) \ +diff --unified --recursive --text package.orig/gst-libs/gst/video/Makefile.in package.new/gst-libs/gst/video/Makefile.in +--- package.orig/gst-libs/gst/video/Makefile.in 2020-03-18 22:16:50.810759555 -0400 ++++ package.new/gst-libs/gst/video/Makefile.in 2020-03-18 22:17:26.847141854 -0400 +@@ -553,7 +553,7 @@ + $(GST_ALL_LDFLAGS) \ + $(GST_LT_LDFLAGS) + +-enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++enum_headers = $(foreach h,$(glib_enum_headers),\n#include \"$(h)\") + @HAVE_INTROSPECTION_TRUE@BUILT_GIRSOURCES = GstVideo-@GST_MAJORMINOR@.gir + @HAVE_INTROSPECTION_TRUE@gir_headers = $(patsubst %,$(srcdir)/%, \ + @HAVE_INTROSPECTION_TRUE@ $(libgstvideo_@GST_MAJORMINOR@include_HEADERS)) \ diff --git a/multimedia/gst0-plugins-base/slack-desc b/multimedia/gst0-plugins-base/slack-desc new file mode 100644 index 0000000000000..54c5be6b020d8 --- /dev/null +++ b/multimedia/gst0-plugins-base/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +gst0-plugins-base: gst0-plugins-base (base set of GStreamer plugins, v0) +gst0-plugins-base: +gst0-plugins-base: GStreamer Base Plug-ins is a well-groomed and well-maintained +gst0-plugins-base: collection of GStreamer plug-ins and elements, spanning the range of +gst0-plugins-base: possible types of elements one would want to write for GStreamer. +gst0-plugins-base: It also contains helper libraries and base classes useful for +gst0-plugins-base: writing elements. A wide range of video and audio decoders, encoders, +gst0-plugins-base: and filters are included. +gst0-plugins-base: +gst0-plugins-base: +gst0-plugins-base: diff --git a/multimedia/gst0-plugins-base/x86.patch b/multimedia/gst0-plugins-base/x86.patch new file mode 100644 index 0000000000000..127ca6af83c70 --- /dev/null +++ b/multimedia/gst0-plugins-base/x86.patch @@ -0,0 +1,35 @@ +From 9bd5a7ae5435469c3557a3d70e762791cb3dc5c7 Mon Sep 17 00:00:00 2001 +From: Antoine Jacoutot <ajacoutot@gnome.org> +Date: Mon, 20 Jan 2014 15:44:09 +0100 +Subject: [PATCH] audioresample: fix build on BSD + +On i386, EMMINTRIN is defined but not usable without sse so check for +__SSE__ and __SSE2__ as well. + +https://bugzilla.gnome.org/show_bug.cgi?id=670690 +--- + gst/audioresample/resample.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c +index 98d006c..481fa01 100644 +--- a/gst/audioresample/resample.c ++++ b/gst/audioresample/resample.c +@@ -77,13 +77,13 @@ + #define EXPORT G_GNUC_INTERNAL + + #ifdef _USE_SSE +-#ifndef HAVE_XMMINTRIN_H ++#if !defined(__SSE__) || !defined(HAVE_XMMINTRIN_H) + #undef _USE_SSE + #endif + #endif + + #ifdef _USE_SSE2 +-#ifndef HAVE_EMMINTRIN_H ++#if !defined(__SSE2__) || !defined(HAVE_XMMINTRIN_H) + #undef _USE_SSE2 + #endif + #endif +-- +1.8.5.3 |