Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 2014 07:45:09 +0000 (UTC)
From:      Thomas Zander <riggs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r367908 - in head/multimedia/gstreamer1-plugins-good: . files
Message-ID:  <201409110745.s8B7j9Pj071182@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: riggs
Date: Thu Sep 11 07:45:08 2014
New Revision: 367908
URL: http://svnweb.freebsd.org/changeset/ports/367908
QAT: https://qat.redports.org/buildarchive/r367908/

Log:
  - Add 24 and 32 bit sample formats to the oss plugin
  - Bump PORTREVISION
  
  PR:		181655
  Submitted by:	jbeich@vfemail.net

Added:
  head/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssink.c   (contents, props changed)
  head/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssrc.c   (contents, props changed)
Modified:
  head/multimedia/gstreamer1-plugins-good/Makefile
  head/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosshelper.c

Modified: head/multimedia/gstreamer1-plugins-good/Makefile
==============================================================================
--- head/multimedia/gstreamer1-plugins-good/Makefile	Thu Sep 11 07:39:00 2014	(r367907)
+++ head/multimedia/gstreamer1-plugins-good/Makefile	Thu Sep 11 07:45:08 2014	(r367908)
@@ -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

Modified: head/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosshelper.c
==============================================================================
--- head/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosshelper.c	Thu Sep 11 07:39:00 2014	(r367907)
+++ head/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosshelper.c	Thu Sep 11 07:45:08 2014	(r367908)
@@ -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);

Added: head/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssink.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssink.c	Thu Sep 11 07:45:08 2014	(r367908)
@@ -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");

Added: head/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssrc.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssrc.c	Thu Sep 11 07:45:08 2014	(r367908)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409110745.s8B7j9Pj071182>