summaryrefslogtreecommitdiffstats
path: root/stream/audio_in.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-09-13 17:16:18 +0200
committerwm4 <wm4@nowhere>2019-09-13 17:32:19 +0200
commitb30e85508a305d668db8419556d295a65ab08707 (patch)
treefa48444a183c97fd5081aa0206c5adece43eaf32 /stream/audio_in.h
parent162e0f5ad92116d1a4fb740d087da2a152686b73 (diff)
downloadmpv-b30e85508a305d668db8419556d295a65ab08707.tar.bz2
mpv-b30e85508a305d668db8419556d295a65ab08707.tar.xz
Remove classic Linux analog TV support, and DVB runtime controls
Linux analog TV support (via tv://) was excessively complex, and whenever I attempted to use it (cameras or loopback devices), it didn't work well, or would have required some major work to update it. It's very much stuck in the analog past (my favorite are the frequency tables in frequencies.c for analog TV channels which don't exist anymore). Especially cameras and such work fine with libavdevice and better than tv://, for example: mpv av://v4l2:/dev/video0 (adding --profile=low-latency --untimed even makes it mostly realtime) Adding a new input layer that targets such "modern" uses would be acceptable, if anyone is interested in it. The old TV code is just too focused on actual analog TV. DVB is rather obscure, but has an active maintainer, so don't remove it. However, the demux/stream ctrl layer must go, so remove controls for channel switching. Most of these could be reimplemented by using the normal method for option runtime changes.
Diffstat (limited to 'stream/audio_in.h')
-rw-r--r--stream/audio_in.h118
1 files changed, 0 insertions, 118 deletions
diff --git a/stream/audio_in.h b/stream/audio_in.h
deleted file mode 100644
index 6b714f7306..0000000000
--- a/stream/audio_in.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * This file is part of mpv.
- *
- * mpv 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.
- *
- * mpv 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 mpv. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef MPLAYER_AUDIO_IN_H
-#define MPLAYER_AUDIO_IN_H
-
-#define AUDIO_IN_ALSA 1
-#define AUDIO_IN_OSS 2
-#define AUDIO_IN_SNDIO 3
-
-#include "config.h"
-
-#if !HAVE_GPL
-#error GPL only
-#endif
-
-struct mp_log;
-
-#if HAVE_ALSA
-#include <alsa/asoundlib.h>
-
-typedef struct {
- char *device;
-
- snd_pcm_t *handle;
- snd_output_t *log;
- int buffer_time, period_time, chunk_size;
- size_t bits_per_sample, bits_per_frame;
-} ai_alsa_t;
-#endif
-
-#if HAVE_OSS_AUDIO
-typedef struct {
- char *device;
-
- int audio_fd;
-} ai_oss_t;
-#endif
-
-#if HAVE_SNDIO
-#include <sndio.h>
-
-typedef struct {
- char *device;
-
- struct sio_hdl *hdl;
-} ai_sndio_t;
-#endif
-
-typedef struct
-{
- struct mp_log *log;
- int type;
- int setup;
-
- /* requested values */
- int req_channels;
- int req_samplerate;
-
- /* real values read-only */
- int channels;
- int samplerate;
- int blocksize;
- int bytes_per_sample;
- int samplesize;
-
-#if HAVE_ALSA
- ai_alsa_t alsa;
-#endif
-#if HAVE_OSS_AUDIO
- ai_oss_t oss;
-#endif
-#if HAVE_SNDIO
- ai_sndio_t sndio;
-#endif
-} audio_in_t;
-
-int audio_in_init(audio_in_t *ai, struct mp_log *log, int type);
-int audio_in_setup(audio_in_t *ai);
-int audio_in_set_device(audio_in_t *ai, char *device);
-int audio_in_set_samplerate(audio_in_t *ai, int rate);
-int audio_in_set_channels(audio_in_t *ai, int channels);
-int audio_in_uninit(audio_in_t *ai);
-int audio_in_start_capture(audio_in_t *ai);
-int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer);
-
-#if HAVE_ALSA
-int ai_alsa_setup(audio_in_t *ai);
-int ai_alsa_init(audio_in_t *ai);
-int ai_alsa_xrun(audio_in_t *ai);
-#endif
-
-#if HAVE_OSS_AUDIO
-int ai_oss_set_samplerate(audio_in_t *ai);
-int ai_oss_set_channels(audio_in_t *ai);
-int ai_oss_init(audio_in_t *ai);
-#endif
-
-#if HAVE_SNDIO
-int ai_sndio_setup(audio_in_t *ai);
-int ai_sndio_init(audio_in_t *ai);
-#endif
-
-#endif /* MPLAYER_AUDIO_IN_H */