summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2012-05-06 18:22:34 +0300
committerUoti Urpala <uau@mplayer2.org>2012-05-06 18:22:34 +0300
commit3076dd8199fefb48ac0ac05c66ae901d6781e4b8 (patch)
tree0dd8aadabf49e48b9c10c2c9df4942f94799f42b
parentcd21ce3779d40e36ac2b49811679e30cc07ed357 (diff)
downloadmpv-3076dd8199fefb48ac0ac05c66ae901d6781e4b8.tar.bz2
mpv-3076dd8199fefb48ac0ac05c66ae901d6781e4b8.tar.xz
build: remove IRIX support
-rw-r--r--Makefile1
-rwxr-xr-xconfigure58
-rw-r--r--libao2/ao_sgi.c301
-rw-r--r--libao2/audio_out.c3
4 files changed, 2 insertions, 361 deletions
diff --git a/Makefile b/Makefile
index 8fbd084e57..63a804eea1 100644
--- a/Makefile
+++ b/Makefile
@@ -472,7 +472,6 @@ SRCS_MPLAYER-$(PORTAUDIO) += libao2/ao_portaudio.c
SRCS_MPLAYER-$(RSOUND) += libao2/ao_rsound.c
SRCS_MPLAYER-$(S3FB) += libvo/vo_s3fb.c
SRCS_MPLAYER-$(SDL) += libao2/ao_sdl.c libvo/vo_sdl.c libvo/sdl_common.c
-SRCS_MPLAYER-$(SGIAUDIO) += libao2/ao_sgi.c
SRCS_MPLAYER-$(SUNAUDIO) += libao2/ao_sun.c
SRCS_MPLAYER-$(SVGA) += libvo/vo_svga.c
SRCS_MPLAYER-$(TDFXFB) += libvo/vo_tdfxfb.c
diff --git a/configure b/configure
index a14ba25d56..178184f7c4 100755
--- a/configure
+++ b/configure
@@ -209,7 +209,6 @@ dragonfly() { issystem "DragonFly"; }
freebsd() { issystem "FreeBSD" || issystem "GNU/kFreeBSD"; }
gnu() { issystem "GNU"; }
hpux() { issystem "HP-UX"; }
-irix() { issystem "IRIX"; }
linux() { issystem "Linux"; }
mingw32() { issystem "MINGW32"; }
morphos() { issystem "MorphOS"; }
@@ -447,7 +446,6 @@ Audio output:
--disable-jack disable JACK audio output [autodetect]
--enable-openal enable OpenAL audio output [disable]
--disable-nas disable NAS audio output [autodetect]
- --disable-sgiaudio disable SGI audio output [autodetect]
--disable-sunaudio disable Sun audio output [autodetect]
--disable-win32waveout disable Windows waveout audio output [autodetect]
--disable-coreaudio disable CoreAudio audio output [autodetect]
@@ -637,7 +635,6 @@ _mga=auto
_xmga=auto
_vm=auto
_xf86keysym=auto
-_sgiaudio=auto
_sunaudio=auto
_alsa=auto
_fastmemcpy=yes
@@ -992,8 +989,6 @@ for ac_option do
--disable-xf86keysym) _xf86keysym=no ;;
--enable-sunaudio) _sunaudio=yes ;;
--disable-sunaudio) _sunaudio=no ;;
- --enable-sgiaudio) _sgiaudio=yes ;;
- --disable-sgiaudio) _sgiaudio=no ;;
--enable-alsa) _alsa=yes ;;
--disable-alsa) _alsa=no ;;
--enable-tv) _tv=yes ;;
@@ -1254,9 +1249,6 @@ if test -z "$_target" ; then
Haiku)
system_name=BeOS
;;
- IRIX*)
- system_name=IRIX
- ;;
GNU/kFreeBSD)
system_name=FreeBSD
;;
@@ -1365,9 +1357,7 @@ if aix ; then
extra_ldflags="$extra_ldflags -lC"
fi
-if irix ; then
- _ranlib='ar -r'
-elif linux ; then
+if linux ; then
_ranlib='true'
fi
@@ -2169,24 +2159,6 @@ EOF
arch='mips'
iproc='mips'
- if irix ; then
- echocheck "CPU type"
- proc=$(hinv -c processor | grep CPU | cut -d " " -f3)
- case "$(echo $proc)" in
- R3000) _march='-mips1' _mcpu='-mtune=r2000' ;;
- R4000) _march='-mips3' _mcpu='-mtune=r4000' ;;
- R4400) _march='-mips3' _mcpu='-mtune=r4400' ;;
- R4600) _march='-mips3' _mcpu='-mtune=r4600' ;;
- R5000) _march='-mips4' _mcpu='-mtune=r5000' ;;
- R8000|R10000|R12000|R14000|R16000) _march='-mips4' _mcpu='-mtune=r8000' ;;
- esac
- # gcc < 3.x does not support -mtune.
- if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
- _mcpu=''
- fi
- echores "$proc"
- fi
-
test $_fast_clz = "auto" && _fast_clz=yes
;;
@@ -4274,11 +4246,6 @@ fi
echocheck "PNG support"
if test "$_png" = auto ; then
_png=no
- if irix ; then
- # Don't check for -lpng on irix since it has its own libpng
- # incompatible with the GNU libpng
- res_comment="disabled on irix (not GNU libpng)"
- else
cat > $TMPC << EOF
#include <stdio.h>
#include <string.h>
@@ -4289,8 +4256,7 @@ int main(void) {
return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
}
EOF
- cc_check -lpng -lz $_ld_lm && _png=yes
- fi
+ cc_check -lpng -lz $_ld_lm && _png=yes
fi
echores "$_png"
if test "$_png" = yes ; then
@@ -5034,24 +5000,6 @@ echores $_coreaudio
fi #if darwin
-if irix; then
-echocheck "SGI audio"
-if test "$_sgiaudio" = auto ; then
- _sgiaudio=no
- header_check dmedia/audio.h && _sgiaudio=yes
-fi
-if test "$_sgiaudio" = "yes" ; then
- def_sgiaudio='#define CONFIG_SGI_AUDIO 1'
- libs_mplayer="$libs_mplayer -laudio"
- aomodules="sgi $aomodules"
-else
- def_sgiaudio='#undef CONFIG_SGI_AUDIO'
- noaomodules="sgi $noaomodules"
-fi
-echores "$_sgiaudio"
-fi #if irix
-
-
# set default CD/DVD devices
if win32 ; then
default_cdrom_device="D:"
@@ -6472,7 +6420,6 @@ S3FB = $_s3fb
SDL = $_sdl
SPEEX = $_speex
STREAM_CACHE = $_stream_cache
-SGIAUDIO = $_sgiaudio
SUNAUDIO = $_sunaudio
SVGA = $_svga
TDFXFB = $_tdfxfb
@@ -6739,7 +6686,6 @@ $def_ossaudio_devmixer
$def_pulse
$def_portaudio
$def_rsound
-$def_sgiaudio
$def_sunaudio
$def_win32waveout
diff --git a/libao2/ao_sgi.c b/libao2/ao_sgi.c
deleted file mode 100644
index 492c8ff3ba..0000000000
--- a/libao2/ao_sgi.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * SGI/IRIX audio output driver
- *
- * copyright (c) 2001 oliver.schoenbrunner@jku.at
- *
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-#include <dmedia/audio.h>
-
-#include "audio_out.h"
-#include "audio_out_internal.h"
-#include "mp_msg.h"
-#include "libaf/af_format.h"
-
-static const ao_info_t info =
-{
- "sgi audio output",
- "sgi",
- "Oliver Schoenbrunner",
- ""
-};
-
-LIBAO_EXTERN(sgi)
-
-
-static ALconfig ao_config;
-static ALport ao_port;
-static int sample_rate;
-static int queue_size;
-static int bytes_per_frame;
-
-/**
- * \param [in/out] format
- * \param [out] width
- *
- * \return the closest matching SGI AL sample format
- *
- * \note width is set to required per-channel sample width
- * format is updated to match the SGI AL sample format
- */
-static int fmt2sgial(int *format, int *width) {
- int smpfmt = AL_SAMPFMT_TWOSCOMP;
-
- /* SGI AL only supports float and signed integers in native
- * endianness. If this is something else, we must rely on the audio
- * filter to convert it to a compatible format. */
-
- /* 24-bit audio is supported, but only with 32-bit alignment.
- * mplayer's 24-bit format is packed, unfortunately.
- * So we must upgrade 24-bit requests to 32 bits. Then we drop the
- * lowest 8 bits during playback. */
-
- switch(*format) {
- case AF_FORMAT_U8:
- case AF_FORMAT_S8:
- *width = AL_SAMPLE_8;
- *format = AF_FORMAT_S8;
- break;
-
- case AF_FORMAT_U16_LE:
- case AF_FORMAT_U16_BE:
- case AF_FORMAT_S16_LE:
- case AF_FORMAT_S16_BE:
- *width = AL_SAMPLE_16;
- *format = AF_FORMAT_S16_NE;
- break;
-
- case AF_FORMAT_U24_LE:
- case AF_FORMAT_U24_BE:
- case AF_FORMAT_S24_LE:
- case AF_FORMAT_S24_BE:
- case AF_FORMAT_U32_LE:
- case AF_FORMAT_U32_BE:
- case AF_FORMAT_S32_LE:
- case AF_FORMAT_S32_BE:
- *width = AL_SAMPLE_24;
- *format = AF_FORMAT_S32_NE;
- break;
-
- case AF_FORMAT_FLOAT_LE:
- case AF_FORMAT_FLOAT_BE:
- *width = 4;
- *format = AF_FORMAT_FLOAT_NE;
- smpfmt = AL_SAMPFMT_FLOAT;
- break;
-
- default:
- *width = AL_SAMPLE_16;
- *format = AF_FORMAT_S16_NE;
- break;
-
- }
-
- return smpfmt;
-}
-
-// to set/get/query special features/parameters
-static int control(int cmd, void *arg){
-
- mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] control.\n");
-
- return CONTROL_UNKNOWN;
-}
-
-// open & setup audio device
-// return: 1=success 0=fail
-static int init(int rate, int channels, int format, int flags) {
-
- int smpwidth, smpfmt;
- int rv = AL_DEFAULT_OUTPUT;
-
- smpfmt = fmt2sgial(&format, &smpwidth);
-
- mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] init: Samplerate: %iHz Channels: %s Format %s\n", rate, (channels > 1) ? "Stereo" : "Mono", af_fmt2str_short(format));
-
- { /* from /usr/share/src/dmedia/audio/setrate.c */
-
- double frate, realrate;
- ALpv x[2];
-
- if(ao_subdevice) {
- rv = alGetResourceByName(AL_SYSTEM, ao_subdevice, AL_OUTPUT_DEVICE_TYPE);
- if (!rv) {
- mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SGI] play: invalid device.\n");
- return 0;
- }
- }
-
- frate = rate;
-
- x[0].param = AL_RATE;
- x[0].value.ll = alDoubleToFixed(rate);
- x[1].param = AL_MASTER_CLOCK;
- x[1].value.i = AL_CRYSTAL_MCLK_TYPE;
-
- if (alSetParams(rv,x, 2)<0) {
- mp_tmsg(MSGT_AO, MSGL_WARN, "[AO SGI] init: setparams failed: %s\nCould not set desired samplerate.\n", alGetErrorString(oserror()));
- }
-
- if (x[0].sizeOut < 0) {
- mp_tmsg(MSGT_AO, MSGL_WARN, "[AO SGI] init: AL_RATE was not accepted on the given resource.\n");
- }
-
- if (alGetParams(rv,x, 1)<0) {
- mp_tmsg(MSGT_AO, MSGL_WARN, "[AO SGI] init: getparams failed: %s\n", alGetErrorString(oserror()));
- }
-
- realrate = alFixedToDouble(x[0].value.ll);
- if (frate != realrate) {
- mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] init: samplerate is now %f (desired rate is %f)\n", realrate, frate);
- }
- sample_rate = (int)realrate;
- }
-
- bytes_per_frame = channels * smpwidth;
-
- ao_data.samplerate = sample_rate;
- ao_data.channels = channels;
- ao_data.format = format;
- ao_data.bps = sample_rate * bytes_per_frame;
- ao_data.buffersize=131072;
- ao_data.outburst = ao_data.buffersize/16;
-
- ao_config = alNewConfig();
-
- if (!ao_config) {
- mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SGI] init: %s\n", alGetErrorString(oserror()));
- return 0;
- }
-
- if(alSetChannels(ao_config, channels) < 0 ||
- alSetWidth(ao_config, smpwidth) < 0 ||
- alSetSampFmt(ao_config, smpfmt) < 0 ||
- alSetQueueSize(ao_config, sample_rate) < 0 ||
- alSetDevice(ao_config, rv) < 0) {
- mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SGI] init: %s\n", alGetErrorString(oserror()));
- return 0;
- }
-
- ao_port = alOpenPort("mplayer", "w", ao_config);
-
- if (!ao_port) {
- mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SGI] init: Unable to open audio channel: %s\n", alGetErrorString(oserror()));
- return 0;
- }
-
- // printf("ao_sgi, init: port %d config %d\n", ao_port, ao_config);
- queue_size = alGetQueueSize(ao_config);
- return 1;
-
-}
-
-// close audio device
-static void uninit(int immed) {
-
- /* TODO: samplerate should be set back to the value before mplayer was started! */
-
- mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] uninit: ...\n");
-
- if (ao_config) {
- alFreeConfig(ao_config);
- ao_config = NULL;
- }
-
- if (ao_port) {
- if (!immed)
- while(alGetFilled(ao_port) > 0) sginap(1);
- alClosePort(ao_port);
- ao_port = NULL;
- }
-
-}
-
-// stop playing and empty buffers (for seeking/pause)
-static void reset(void) {
-
- mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] reset: ...\n");
-
- alDiscardFrames(ao_port, queue_size);
-}
-
-// stop playing, keep buffers (for pause)
-static void audio_pause(void) {
-
- mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] audio_pause: ...\n");
-
-}
-
-// resume playing, after audio_pause()
-static void audio_resume(void) {
-
- mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] audio_resume: ...\n");
-
-}
-
-// return: how many bytes can be played without blocking
-static int get_space(void) {
-
- // printf("ao_sgi, get_space: (ao_outburst %d)\n", ao_data.outburst);
- // printf("ao_sgi, get_space: alGetFillable [%d] \n", alGetFillable(ao_port));
-
- return alGetFillable(ao_port) * bytes_per_frame;
-
-}
-
-
-// plays 'len' bytes of 'data'
-// it should round it down to outburst*n
-// return: number of bytes played
-static int play(void* data, int len, int flags) {
-
- /* Always process data in quadword-aligned chunks (64-bits). */
- const int plen = len / (sizeof(uint64_t) * bytes_per_frame);
- const int framecount = plen * sizeof(uint64_t);
-
- // printf("ao_sgi, play: len %d flags %d (%d %d)\n", len, flags, ao_port, ao_config);
- // printf("channels %d\n", ao_data.channels);
-
- if(ao_data.format == AF_FORMAT_S32_NE) {
- /* The zen of this is explained in fmt2sgial() */
- int32_t *smpls = data;
- const int32_t *smple = smpls + (framecount * ao_data.channels);
- while(smpls < smple)
- *smpls++ >>= 8;
- }
-
- alWriteFrames(ao_port, data, framecount);
-
- return framecount * bytes_per_frame;
-
-}
-
-// return: delay in seconds between first and last sample in buffer
-static float get_delay(void){
-
- // printf("ao_sgi, get_delay: (ao_buffersize %d)\n", ao_buffersize);
-
- // return (float)queue_size/((float)sample_rate);
- const int outstanding = alGetFilled(ao_port);
- return (float)((outstanding < 0) ? queue_size : outstanding) /
- ((float)sample_rate);
-}
diff --git a/libao2/audio_out.c b/libao2/audio_out.c
index d9a81b93b6..5dcb10c027 100644
--- a/libao2/audio_out.c
+++ b/libao2/audio_out.c
@@ -86,9 +86,6 @@ static const struct ao_driver * const audio_out_drivers[] = {
#ifdef CONFIG_PORTAUDIO
&audio_out_portaudio,
#endif
-#ifdef CONFIG_SGI_AUDIO
- &audio_out_sgi,
-#endif
#ifdef CONFIG_SUN_AUDIO
&audio_out_sun,
#endif