summaryrefslogtreecommitdiffstats
path: root/libao2/ao_ivtv.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-07-28 20:20:17 +0200
committerwm4 <wm4@mplayer2.org>2012-07-28 20:44:59 +0200
commit16145ff43fd92947cb8fe301ebce46e7be52a9fb (patch)
tree5a5ade633d922f416d3b1c7c68e8aff878da9a8f /libao2/ao_ivtv.c
parentf03eed6469e34a5bff975ed43292016a621296ea (diff)
downloadmpv-16145ff43fd92947cb8fe301ebce46e7be52a9fb.tar.bz2
mpv-16145ff43fd92947cb8fe301ebce46e7be52a9fb.tar.xz
libvo, libao: remove useless video and audio output drivers
Some of these have only limited use, and some of these have no use at all. Remove them. They make maintainance harder and nobody needs them. It's possible that many of the removed drivers were very useful a dozen of years ago, but now it's 2012. Note that some of these could be added back, in case they were more useful than I thought. But right now, they are just a burden. Reason for removal for each module: vo_3dfx, vo_dfbmga, vo_dxr3, vo_ivtv, vo_mga, vo_s3fb, vo_tdfxfb, vo_xmga, vo_tdfx_vid: All of these are for very specific and outdated hardware. Some of them require non-standard kernel drivers or do direct HW access. vo_dga: the most crappy and ancient way to get fast output on X. vo_aa: there's vo_caca for the same purpose. vo_ggi: this never lived, and is entirely useless. vo_mpegpes: for DVB cards, I can't test this and it's crappy. vo_fbdev, vo_fbdev2: there's vo_directfb2 vo_bl: what is this even? But it's neither important, nor alive. vo_svga, vo_vesa: you want to use this? You can't be serious. vo_wii: I can't test this, and who the hell uses this? vo_xvr100: some Sun thing. vo_xover: only useful in connection with xvr100. ao_nas: still alive, but I doubt it has any meaning today. ao_sun: Sun. ao_win32: use ao_dsound or ao_portaudio instead. ao_ivtv: removed along vo_ivtv. Also get rid of anything SDL related. SDL 1.x is total crap for video output, and will be replaced with SDL 2.x soon (perhaps), so if you want to use SDL, write output drivers for SDL 2.x. Additionally, I accidentally damaged Sun support, which made me completely remove Sun/Solaris support. Nobody cares about this anyway. Some left overs from previous commits removing modules were cleaned up.
Diffstat (limited to 'libao2/ao_ivtv.c')
-rw-r--r--libao2/ao_ivtv.c161
1 files changed, 0 insertions, 161 deletions
diff --git a/libao2/ao_ivtv.c b/libao2/ao_ivtv.c
deleted file mode 100644
index e05537cbd8..0000000000
--- a/libao2/ao_ivtv.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * audio output for WinTV PVR-150/250/350 (a.k.a IVTV) cards
- * through Connexant hardware MPEG decoder
- * See http://ivtvdriver.org/index.php/Main_Page for more details on the
- * cards supported by the ivtv driver.
- *
- * WARNING: You need to force -ac hwmpa for audio output to work.
- *
- * Copyright (C) 2006 Benjamin Zores
- *
- * 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 <inttypes.h>
-
-#include "config.h"
-
-#include "mp_msg.h"
-
-#include "audio_out.h"
-#include "audio_out_internal.h"
-#include "libaf/af_format.h"
-#include "libmpdemux/mpeg_packetizer.h"
-#include "libvo/vo_ivtv.h"
-
-#define MPEG_AUDIO_ID 0x1C0
-
-static int freq = 0;
-
-static const ao_info_t info =
-{
- "IVTV MPEG Audio Decoder output",
- "ivtv",
- "Benjamin Zores",
- ""
-};
-
-LIBAO_EXTERN(ivtv)
-
-/* to set/get/query special features/parameters */
-static int
-control (int cmd,void *arg)
-{
- return CONTROL_UNKNOWN;
-}
-
-/* open & setup audio device */
-static int
-init (int rate, int channels, int format, int flags)
-{
- if (ivtv_fd < 0)
- return 0;
-
- if (format != AF_FORMAT_MPEG2)
- {
- mp_msg (MSGT_AO, MSGL_FATAL,
- "AO: [ivtv] can only handle MPEG audio streams.\n");
- return 0;
- }
-
- ao_data.outburst = 2048;
- ao_data.samplerate = rate;
- ao_data.channels = channels;
- ao_data.format = AF_FORMAT_MPEG2;
- ao_data.buffersize = 2048;
- ao_data.bps = rate * 2 * 2;
- ao_data.brokenpts = 0;
- freq = rate;
-
- /* check for supported audio rate */
- if (rate != 32000 || rate != 41000 || rate != 48000)
- {
- mp_tmsg (MSGT_AO, MSGL_ERR, "[AO MPEGPES] %d Hz not supported, try to resample.\n", rate);
- rate = 48000;
- }
-
- return 1;
-}
-
-/* close audio device */
-static void
-uninit (int immed)
-{
- /* nothing to do */
-}
-
-/* stop playing and empty buffers (for seeking/pause) */
-static void
-reset (void)
-{
- /* nothing to do */
-}
-
-/* stop playing, keep buffers (for pause) */
-static void
-audio_pause (void)
-{
- reset ();
-}
-
-/* resume playing, after audio_pause() */
-static void
-audio_resume (void)
-{
- /* nothing to do */
-}
-
-/* how many bytes can be played without blocking */
-static int
-get_space (void)
-{
- extern int vo_pts;
- float x;
- int y;
-
- x = (float) (vo_pts - ao_data.brokenpts) / 90000.0;
- if (x <= 0)
- return 0;
-
- y = freq * 4 * x;
- y /= ao_data.outburst;
- y *= ao_data.outburst;
-
- if (y > 32000)
- y = 32000;
-
- return y;
-}
-
-/* number of bytes played */
-static int
-play (void *data, int len, int flags)
-{
- if (ao_data.format != AF_FORMAT_MPEG2)
- return 0;
-
- send_mpeg_pes_packet (data, len, MPEG_AUDIO_ID, ao_data.brokenpts, 2, ivtv_write);
-
- return len;
-}
-
-/* delay in seconds between first and last sample in buffer */
-static float
-get_delay (void)
-{
- return 0.0;
-}