diff options
author | wm4 <wm4@nowhere> | 2014-06-09 23:54:45 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-11 00:34:42 +0200 |
commit | 383cf207859485c4516d29053dafab0bb2d8c347 (patch) | |
tree | 5eb5775fd1b3cc8b94c679f55defeeea9fb46746 /stream/stream_tv.c | |
parent | 98c0930f9b69122996cc725a08336ee6bd9abc7e (diff) | |
download | mpv-383cf207859485c4516d29053dafab0bb2d8c347.tar.bz2 mpv-383cf207859485c4516d29053dafab0bb2d8c347.tar.xz |
tv: remove global option variables
Pretty much nothing changes, but using -tv-scan with suboptions doesn't
work anymore (instead of "-tv-scan x" it's "-tv scan-x" now). Flat
options ("-tv-scan-x") stay compatible.
Diffstat (limited to 'stream/stream_tv.c')
-rw-r--r-- | stream/stream_tv.c | 48 |
1 files changed, 4 insertions, 44 deletions
diff --git a/stream/stream_tv.c b/stream/stream_tv.c index e54fe4bded..3ca4973d1e 100644 --- a/stream/stream_tv.c +++ b/stream/stream_tv.c @@ -32,49 +32,7 @@ #include <stdio.h> -tv_param_t stream_tv_defaults = { - NULL, //freq - NULL, //channel - "europe-east", //chanlist - "pal", //norm - 0, //automute - -1, //normid - NULL, //device - NULL, //driver - -1, //width - -1, //height - 0, //input, used in v4l and bttv - -1, //outfmt - -1.0, //fps - NULL, //channels - 0, //noaudio; - 1, //immediate; - 44100, //audiorate; - 0, //audio_id - -1, //amode - -1, //volume - -1, //bass - -1, //treble - -1, //balance - -1, //forcechan - 0, //force_audio - -1, //buffer_size - 0, //mjpeg - 2, //decimation - 90, //quality - 0, //alsa - NULL, //adevice - 0, //brightness - 0, //contrast - 0, //hue - 0, //saturation - -1, //gain - 0, //scan_autostart - 50, //scan_threshold - 0.5, //scan_period -}; - -#define OPT_BASE_STRUCT tv_param_t +#define OPT_BASE_STRUCT struct tv_stream_params static const m_option_t stream_opts_fields[] = { OPT_STRING("channel", channel, 0), OPT_INT("input", input, 0), @@ -102,7 +60,9 @@ const stream_info_t stream_info_tv = { .open = tv_stream_open, .protocols = (const char*[]){ "tv", NULL }, .priv_size = sizeof(tv_param_t), - .priv_defaults = &stream_tv_defaults, + .priv_defaults = &(const struct tv_stream_params){ + .input = -1, + }, .options = stream_opts_fields, .url_options = (const char*[]){ "hostname=channel", |