[Mplayer-cvslog] CVS: main configure,1.65,1.66 dec_audio.c,1.14,1.15 mixer.c,1.5,1.6 mplayer.c,1.151,1.152 stream.c,1.8,1.9 vcd_read.c,1.3,1.4

GEREOFFY arpi_esp at users.sourceforge.net
Tue Jun 5 04:26:58 CEST 2001


Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv8385

Modified Files:
	configure dec_audio.c mixer.c mplayer.c stream.c vcd_read.c 
Log Message:
Solaris 8 support - patch by Marcus Comstedt <marcus at idonex.se>

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -r1.65 -r1.66
*** configure	2001/06/05 02:22:38	1.65
--- configure	2001/06/05 02:26:55	1.66
***************
*** 150,158 ****
  TMPS="mplayer-conf-${RANDOM}-$$-${RANDOM}.S"
  
! if [ ! -z $TMPDIR ]; then
  	TMPC="${TMPDIR}/${TMPC}"
  	TMPO="${TMPDIR}/${TMPO}"
  	TMPS="${TMPDIR}/${TMPS}"
! elif [ ! -z $TEMPDIR ]; then
  	TMPC="${TEMPDIR}/${TMPC}"
  	TMPO="${TEMPDIR}/${TMPO}"
--- 150,158 ----
  TMPS="mplayer-conf-${RANDOM}-$$-${RANDOM}.S"
  
! if [ ! -z "$TMPDIR" ]; then
  	TMPC="${TMPDIR}/${TMPC}"
  	TMPO="${TMPDIR}/${TMPO}"
  	TMPS="${TMPDIR}/${TMPS}"
! elif [ ! -z "$TEMPDIR" ]; then
  	TMPC="${TEMPDIR}/${TMPC}"
  	TMPO="${TEMPDIR}/${TMPO}"
***************
*** 176,183 ****
  
  _x11libdir=
! if [ -e /usr/X11R6 ]; then
   _x11libdir=-L/usr/X11R6/lib
  else
!  if [ -e /usr/X11 ]; then
    _x11libdir=-L/usr/X11/lib
   fi
--- 176,183 ----
  
  _x11libdir=
! if [ -d /usr/X11R6 ]; then
   _x11libdir=-L/usr/X11R6/lib
  else
!  if [ -d /usr/X11 ]; then
    _x11libdir=-L/usr/X11/lib
   fi
***************
*** 328,335 ****
  
  _win32libdirnotify=no
! if [ -e /usr/lib/win32 ]; then
   _win32libdir=/usr/lib/win32
  else
!  if [ -e /usr/local/lib/win32 ]; then
    _win32libdir=/usr/local/lib/win32
   else
--- 328,335 ----
  
  _win32libdirnotify=no
! if [ -d /usr/lib/win32 ]; then
   _win32libdir=/usr/lib/win32
  else
!  if [ -d /usr/local/lib/win32 ]; then
    _win32libdir=/usr/local/lib/win32
   else
***************
*** 341,345 ****
  
  
! if [ -e /dev/mga_vid ]; then
   _mga=yes
   _syncfb=yes
--- 341,345 ----
  
  
! if [ -c /dev/mga_vid ]; then
   _mga=yes
   _syncfb=yes
***************
*** 488,493 ****
  _sdl=no
  if $_cc $TMPC -o $TMPO `$_sdlconfig --libs` &> /dev/null ; then
! 	if test `$_sdlconfig --version | sed s/[=[:punct:]=]//g` -gt 116 ; then
! 		if test `$_sdlconfig --version | sed s/[=[:punct:]=]//g` -lt 121 ; then
  			_sdlbuggy='#define BUGGY_SDL'
  		else	
--- 488,494 ----
  _sdl=no
  if $_cc $TMPC -o $TMPO `$_sdlconfig --libs` &> /dev/null ; then
! 	if test `$_sdlconfig --version | sed s/[^0-9]//g` -gt 116 ; then
! 		if test `$_sdlconfig --version | sed s/[^0-9]//g` -lt 121 ; then
! 
  			_sdlbuggy='#define BUGGY_SDL'
  		else	
***************
*** 522,526 ****
  
  _png=no
! $_cc $TMPC -o $TMPO -lpng -lz&> /dev/null && _png=yes
  
  _binutils=no
--- 523,527 ----
  
  _png=no
! $_cc $TMPC -o $TMPO -lpng -lz -lm &> /dev/null && _png=yes
  
  _binutils=no
***************
*** 531,546 ****
  # ----------- Check X11 and related libs (GL, Xxf86vm, Xv, DGA) --------------
  
  if [ $_x11 = auto ]; then
    _x11=no
!   $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext &> /dev/null && _x11=yes
  fi
  
  if [ $_x11 = yes ]; then
  
