summaryrefslogtreecommitdiffstats
path: root/stream/tvi_def.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/tvi_def.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/tvi_def.h')
-rw-r--r--stream/tvi_def.h93
1 files changed, 0 insertions, 93 deletions
diff --git a/stream/tvi_def.h b/stream/tvi_def.h
deleted file mode 100644
index 0794b7eb91..0000000000
--- a/stream/tvi_def.h
+++ /dev/null
@@ -1,93 +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_TVI_DEF_H
-#define MPLAYER_TVI_DEF_H
-
-#include <stdlib.h> /* malloc */
-#include <string.h> /* memset */
-#include "tv.h"
-
-static int init(priv_t *priv);
-static int uninit(priv_t *priv);
-static int do_control(priv_t *priv, int cmd, void *arg);
-static int start(priv_t *priv);
-static double grab_video_frame(priv_t *priv, char *buffer, int len);
-static int get_video_framesize(priv_t *priv);
-static double grab_audio_frame(priv_t *priv, char *buffer, int len);
-static int get_audio_framesize(priv_t *priv);
-
-static const tvi_functions_t functions =
-{
- init,
- uninit,
- do_control,
- start,
- grab_video_frame,
- get_video_framesize,
- grab_audio_frame,
- get_audio_framesize
-};
-
-/**
- Fills video frame in given buffer with blue color for yv12,i420,uyvy,yuy2.
- Other formats will be filled with 0xC0
-*/
-static inline void fill_blank_frame(char* buffer,int len,int fmt){
- int i;
- // RGB(0,0,255) <-> YVU(41,110,240)
-
- switch(fmt){
- case MP_FOURCC_YV12:
- memset(buffer, 41,4*len/6); //Y
- memset(buffer+4*len/6, 110,len/6);//V
- memset(buffer+5*len/6, 240,len/6);//U
- break;
- case MP_FOURCC_I420:
- memset(buffer, 41,4*len/6); //Y
- memset(buffer+4*len/6, 240,len/6);//U
- memset(buffer+5*len/6, 110,len/6);//V
- break;
- case MP_FOURCC_UYVY:
- for(i=0;i<len;i+=4){
- buffer[i]=0xFF;
- buffer[i+1]=0;
- buffer[i+2]=0;
- buffer[i+3]=0;
- }
- break;
- case MP_FOURCC_YUY2:
- for(i=0;i<len;i+=4){
- buffer[i]=0;
- buffer[i+1]=0xFF;
- buffer[i+2]=0;
- buffer[i+3]=0;
- }
- break;
- case MP_FOURCC_MJPEG:
- case MP_FOURCC_JPEG:
- /*
- This is compressed format. I don't know yet how to fill such frame with blue color.
- Keeping frame unchanged.
- */
- break;
- default:
- memset(buffer,0xC0,len);
- }
-}
-
-#endif /* MPLAYER_TVI_DEF_H */