pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/35444: some mplayer patches



>Number:         35444
>Category:       pkg
>Synopsis:       mplayer bad timeout select and play.channels number for oss
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 19 09:10:00 +0000 2007
>Originator:     Mihai Chelaru
>Release:        NetBSD 4.0_BETA2
>Organization:
        
>Environment:
        
        
System: NetBSD kefren64.netbsd.ro 4.0_BETA2 NetBSD 4.0_BETA2 (Kefren.MPACPI) 
#3: Thu Jan 18 20:56:55 EET 2007 
root%kefren64.netbsd.ro@localhost:/usr/src/sys/arch/amd64/compile/Kefren.MPACPI 
amd64
Architecture: x86_64
Machine: amd64
>Description:
        
        patch is obvious. select is infinite and play channels number is not 
set.
>How-To-Repeat:
        
>Fix:
        
Index: multimedia/mplayer-share/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/multimedia/mplayer-share/distinfo,v
retrieving revision 1.36
diff -u -r1.36 distinfo
--- multimedia/mplayer-share/distinfo   9 Jan 2007 14:49:33 -0000       1.36
+++ multimedia/mplayer-share/distinfo   19 Jan 2007 09:02:26 -0000
@@ -11,4 +11,6 @@
 SHA1 (patch-ba) = bdb20f4ead6f55c0847534b5b1f06ea865e438e6
 SHA1 (patch-bb) = 554ca2074716ada4f817f55be61e808e1dc5c93e
 SHA1 (patch-bc) = c073f6e5d2d71030346fda82ff3a1f474ad49c0f
+SHA1 (patch-bd) = 60125e4b46d16d8ac9f44db1f197a9aee4dae1ab
+SHA1 (patch-be) = 83ec8e47d98b629b4b7a768ea4ac592f0e1f8c13
 SHA1 (patch-tc) = e67443cec273d7aa168fb160e2409d2ce352a8bf
Index: multimedia/mplayer-share/patches/patch-bd
===================================================================
RCS file: multimedia/mplayer-share/patches/patch-bd
diff -N multimedia/mplayer-share/patches/patch-bd
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ multimedia/mplayer-share/patches/patch-bd   19 Jan 2007 09:02:26 -0000
@@ -0,0 +1,13 @@
+--- stream/udp.c.orig  2007-01-19 10:15:52.000000000 +0200
++++ stream/udp.c       2007-01-19 10:16:12.000000000 +0200
+@@ -157,8 +157,8 @@
+     }
+   }
+ 
+-  tv.tv_sec = 0;
+-  tv.tv_usec = (1 * 1000000); /* 1 second timeout */
++  tv.tv_sec = 1;
++  tv.tv_usec = 0;     /* 1 second timeout */
+ 
+   FD_ZERO (&set);
+   FD_SET (socket_server_fd, &set);
Index: multimedia/mplayer-share/patches/patch-be
===================================================================
RCS file: multimedia/mplayer-share/patches/patch-be
diff -N multimedia/mplayer-share/patches/patch-be
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ multimedia/mplayer-share/patches/patch-be   19 Jan 2007 09:02:26 -0000
@@ -0,0 +1,55 @@
+--- libao2/ao_oss.c.orig       2006-10-23 01:32:25.000000000 +0300
++++ libao2/ao_oss.c    2007-01-19 10:57:13.000000000 +0200
+@@ -2,6 +2,9 @@
+ #include <stdlib.h>
+ 
+ #include <sys/ioctl.h>
++#ifdef __NetBSD__
++#include <sys/audioio.h>
++#endif
+ #include <unistd.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
+@@ -92,6 +95,18 @@
+     return -1;
+ }
+ 
++#ifdef __NetBSD__
++int nbsd_set_play_channels(int audiod, int nchans)
++{
++      audio_info_t ainfo;
++
++      if (ioctl(audiod, AUDIO_GETINFO, &ainfo) == -1)
++              return -1;
++      ainfo.play.channels = nchans;
++      return ioctl(audiod, AUDIO_SETINFO, &ainfo);
++}
++#endif
++
+ static int oss2format(int format)
+ {
+     switch(format)
+@@ -332,7 +347,11 @@
+   if(format != AF_FORMAT_AC3) {
+     // We only use SNDCTL_DSP_CHANNELS for >2 channels, in case some drivers 
don't have it
+     if (ao_data.channels > 2) {
++#ifdef __NetBSD__
++      if ( nbsd_set_play_channels(audio_fd, ao_data.channels) == -1 ||
++#else
+       if ( ioctl(audio_fd, SNDCTL_DSP_CHANNELS, &ao_data.channels) == -1 ||
++#endif
+          ao_data.channels != channels ) {
+       mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantSetChans, channels);
+       return 0;
+@@ -440,7 +459,11 @@
+   ioctl (audio_fd, SNDCTL_DSP_SETFMT, &oss_format);
+   if(ao_data.format != AF_FORMAT_AC3) {
+     if (ao_data.channels > 2)
++#ifdef __NetBSD__
++      nbsd_set_play_channels(audio_fd, ao_data.channels);
++#else
+       ioctl (audio_fd, SNDCTL_DSP_CHANNELS, &ao_data.channels);
++#endif
+     else {
+       int c = ao_data.channels-1;
+       ioctl (audio_fd, SNDCTL_DSP_STEREO, &c);

>Unformatted:
        
        



Home | Main Index | Thread Index | Old Index