! $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms &> /dev/null && _xdpms=yes
! $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXv &> /dev/null && _xv=yes
! $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXxf86vm &> /dev/null && _vm=yes
  
! $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL &> /dev/null && _gl=yes
  
  cat > $TMPC << EOF
--- 532,551 ----
  # ----------- Check X11 and related libs (GL, Xxf86vm, Xv, DGA) --------------
  
+ # for Solaris:
+ _socklib=
+ $_cc $TMPC -o $TMPO -lsocket >/dev/null 2>&1 && _socklib=-lsocket
+ 
  if [ $_x11 = auto ]; then
    _x11=no
!   $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext $_socklib &> /dev/null && _x11=yes
  fi
  
  if [ $_x11 = yes ]; then
  
! $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms $_socklib &> /dev/null && _xdpms=yes
! $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXv $_socklib &> /dev/null && _xv=yes
! $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXxf86vm $_socklib &> /dev/null && _vm=yes
  
! $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL $_socklib &> /dev/null && _gl=yes
  
  cat > $TMPC << EOF
***************
*** 548,552 ****
  int main( void ) { return 0; }
  EOF
! $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL &> /dev/null || \
   { _gl=no; echo "GL includes not found!";}
  
--- 553,557 ----
  int main( void ) { return 0; }
  EOF
! $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL $_socklib &> /dev/null || \
   { _gl=no; echo "GL includes not found!";}
  
***************
*** 558,562 ****
  EOF
  
! $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga=yes
  # Note: the -lXxf86vm library is the VideoMode extension and though it's
  # not needed for DGA, AFAIK every distribution packages together with DGA
--- 563,567 ----
  EOF
  
! $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm $_socklib &> /dev/null && _dga=yes
  # Note: the -lXxf86vm library is the VideoMode extension and though it's
  # not needed for DGA, AFAIK every distribution packages together with DGA
***************
*** 574,578 ****
  
  _dga2=no
! $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga2=yes
  
  fi
--- 579,583 ----
  
  _dga2=no
! $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm $_socklib &> /dev/null && _dga2=yes
  
  fi
***************
*** 905,909 ****
  
  if [ $_css = yes ]; then
!    if [ ! -z $_csslibdir ]; then
       _csslib="-L${_csslibdir} -lcss"
     else
--- 910,914 ----
  
  if [ $_css = yes ]; then
!    if [ ! -z "$_csslibdir" ]; then
       _csslib="-L${_csslibdir} -lcss"
     else
***************
*** 911,915 ****
     fi
     _css='#define HAVE_LIBCSS'
!    if [ ! -z $_cssincdir ]; then
       _cssinc="-I${_cssincdir}"
     else
--- 916,920 ----
     fi
     _css='#define HAVE_LIBCSS'
!    if [ ! -z "$_cssincdir" ]; then
       _cssinc="-I${_cssincdir}"
     else
***************
*** 1013,1017 ****
  OPTFLAGS=$CFLAGS
  # LIBS=-L/usr/lib -L/usr/local/lib $_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib
! X_LIBS=$_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib $_libpng
  TERMCAP_LIB=$_libtermcap
  XMM_LIBS = $_xmmplibs
--- 1018,1022 ----
  OPTFLAGS=$CFLAGS
  # LIBS=-L/usr/lib -L/usr/local/lib $_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib
! X_LIBS=$_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib $_libpng $_socklib
  TERMCAP_LIB=$_libtermcap
  XMM_LIBS = $_xmmplibs

Index: dec_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_audio.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** dec_audio.c	2001/05/25 18:26:24	1.14
--- dec_audio.c	2001/06/05 02:26:55	1.15
***************
*** 3,7 ****
--- 3,16 ----
  #include <stdlib.h>
  
+ #ifdef __sun
+ #include <sys/audioio.h>
+ #define AFMT_MU_LAW     AUDIO_ENCODING_ULAW
+ #define AFMT_A_LAW      AUDIO_ENCODING_ALAW
+ #define AFMT_S16_LE     AUDIO_ENCODING_LINEAR
+ #define AFMT_IMA_ADPCM  AUDIO_ENCODING_DVI
+ #define AFMT_U8         AUDIO_ENCODING_LINEAR8
+ #else
  #include <sys/soundcard.h>
+ #endif
  
  #include "config.h"
***************
*** 162,166 ****
--- 171,177 ----
      case 0x7:  sh_audio->sample_format=AFMT_MU_LAW;break;
      case 0x11: sh_audio->sample_format=AFMT_IMA_ADPCM;break;
+ #ifndef __sun
      case 0x50: sh_audio->sample_format=AFMT_MPEG;break;
+ #endif
  //    case 0x2000: sh_audio->sample_format=AFMT_AC3;
      default: sh_audio->sample_format=(sh_audio->samplesize==2)?AFMT_S16_LE:AFMT_U8;

