Added patches for gstreamer
Added cam test in python Update background
This commit is contained in:
parent
8c88ef6779
commit
f4bdbeb0da
|
@ -0,0 +1,4 @@
|
|||
*.pkg.tar.xz
|
||||
gst-plugins-base
|
||||
pkg
|
||||
src
|
|
@ -0,0 +1,76 @@
|
|||
# $Id$
|
||||
# Maintainer: Jan de Groot <jgc@archlinux.org>
|
||||
|
||||
pkgbase=('gstreamer0.10-base')
|
||||
pkgname=('gstreamer0.10-base' 'gstreamer0.10-base-plugins')
|
||||
pkgver=0.10.36
|
||||
pkgrel=3
|
||||
arch=('i686' 'x86_64')
|
||||
license=('LGPL')
|
||||
makedepends=('pkgconfig' 'gstreamer0.10>=0.10.36' 'orc' 'libxv' 'alsa-lib' 'cdparanoia' 'libvisual' 'libvorbis' 'libtheora' 'pango' 'gobject-introspection' 'git')
|
||||
options=(!emptydirs)
|
||||
url="http://gstreamer.freedesktop.org/"
|
||||
source=("git://anongit.freedesktop.org/gstreamer-sdk/gst-plugins-base#commit=48d5966f12d4e6b71c96db0600cf76ef0ef14b3a"
|
||||
fix-crash-0-byte-ogg.patch
|
||||
colorbalance-fix-abi.patch
|
||||
revert-decodebin-playbin-removal.patch
|
||||
videoscale-fix-negotiation.patch
|
||||
ayuv64-lanczos.patch
|
||||
gstaudio-symbols.patch
|
||||
chinese-cam.patch)
|
||||
sha256sums=('SKIP'
|
||||
'a6a01035ea9627737f9c17f72919857ed43ccc7c2cb08b645b43ed89f78d0f4f'
|
||||
'7442c5c68068428b8c7ac1d3825ce29f1bb152b75b77047b9e806c7d322b780c'
|
||||
'ba20659fafea73db016ddaecd128f12087e0957ce35cf2c3ce29f72c51551ef3'
|
||||
'ae27f7be58997217f67898b37b138a485c203389e56b65e6b31c23f769ef39ca'
|
||||
'3792dfe80c69f51c0db98533e8fb16707b5dd2ee6933ea6098583af873ceb44a'
|
||||
'56e7a988df39d2ec4befa265536ad8c30d3c8d18d136cebef64e8d6baac1abae'
|
||||
'4bb8ecc75598a09bdb9dcb99ecc7f90963735704c68978ac6850686005f1bbfc')
|
||||
prepare() {
|
||||
cd gst-plugins-base
|
||||
sed -i -e '/AC_PATH_XTRA/d' -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac
|
||||
patch -Np1 -i ../fix-crash-0-byte-ogg.patch
|
||||
patch -Np1 -i ../colorbalance-fix-abi.patch
|
||||
patch -Np1 -i ../ayuv64-lanczos.patch
|
||||
patch -Np1 -i ../videoscale-fix-negotiation.patch
|
||||
patch -Np1 -i ../gstaudio-symbols.patch
|
||||
patch -Np1 -R -i ../revert-decodebin-playbin-removal.patch
|
||||
patch -Np1 -i ../chinese-cam.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd gst-plugins-base
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
|
||||
--disable-static --enable-experimental --disable-gnome_vfs --disable-gtk-doc \
|
||||
--with-package-name="GStreamer Base Plugins (Archlinux)" \
|
||||
--with-package-origin="http://www.archlinux.org/"
|
||||
make
|
||||
sed -e 's/^SUBDIRS_EXT =.*/SUBDIRS_EXT =/' -i Makefile
|
||||
}
|
||||
|
||||
check() {
|
||||
cd gst-plugins-base
|
||||
make check
|
||||
}
|
||||
|
||||
package_gstreamer0.10-base() {
|
||||
pkgdesc="GStreamer Multimedia Framework Base plugin libraries"
|
||||
depends=('gstreamer0.10>=0.10.36' 'orc' 'libxv')
|
||||
|
||||
cd gst-plugins-base
|
||||
make DESTDIR="${pkgdir}" install
|
||||
}
|
||||
|
||||
package_gstreamer0.10-base-plugins() {
|
||||
pkgdesc="GStreamer Multimedia Framework Base Plugins (gst-plugins-base)"
|
||||
depends=("gstreamer0.10-base=${pkgver}" 'alsa-lib' 'cdparanoia' 'libvisual' 'libvorbis' 'libtheora' 'pango')
|
||||
replaces=('gstreamer0.10-alsa' 'gstreamer0.10-theora' 'gstreamer0.10-libvisual' 'gstreamer0.10-pango' 'gstreamer0.10-cdparanoia' 'gstreamer0.10-vorbis' 'gstreamer0.10-ogg')
|
||||
conflicts=('gstreamer0.10-alsa' 'gstreamer0.10-theora' 'gstreamer0.10-libvisual' 'gstreamer0.10-pango' 'gstreamer0.10-cdparanoia' 'gstreamer0.10-vorbis' 'gstreamer0.10-ogg')
|
||||
groups=('gstreamer0.10-plugins')
|
||||
|
||||
cd gst-plugins-base
|
||||
make -C gst-libs DESTDIR="${pkgdir}" install
|
||||
make -C ext DESTDIR="${pkgdir}" install
|
||||
make -C gst-libs DESTDIR="${pkgdir}" uninstall
|
||||
}
|
|
@ -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
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
|
||||
---
|
||||
diff --git a/gst-libs/gst/rtsp/gstrtspmessage.c b/gst-libs/gst/rtsp/gstrtspmessage.c
|
||||
index 2b33c61..585d126 100644
|
||||
--- a/gst-libs/gst/rtsp/gstrtspmessage.c
|
||||
+++ b/gst-libs/gst/rtsp/gstrtspmessage.c
|
||||
@@ -183,7 +183,13 @@ gst_rtsp_message_init_request (GstRTSPMessage * msg, GstRTSPMethod method,
|
||||
|
||||
msg->type = GST_RTSP_MESSAGE_REQUEST;
|
||||
msg->type_data.request.method = method;
|
||||
+
|
||||
msg->type_data.request.uri = g_strdup (uri);
|
||||
+ guint len = strlen(msg->type_data.request.uri);
|
||||
+ if(msg->type_data.request.uri[len-1] == '/') {
|
||||
+ msg->type_data.request.uri[len-1] = 0;
|
||||
+ }
|
||||
+
|
||||
msg->type_data.request.version = GST_RTSP_VERSION_1_0;
|
||||
msg->hdr_fields = g_array_new (FALSE, FALSE, sizeof (RTSPKeyValue));
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,122 @@
|
|||
From fece626254e3b250e4514d1c92ac8289421d9511 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
Date: Thu, 15 Mar 2012 11:34:22 +0000
|
||||
Subject: Disable old playbin and decodebin
|
||||
|
||||
---
|
||||
diff --git a/gst/playback/Makefile.am b/gst/playback/Makefile.am
|
||||
index a0f1abc..700f581 100644
|
||||
--- a/gst/playback/Makefile.am
|
||||
+++ b/gst/playback/Makefile.am
|
||||
@@ -6,19 +6,15 @@ glib_gen_basename = gstplay
|
||||
built_sources = gstplay-marshal.c
|
||||
built_headers = gstplay-marshal.h
|
||||
|
||||
-plugin_LTLIBRARIES = libgstplaybin.la libgstdecodebin.la libgstdecodebin2.la
|
||||
+plugin_LTLIBRARIES = libgstplaybin.la libgstdecodebin2.la
|
||||
|
||||
csp_cflags = -DCOLORSPACE=\"ffmpegcolorspace\"
|
||||
|
||||
libgstplaybin_la_SOURCES = \
|
||||
gstplayback.c \
|
||||
- gstplaybin.c \
|
||||
gstplaybin2.c \
|
||||
gstplaysink.c \
|
||||
- gstplaybasebin.c \
|
||||
gstplay-enum.c \
|
||||
- gststreaminfo.c \
|
||||
- gststreamselector.c \
|
||||
gstsubtitleoverlay.c \
|
||||
gstplaysinkvideoconvert.c \
|
||||
gstplaysinkaudioconvert.c \
|
||||
@@ -37,17 +33,6 @@ if !GST_PLUGIN_BUILD_STATIC
|
||||
libgstplaybin_la_LIBTOOLFLAGS = --tag=disable-static
|
||||
endif
|
||||
|
||||
-libgstdecodebin_la_SOURCES = gstdecodebin.c
|
||||
-nodist_libgstdecodebin_la_SOURCES = $(built_sources)
|
||||
-libgstdecodebin_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(csp_cflags)
|
||||
-libgstdecodebin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||
-libgstdecodebin_la_LIBADD = \
|
||||
- $(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_MAJORMINOR@.la \
|
||||
- $(GST_LIBS)
|
||||
-if !GST_PLUGIN_BUILD_STATIC
|
||||
-libgstdecodebin_la_LIBTOOLFLAGS = --tag=disable-static
|
||||
-endif
|
||||
-
|
||||
libgstdecodebin2_la_SOURCES = gstdecodebin2.c gsturidecodebin.c gstplay-enum.c
|
||||
nodist_libgstdecodebin2_la_SOURCES = $(built_sources)
|
||||
libgstdecodebin2_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(csp_cflags)
|
||||
@@ -61,11 +46,8 @@ endif
|
||||
|
||||
noinst_HEADERS = \
|
||||
gstplayback.h \
|
||||
- gstplaybasebin.h \
|
||||
gstplaysink.h \
|
||||
- gststreaminfo.h \
|
||||
gstplay-enum.h \
|
||||
- gststreamselector.h \
|
||||
gstrawcaps.h \
|
||||
gstsubtitleoverlay.h \
|
||||
gstplaysinkvideoconvert.h \
|
||||
@@ -83,18 +65,6 @@ include $(top_srcdir)/common/gst-glib-gen.mak
|
||||
|
||||
Android.mk: Makefile.am $(BUILT_SOURCES)
|
||||
androgenizer \
|
||||
- -:PROJECT libgstdecodebin -:SHARED libgstdecodebin \
|
||||
- -:TAGS eng debug \
|
||||
- -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
|
||||
- -:SOURCES $(libgstdecodebin_la_SOURCES) \
|
||||
- $(nodist_libgstdecodebin_la_SOURCES) \
|
||||
- -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdecodebin_la_CFLAGS) $(csp_cflags) \
|
||||
- -:LDFLAGS $(libgstdecodebin_la_LDFLAGS) \
|
||||
- $(libgstdecodebin_la_LIBADD) \
|
||||
- -ldl \
|
||||
- -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
|
||||
- LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
|
||||
- \
|
||||
-:PROJECT libgstdecodebin2 -:SHARED libgstdecodebin2 \
|
||||
-:TAGS eng debug \
|
||||
-:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
|
||||
diff --git a/gst/playback/gstplayback.c b/gst/playback/gstplayback.c
|
||||
index 5b74786..f99df6e 100644
|
||||
--- a/gst/playback/gstplayback.c
|
||||
+++ b/gst/playback/gstplayback.c
|
||||
@@ -29,8 +29,6 @@
|
||||
|
||||
#include "gstplayback.h"
|
||||
#include "gstplaysink.h"
|
||||
-#include "gststreamselector.h"
|
||||
-#include "gststreaminfo.h"
|
||||
#include "gstsubtitleoverlay.h"
|
||||
|
||||
static gboolean
|
||||
@@ -47,13 +45,7 @@ plugin_init (GstPlugin * plugin)
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
- /* ref class from a thread-safe context to work around missing bit of
|
||||
- * thread-safety in GObject */
|
||||
- g_type_class_ref (GST_TYPE_STREAM_INFO);
|
||||
- g_type_class_ref (GST_TYPE_STREAM_SELECTOR);
|
||||
-
|
||||
- res = gst_play_bin_plugin_init (plugin);
|
||||
- res &= gst_play_bin2_plugin_init (plugin);
|
||||
+ res = gst_play_bin2_plugin_init (plugin);
|
||||
res &= gst_play_sink_plugin_init (plugin);
|
||||
res &= gst_subtitle_overlay_plugin_init (plugin);
|
||||
|
||||
diff --git a/gst/playback/gstplayback.h b/gst/playback/gstplayback.h
|
||||
index 4be121c..5981cdd 100644
|
||||
--- a/gst/playback/gstplayback.h
|
||||
+++ b/gst/playback/gstplayback.h
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <gst/gst.h>
|
||||
|
||||
gboolean gst_decode_bin_plugin_init (GstPlugin * plugin);
|
||||
-gboolean gst_play_bin_plugin_init (GstPlugin * plugin);
|
||||
gboolean gst_play_bin2_plugin_init (GstPlugin * plugin);
|
||||
|
||||
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
|
@ -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
|
Binary file not shown.
Before Width: | Height: | Size: 425 KiB After Width: | Height: | Size: 550 KiB |
|
@ -0,0 +1,28 @@
|
|||
#!/bin/env python2
|
||||
import pygst
|
||||
pygst.require('0.10')
|
||||
import gst
|
||||
|
||||
width = 1280
|
||||
height = 720
|
||||
pipe = "/tmp/feed1"
|
||||
shm_size = 10000000
|
||||
|
||||
|
||||
MIXERFORMAT = 'video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, format=(fourcc)BGRA, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)%d, height=(int)%d, framerate=(fraction)60/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false' % (width, height)
|
||||
|
||||
SRC = 'rtspsrc location=rtsp://192.168.1.100 ! rtph264depay ! h264parse ! ffdec_h264'
|
||||
SCALE = 'ffmpegcolorspace ! videorate ! videoscale ! ffmpegcolorspace'
|
||||
#SINK = 'shmsink socket-path=%s shm-size=%d wait-for-connection=0' % (pipe, shm_size)
|
||||
SINK = "ximagesink"
|
||||
|
||||
pipeline = gst.parse_launch('%s ! %s ! %s ! %s' % (SRC, SCALE, MIXERFORMAT, SINK))
|
||||
|
||||
pipeline.set_state(gst.STATE_PLAYING)
|
||||
|
||||
bus = pipeline.get_bus()
|
||||
msg = bus.timed_pop_filtered(gst.CLOCK_TIME_NONE,
|
||||
gst.MESSAGE_ERROR | gst.MESSAGE_EOS)
|
||||
print msg
|
||||
|
||||
pipeline.set_state(gst.STATE_NULL)
|
Loading…
Reference in New Issue