Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jun 2011 13:51:39 -0500
From:      Zhihao Yuan <lichray@gmail.com>
To:        bug-followup@FreeBSD.org, lichray@gmail.com, riggs@rrr.de, freebsd-multimedia@freebsd.org
Subject:   Re: ports/156747: multimedia/mplayer: fix 24-bits OSS   some improvements
Message-ID:  <20110627185139.GA44221@compaq.yuetime>

next in thread | raw e-mail | index | archive | help

--aM3YZ0Iwxop3KEKx
Content-Type: multipart/mixed; boundary="FL5UXtIhxfXey3p5"
Content-Disposition: inline


--FL5UXtIhxfXey3p5
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

multimedia/mplayer is updated to revision 2, so I needs to bump the
version of my patch.

--=20
Zhihao Yuan, nickname lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/

--FL5UXtIhxfXey3p5
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: attachment; filename=patch-mplayer_3
Content-Transfer-Encoding: quoted-printable

diff -ruN --exclude=3DCVS /usr/ports/multimedia/mplayer.orig/Makefile /usr/=
ports/multimedia/mplayer/Makefile
--- /usr/ports/multimedia/mplayer.orig/Makefile	2011-06-26 00:07:09.0000000=
00 -0500
+++ /usr/ports/multimedia/mplayer/Makefile	2011-06-27 11:49:57.450755232 -0=
500
@@ -7,7 +7,7 @@
=20
 PORTNAME=3D	mplayer
 PORTVERSION=3D	${MPLAYER_PORT_VERSION}
-PORTREVISION=3D	2
+PORTREVISION=3D	3
 COMMENT=3D	High performance media player supporting many formats
=20
 .include "${.CURDIR}/Makefile.shared"
@@ -89,6 +89,7 @@
 			--disable-libdirac-lavc \
 			--disable-mencoder \
 			--disable-mpg123 \
+			--disable-alsa \
 			--disable-musepack
=20
 .include "${.CURDIR}/Makefile.options"
@@ -272,9 +273,13 @@
 		${WRKSRC}/config.mak
 	@${REINPLACE_CMD} \
 		-e 's#HAVE_FAST_CMOV 1#HAVE_FAST_CMOV 0#g' \
+		${WRKSRC}/config.h
+.if ${OSVERSION} < 802502 || (${OSVERSION} >=3D 900000 && ${OSVERSION} < 9=
00027)
+	@${REINPLACE_CMD} \
 		-e 's#HAVE_LOG2 1#HAVE_LOG2 0#g' \
 		-e 's#HAVE_LOG2F 1#HAVE_LOG2F 0#g' \
 		${WRKSRC}/config.h
+.endif
=20
 post-install:
 	@${MKDIR} ${DATADIR}
diff -ruN --exclude=3DCVS /usr/ports/multimedia/mplayer.orig/files/patch-li=
bao2-ao_oss.c /usr/ports/multimedia/mplayer/files/patch-libao2-ao_oss.c
--- /usr/ports/multimedia/mplayer.orig/files/patch-libao2-ao_oss.c	2010-04-=
21 08:07:22.000000000 -0500
+++ /usr/ports/multimedia/mplayer/files/patch-libao2-ao_oss.c	2011-06-27 11=
:48:27.238467607 -0500
@@ -1,14 +1,38 @@
---- libao2/ao_oss.c.orig	2009-05-12 21:58:57.000000000 -0500
-+++ libao2/ao_oss.c	2009-07-23 19:58:44.870097203 -0500
-@@ -453,6 +453,7 @@
+--- libao2/ao_oss.c.orig	2010-01-11 14:27:52.000000000 -0600
++++ libao2/ao_oss.c	2011-05-01 03:24:37.465580362 -0500
+@@ -72,6 +72,11 @@ static int format2oss(int format)
+     case AF_FORMAT_S16_BE: return AFMT_S16_BE;
+ #ifdef AFMT_S24_PACKED
+     case AF_FORMAT_S24_LE: return AFMT_S24_PACKED;
++#elif defined(__FreeBSD__) && defined(AFMT_S24_LE)
++    case AF_FORMAT_U24_LE: return AFMT_U24_LE;
++    case AF_FORMAT_U24_BE: return AFMT_U24_BE;
++    case AF_FORMAT_S24_LE: return AFMT_S24_LE;
++    case AF_FORMAT_S24_BE: return AFMT_S24_BE;
+ #endif
+ #ifdef AFMT_U32_LE
+     case AF_FORMAT_U32_LE: return AFMT_U32_LE;
+@@ -115,6 +120,11 @@ static int oss2format(int format)
+     case AFMT_S16_BE: return AF_FORMAT_S16_BE;
+ #ifdef AFMT_S24_PACKED
+     case AFMT_S24_PACKED: return AF_FORMAT_S24_LE;
++#elif defined(__FreeBSD__) && defined(AFMT_S24_LE)
++    case AFMT_U24_LE: return AF_FORMAT_U24_LE;
++    case AFMT_U24_BE: return AF_FORMAT_U24_BE;
++    case AFMT_S24_LE: return AF_FORMAT_S24_LE;
++    case AFMT_S24_BE: return AF_FORMAT_S24_BE;
+ #endif
+ #ifdef AFMT_U32_LE
+     case AFMT_U32_LE: return AF_FORMAT_U32_LE;
+@@ -448,6 +458,7 @@ static void reset(void){
    fcntl(audio_fd, F_SETFD, FD_CLOEXEC);
  #endif
 =20
 +  ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate);
    oss_format =3D format2oss(ao_data.format);
-   if(ao_data.format =3D=3D AF_FORMAT_AC3)
+   if(AF_FORMAT_IS_AC3(ao_data.format))
      ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate);
-@@ -464,7 +465,6 @@
+@@ -459,7 +470,6 @@ static void reset(void){
        int c =3D ao_data.channels-1;
        ioctl (audio_fd, SNDCTL_DSP_STEREO, &c);
      }

--FL5UXtIhxfXey3p5--

--aM3YZ0Iwxop3KEKx
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)

iQEcBAEBAgAGBQJOCNE7AAoJEDM1qsGtFE5ZFoQH/2PtOb54S8xlz1aEvnuG73Q3
sloa7hCXDcptwUmUareSmyaC+7H5RcNGGi8j/GXoo0/mOrkVEv2kheamui7XbHio
igUrNc0GRyDd4m9Jt5HwoR+wFlFHjSS0xkps7lfXMvCS5RmMZgHGeSkvgUkAPC9i
etkK9waApuY3K5gvzccAnvSQNUgvbF08FBnu4Vqt0ZEhwHyo3ND8YFSh0vtFes15
fY9xyjKyNSOf85VjnIeRAQz11PNC0pP4+Y0tzMdMjhvE5jXboV/pXKkdOxrhF2rv
RcpM4AoDtrsdNSl8JvIjowWA41hYXVe1JrclA303MVPxX7OIKiVSOGONXqBcjeI=
=sTNo
-----END PGP SIGNATURE-----

--aM3YZ0Iwxop3KEKx--



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