diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-04-02 07:27:58 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-04-02 07:27:58 +0800 |
commit | 27ddfad17c0a896b3affdd0b487e91e4a77bcada (patch) | |
tree | 6c7678b63a534d3d5ee7cdeb3f69ef97c41cf388 /multimedia/gstreamer-plugins-good | |
parent | c75ad36399df447dbb954b5195b1daab6efe5b3b (diff) | |
download | marcuscom-ports-27ddfad17c0a896b3affdd0b487e91e4a77bcada.tar marcuscom-ports-27ddfad17c0a896b3affdd0b487e91e4a77bcada.tar.gz marcuscom-ports-27ddfad17c0a896b3affdd0b487e91e4a77bcada.tar.bz2 marcuscom-ports-27ddfad17c0a896b3affdd0b487e91e4a77bcada.tar.lz marcuscom-ports-27ddfad17c0a896b3affdd0b487e91e4a77bcada.tar.xz marcuscom-ports-27ddfad17c0a896b3affdd0b487e91e4a77bcada.tar.zst marcuscom-ports-27ddfad17c0a896b3affdd0b487e91e4a77bcada.zip |
Attempt to fix the OSS src and sink by adding 32 and 24-bit audio support,
and working around a bug in our DSP code. Since I had so sound to test this,
I need positive feedback before bumping PORTREVISION.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@5995 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'multimedia/gstreamer-plugins-good')
4 files changed, 148 insertions, 1 deletions
diff --git a/multimedia/gstreamer-plugins-good/Makefile b/multimedia/gstreamer-plugins-good/Makefile index efc99476d..0c6aaa6cc 100644 --- a/multimedia/gstreamer-plugins-good/Makefile +++ b/multimedia/gstreamer-plugins-good/Makefile @@ -3,7 +3,7 @@ # Whom: Michael Johnson <ahze@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/multimedia/gstreamer-plugins-good/Makefile,v 1.1 2006/01/20 22:58:18 ahze Exp $ +# $MCom: ports/multimedia/gstreamer-plugins-good/Makefile,v 1.2 2006/02/26 19:26:21 marcus Exp $ # PORTREVISION= 1 @@ -26,6 +26,8 @@ GOOD_GST_DIRS= gst sys PLIST_SUB= VERSION="${GST_VERSION}" NO_GSTREAMER_COMMON= yes PLIST= ${.CURDIR}/pkg-plist +FILESDIR=${.CURDIR}/files +PATCHDIR=${.CURDIR}/files do-build: .for dir in ${GOOD_GST_DIRS} diff --git a/multimedia/gstreamer-plugins-good/files/patch-sys_oss_gstosshelper.c b/multimedia/gstreamer-plugins-good/files/patch-sys_oss_gstosshelper.c new file mode 100644 index 000000000..579a1434b --- /dev/null +++ b/multimedia/gstreamer-plugins-good/files/patch-sys_oss_gstosshelper.c @@ -0,0 +1,95 @@ +--- sys/oss/gstosshelper.c.orig Sat Apr 1 18:22:31 2006 ++++ sys/oss/gstosshelper.c Sat Apr 1 18:22:38 2006 +@@ -102,6 +102,21 @@ gst_oss_helper_probe_caps (gint fd) + else + format_mask |= AFMT_S16_BE | AFMT_U16_BE; + ++#if defined(AFMT_S24_LE) ++ if (G_BYTE_ORDER == G_LITTLE_ENDIAN) ++ format_mask |= AFMT_S24_LE | AFMT_U24_LE; ++ else ++ format_mask |= AFMT_S24_BE | AFMT_U24_BE; ++#endif ++ ++#if defined(AFMT_S32_LE) ++ if (G_BYTE_ORDER == G_LITTLE_ENDIAN) ++ format_mask |= AFMT_S32_LE | AFMT_U32_LE; ++ else ++ format_mask |= AFMT_S32_BE | AFMT_U32_BE; ++#endif ++ ++ + caps = gst_caps_new_empty (); + + /* assume that the most significant bit of format_mask is 0 */ +@@ -202,6 +217,50 @@ gst_oss_helper_get_format_structure (uns + sign = FALSE; + width = 16; + break; ++#if defined(AFMT_S24_LE) ++ case AFMT_S24_LE: ++ endianness = G_LITTLE_ENDIAN; ++ sign = TRUE; ++ width = 24; ++ break; ++ case AFMT_S24_BE: ++ endianness = G_BIG_ENDIAN; ++ sign = TRUE; ++ width = 24; ++ break; ++ case AFMT_U24_LE: ++ endianness = G_LITTLE_ENDIAN; ++ sign = FALSE; ++ width = 24; ++ break; ++ case AFMT_U24_BE: ++ endianness = G_BIG_ENDIAN; ++ sign = FALSE; ++ width = 24; ++ break; ++#endif ++#if defined(AFMT_S32_LE) ++ case AFMT_S32_LE: ++ endianness = G_LITTLE_ENDIAN; ++ sign = TRUE; ++ width = 32; ++ break; ++ case AFMT_S32_BE: ++ endianness = G_BIG_ENDIAN; ++ sign = TRUE; ++ width = 32; ++ break; ++ case AFMT_U32_LE: ++ endianness = G_LITTLE_ENDIAN; ++ sign = FALSE; ++ width = 32; ++ break; ++ case AFMT_U32_BE: ++ endianness = G_BIG_ENDIAN; ++ sign = FALSE; ++ width = 32; ++ break; ++#endif + default: + g_assert_not_reached (); + return NULL; +@@ -232,6 +291,11 @@ gst_oss_helper_rate_probe_check (GstOssP + + probe->rates = g_array_new (FALSE, FALSE, sizeof (int)); + ++ probe->min = 8000; ++ probe->max = 100000; ++ result = FALSE; ++ goto out; ++ + probe->min = gst_oss_helper_rate_check_rate (probe, 1000); + n_checks++; + probe->max = gst_oss_helper_rate_check_rate (probe, 100000); +@@ -312,6 +376,7 @@ gst_oss_helper_rate_probe_check (GstOssP + + g_free (range); + } ++out: + + while ((range = g_queue_pop_head (ranges))) { + g_free (range); diff --git a/multimedia/gstreamer-plugins-good/files/patch-sys_oss_gstosssink.c b/multimedia/gstreamer-plugins-good/files/patch-sys_oss_gstosssink.c new file mode 100644 index 000000000..98ab012a1 --- /dev/null +++ b/multimedia/gstreamer-plugins-good/files/patch-sys_oss_gstosssink.c @@ -0,0 +1,25 @@ +--- sys/oss/gstosssink.c.orig Sat Apr 1 18:22:44 2006 ++++ sys/oss/gstosssink.c Sat Apr 1 18:23:25 2006 +@@ -98,6 +98,22 @@ static GstStaticPadTemplate osssink_sink + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("audio/x-raw-int, " ++#if defined(AFMT_S32_LE) ++ "endianness = (int) { " G_STRINGIFY (G_BYTE_ORDER) " }, " ++ "signed = (boolean) { TRUE, FALSE }, " ++ "width = (int) 32, " ++ "depth = (int) 32, " ++ "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]; " ++ "audio/x-raw-int, " ++#endif ++#if defined(AFMT_S24_LE) ++ "endianness = (int) { " G_STRINGIFY (G_BYTE_ORDER) " }, " ++ "signed = (boolean) { TRUE, FALSE }, " ++ "width = (int) 24, " ++ "depth = (int) 24, " ++ "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]; " ++ "audio/x-raw-int, " ++#endif + "endianness = (int) { " G_STRINGIFY (G_BYTE_ORDER) " }, " + "signed = (boolean) { TRUE, FALSE }, " + "width = (int) 16, " diff --git a/multimedia/gstreamer-plugins-good/files/patch-sys_oss_gstosssrc.c b/multimedia/gstreamer-plugins-good/files/patch-sys_oss_gstosssrc.c new file mode 100644 index 000000000..f7132a42e --- /dev/null +++ b/multimedia/gstreamer-plugins-good/files/patch-sys_oss_gstosssrc.c @@ -0,0 +1,25 @@ +--- sys/oss/gstosssrc.c.orig Sat Apr 1 18:22:52 2006 ++++ sys/oss/gstosssrc.c Sat Apr 1 18:22:56 2006 +@@ -94,6 +94,22 @@ static GstStaticPadTemplate osssrc_src_f + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("audio/x-raw-int, " ++#if defined(AFMT_S32_LE) ++ "endianness = (int) { " G_STRINGIFY (G_BYTE_ORDER) " }, " ++ "signed = (boolean) { TRUE, FALSE }, " ++ "width = (int) 32, " ++ "depth = (int) 32, " ++ "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]; " ++ "audio/x-raw-int, " ++#endif ++#if defined(AFMT_S24_LE) ++ "endianness = (int) { " G_STRINGIFY (G_BYTE_ORDER) " }, " ++ "signed = (boolean) { TRUE, FALSE }, " ++ "width = (int) 24, " ++ "depth = (int) 24, " ++ "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]; " ++ "audio/x-raw-int, " ++#endif + "endianness = (int) { " G_STRINGIFY (G_BYTE_ORDER) " }, " + "signed = (boolean) { TRUE, FALSE }, " + "width = (int) 16, " |