Index: mixer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mixer.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** mixer.c	2001/04/23 23:46:24	1.5
--- mixer.c	2001/06/05 02:26:55	1.6
***************
*** 2,6 ****
--- 2,10 ----
  #include <string.h>
  #include <sys/ioctl.h>
+ #ifdef __sun
+ #include <sys/audioio.h>
+ #else
  #include <sys/soundcard.h>
+ #endif
  #include <fcntl.h>
  #include <stdio.h>
***************
*** 9,13 ****
--- 13,21 ----
  #include "mixer.h"
  
+ #ifdef __sun
+ char * mixer_device="/dev/audioctl";
+ #else
  char * mixer_device="/dev/mixer";
+ #endif
  int    mixer_usemaster=0;
  
***************
*** 19,22 ****
--- 27,35 ----
   if ( fd != -1 )
    {
+ #ifdef __sun
+    audio_info_t info;
+    ioctl( fd,AUDIO_GETINFO,&info );
+    *r=*l=(info.play.gain * 100 + (AUDIO_MAX_GAIN-1))/AUDIO_MAX_GAIN;
+ #else
     ioctl( fd,SOUND_MIXER_READ_DEVMASK,&devs );
     if ( ( devs & SOUND_MASK_PCM ) && ( mixer_usemaster==0 ) ) cmd=SOUND_MIXER_READ_PCM;
***************
*** 31,34 ****
--- 44,48 ----
     *r=( v & 0xFF00 ) >> 8;
     *l=( v & 0x00FF );
+ #endif
     close( fd );
    }
***************
*** 42,45 ****
--- 56,65 ----
   if ( fd != -1 )
    {
+ #ifdef __sun
+    audio_info_t info;
+    ioctl( fd,AUDIO_GETINFO,&info );
+    info.play.gain = ((l+r)*AUDIO_MAX_GAIN+199)/200;
+    ioctl( fd,AUDIO_SETINFO,&info );
+ #else
     ioctl( fd,SOUND_MIXER_READ_DEVMASK,&devs );
     if ( ( devs & SOUND_MASK_PCM ) && ( mixer_usemaster==0 ) ) cmd=SOUND_MIXER_WRITE_PCM;
***************
*** 53,56 ****
--- 73,77 ----
     v=( r << 8 ) | l;
     ioctl( fd,cmd,&v );
+ #endif
     close( fd );
    }

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -C2 -r1.151 -r1.152
*** mplayer.c	2001/06/05 02:13:31	1.151
--- mplayer.c	2001/06/05 02:26:55	1.152
***************
*** 17,21 ****
--- 17,25 ----
  #include <sys/stat.h>
  #include <fcntl.h>
+ #ifdef __sun
+ #include <sys/audioio.h>
+ #else
  #include <sys/soundcard.h>
+ #endif
  
  #include "version.h"
***************
*** 502,506 ****
--- 506,514 ----
  
  if(!filename){
+ #ifdef __sun
+   if(vcd_track) filename="/vol/dev/aliases/cdrom0"; 
+ #else
    if(vcd_track) filename="/dev/cdrom"; 
+ #endif
    else {
      printf("%s",help_text); exit(0);

Index: stream.c
===================================================================
RCS file: /cvsroot/mplayer/main/stream.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** stream.c	2001/06/03 00:31:41	1.8
--- stream.c	2001/06/05 02:26:56	1.9
***************
*** 14,18 ****
--- 14,22 ----
  #include <sys/cdrio.h>
  #else
+ #ifdef __sun
+ #include <sys/cdio.h>
+ #else
  #include <linux/cdrom.h>
+ #endif
  #endif
  

Index: vcd_read.c
===================================================================
RCS file: /cvsroot/mplayer/main/vcd_read.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** vcd_read.c	2001/04/23 21:25:09	1.3
--- vcd_read.c	2001/06/05 02:26:56	1.4
***************
*** 69,74 ****
--- 69,83 ----
  
  static int vcd_read(int fd,char *mem){
+ #ifdef __sun
+       struct cdrom_cdxa xa;
+       xa.cdxa_addr = vcd_get_msf();
+       xa.cdxa_length = CDROM_BLK_2352;
+       xa.cdxa_data = vcd_buf;
+       xa.cdxa_format = CDROM_XA_SECTOR_DATA;
+       if(ioctl(fd,CDROMCDXA,&xa)==-1) return 0; // EOF?
+ #else
        memcpy(vcd_buf,&vcd_entry.cdte_addr.msf,sizeof(struct cdrom_msf));
        if(ioctl(fd,CDROMREADRAW,vcd_buf)==-1) return 0; // EOF?
+ #endif
  
        vcd_entry.cdte_addr.msf.frame++;


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list