aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/gstreamer1-plugins-good
diff options
context:
space:
mode:
authorriggs <riggs@FreeBSD.org>2014-09-11 15:45:08 +0800
committerriggs <riggs@FreeBSD.org>2014-09-11 15:45:08 +0800
commit5f7f5b3665980828989860d950f97d07399ad84a (patch)
tree593a58756e7360d726fb17599da6b627d199480f /multimedia/gstreamer1-plugins-good
parent93ad97b33ab69bda8cf08a276b984b2cd488b0a9 (diff)
downloadfreebsd-ports-gnome-5f7f5b3665980828989860d950f97d07399ad84a.tar.gz
freebsd-ports-gnome-5f7f5b3665980828989860d950f97d07399ad84a.tar.zst
freebsd-ports-gnome-5f7f5b3665980828989860d950f97d07399ad84a.zip
- Add 24 and 32 bit sample formats to the oss plugin
- Bump PORTREVISION PR: 181655 Submitted by: jbeich@vfemail.net
Diffstat (limited to 'multimedia/gstreamer1-plugins-good')
-rw-r--r--multimedia/gstreamer1-plugins-good/Makefile2
-rw-r--r--multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosshelper.c76
-rw-r--r--multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssink.c73
-rw-r--r--multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssrc.c73
4 files changed, 218 insertions, 6 deletions
diff --git a/multimedia/gstreamer1-plugins-good/Makefile b/multimedia/gstreamer1-plugins-good/Makefile
index 177f3b0d669b..3dd91c6a3af6 100644
--- a/multimedia/gstreamer1-plugins-good/Makefile
+++ b/multimedia/gstreamer1-plugins-good/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
# $MCom: ports/multimedia/gstreamer1-plugins-good/Makefile,v 1.4 2013/01/15 21:43:45 kwm Exp $
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= multimedia
COMMENT= Good gstreamer-plugins
diff --git a/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosshelper.c b/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosshelper.c
index 34fdd31191a2..6fae8849cfef 100644
--- a/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosshelper.c
+++ b/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosshelper.c
@@ -1,6 +1,72 @@
---- sys/oss/gstosshelper.c.orig Sun Apr 2 03:23:53 2006
-+++ sys/oss/gstosshelper.c Sun Apr 2 03:25:44 2006
-@@ -343,13 +344,17 @@ gst_oss_helper_rate_check_rate (GstOssPr
+--- sys/oss/gstosshelper.c.orig 2014-01-14 13:03:14.000000000 +0100
++++ sys/oss/gstosshelper.c 2014-09-11 09:10:55.115013111 +0200
+@@ -95,9 +95,13 @@
+ format_mask = AFMT_U8 | AFMT_S8;
+
+ if (G_BYTE_ORDER == G_LITTLE_ENDIAN)
+- format_mask |= AFMT_S16_LE | AFMT_U16_LE;
++ format_mask |= AFMT_S16_LE | AFMT_U16_LE
++ | AFMT_S24_LE | AFMT_U24_LE
++ | AFMT_S32_LE | AFMT_U32_LE;
+ else
+- format_mask |= AFMT_S16_BE | AFMT_U16_BE;
++ format_mask |= AFMT_S16_BE | AFMT_U16_BE
++ | AFMT_S24_BE | AFMT_U24_BE
++ | AFMT_S32_BE | AFMT_U32_BE;
+
+ caps = gst_caps_new_empty ();
+
+@@ -169,6 +173,9 @@
+ const gchar *format;
+
+ switch (format_bit) {
++ case AFMT_S8:
++ format = "S8";
++ break;
+ case AFMT_U8:
+ format = "U8";
+ break;
+@@ -178,15 +185,36 @@
+ case AFMT_S16_BE:
+ format = "S16BE";
+ break;
+- case AFMT_S8:
+- format = "S8";
+- break;
+ case AFMT_U16_LE:
+ format = "U16LE";
+ break;
+ case AFMT_U16_BE:
+ format = "U16BE";
+ break;
++ case AFMT_S24_LE:
++ format = "S24LE";
++ break;
++ case AFMT_S24_BE:
++ format = "S24BE";
++ break;
++ case AFMT_U24_LE:
++ format = "U24LE";
++ break;
++ case AFMT_U24_BE:
++ format = "U24BE";
++ break;
++ case AFMT_S32_LE:
++ format = "S32LE";
++ break;
++ case AFMT_S32_BE:
++ format = "S32BE";
++ break;
++ case AFMT_U32_LE:
++ format = "U32LE";
++ break;
++ case AFMT_U32_BE:
++ format = "U32BE";
++ break;
+ default:
+ g_assert_not_reached ();
+ return NULL;
+@@ -324,13 +352,17 @@
int format;
int n_channels;
int ret;
@@ -16,5 +82,5 @@
+ /* Reset rate to lowest supported rate. */
+ ioctl (probe->fd, SNDCTL_DSP_SPEED, &rst);
ret = ioctl (probe->fd, SNDCTL_DSP_SETFMT, &format);
- if (ret < 0)
- return -1;
+ if (ret < 0 || format != probe->format) {
+ GST_DEBUG ("unsupported format: %d (%d)", probe->format, format);
diff --git a/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssink.c b/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssink.c
new file mode 100644
index 000000000000..3b0a46ab7303
--- /dev/null
+++ b/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssink.c
@@ -0,0 +1,73 @@
+--- sys/oss/gstosssink.c.orig 2013-09-24 15:05:22.000000000 +0200
++++ sys/oss/gstosssink.c 2014-09-11 09:10:55.116013220 +0200
+@@ -106,7 +106,10 @@
+ PROP_DEVICE,
+ };
+
+-#define FORMATS "{" GST_AUDIO_NE(S16)","GST_AUDIO_NE(U16)", S8, U8 }"
++#define FORMATS "{" GST_AUDIO_NE(S32)","GST_AUDIO_NE(U32)"," \
++ GST_AUDIO_NE(S24)","GST_AUDIO_NE(U24)"," \
++ GST_AUDIO_NE(S16)","GST_AUDIO_NE(U16)"," \
++ "S8, U8 }"
+
+ static GstStaticPadTemplate osssink_sink_factory =
+ GST_STATIC_PAD_TEMPLATE ("sink",
+@@ -321,6 +324,9 @@
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW:
+ {
+ switch (rfmt) {
++ case GST_AUDIO_FORMAT_S8:
++ result = AFMT_S8;
++ break;
+ case GST_AUDIO_FORMAT_U8:
+ result = AFMT_U8;
+ break;
+@@ -330,15 +336,36 @@
+ case GST_AUDIO_FORMAT_S16BE:
+ result = AFMT_S16_BE;
+ break;
+- case GST_AUDIO_FORMAT_S8:
+- result = AFMT_S8;
+- break;
+ case GST_AUDIO_FORMAT_U16LE:
+ result = AFMT_U16_LE;
+ break;
+ case GST_AUDIO_FORMAT_U16BE:
+ result = AFMT_U16_BE;
+ break;
++ case GST_AUDIO_FORMAT_S24LE:
++ result = AFMT_S24_LE;
++ break;
++ case GST_AUDIO_FORMAT_S24BE:
++ result = AFMT_S24_BE;
++ break;
++ case GST_AUDIO_FORMAT_U24LE:
++ result = AFMT_U24_LE;
++ break;
++ case GST_AUDIO_FORMAT_U24BE:
++ result = AFMT_U24_BE;
++ break;
++ case GST_AUDIO_FORMAT_S32LE:
++ result = AFMT_S32_LE;
++ break;
++ case GST_AUDIO_FORMAT_S32BE:
++ result = AFMT_S32_BE;
++ break;
++ case GST_AUDIO_FORMAT_U32LE:
++ result = AFMT_U32_LE;
++ break;
++ case GST_AUDIO_FORMAT_U32BE:
++ result = AFMT_U32_BE;
++ break;
+ default:
+ result = 0;
+ break;
+@@ -441,7 +468,7 @@
+ rate = GST_AUDIO_INFO_RATE (&spec->info);
+ channels = GST_AUDIO_INFO_CHANNELS (&spec->info);
+
+- if (width != 16 && width != 8)
++ if (width != 32 && width != 24 && width != 16 && width != 8)
+ goto dodgy_width;
+
+ SET_PARAM (oss, SNDCTL_DSP_SETFMT, tmp, "SETFMT");
diff --git a/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssrc.c b/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssrc.c
new file mode 100644
index 000000000000..0709d8abc5a1
--- /dev/null
+++ b/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssrc.c
@@ -0,0 +1,73 @@
+--- sys/oss/gstosssrc.c.orig 2013-09-24 15:05:22.000000000 +0200
++++ sys/oss/gstosssrc.c 2014-09-11 09:10:55.116013220 +0200
+@@ -100,7 +100,10 @@
+ static guint gst_oss_src_delay (GstAudioSrc * asrc);
+ static void gst_oss_src_reset (GstAudioSrc * asrc);
+
+-#define FORMATS "{" GST_AUDIO_NE(S16)","GST_AUDIO_NE(U16)", S8, U8 }"
++#define FORMATS "{" GST_AUDIO_NE(S32)","GST_AUDIO_NE(U32)"," \
++ GST_AUDIO_NE(S24)","GST_AUDIO_NE(U24)"," \
++ GST_AUDIO_NE(S16)","GST_AUDIO_NE(U16)"," \
++ "S8, U8 }"
+
+ static GstStaticPadTemplate osssrc_src_factory = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+@@ -314,6 +317,9 @@
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW:
+ {
+ switch (rfmt) {
++ case GST_AUDIO_FORMAT_S8:
++ result = AFMT_S8;
++ break;
+ case GST_AUDIO_FORMAT_U8:
+ result = AFMT_U8;
+ break;
+@@ -323,15 +329,36 @@
+ case GST_AUDIO_FORMAT_S16BE:
+ result = AFMT_S16_BE;
+ break;
+- case GST_AUDIO_FORMAT_S8:
+- result = AFMT_S8;
+- break;
+ case GST_AUDIO_FORMAT_U16LE:
+ result = AFMT_U16_LE;
+ break;
+ case GST_AUDIO_FORMAT_U16BE:
+ result = AFMT_U16_BE;
+ break;
++ case GST_AUDIO_FORMAT_S24LE:
++ result = AFMT_S24_LE;
++ break;
++ case GST_AUDIO_FORMAT_S24BE:
++ result = AFMT_S24_BE;
++ break;
++ case GST_AUDIO_FORMAT_U24LE:
++ result = AFMT_U24_LE;
++ break;
++ case GST_AUDIO_FORMAT_U24BE:
++ result = AFMT_U24_BE;
++ break;
++ case GST_AUDIO_FORMAT_S32LE:
++ result = AFMT_S32_LE;
++ break;
++ case GST_AUDIO_FORMAT_S32BE:
++ result = AFMT_S32_BE;
++ break;
++ case GST_AUDIO_FORMAT_U32LE:
++ result = AFMT_U32_LE;
++ break;
++ case GST_AUDIO_FORMAT_U32BE:
++ result = AFMT_U32_BE;
++ break;
+ default:
+ result = 0;
+ break;
+@@ -428,7 +455,7 @@
+ rate = GST_AUDIO_INFO_RATE (&spec->info);
+ channels = GST_AUDIO_INFO_CHANNELS (&spec->info);
+
+- if (width != 16 && width != 8)
++ if (width != 32 && width != 24 && width != 16 && width != 8)
+ goto dodgy_width;
+
+ tmp = ilog2 (spec->segsize);