demux_mkv: move global options to the demuxer

The options don't change, but they're now declared and used privately by
demux_mkv.c. This also brings with it a minor refactor of the subpreroll
seek handling - merge the code from playloop.c into demux_mkv.c. The
change in demux.c is pretty much equivalent as well.
This commit is contained in:
wm4
2015-04-23 19:21:17 +02:00
parent 457e2f7e02
commit e9ca0b1522
6 changed files with 42 additions and 21 deletions

View File

@@ -67,6 +67,7 @@ extern const struct m_sub_options sws_conf;
extern const struct m_sub_options demux_rawaudio_conf;
extern const struct m_sub_options demux_rawvideo_conf;
extern const struct m_sub_options demux_lavf_conf;
extern const struct m_sub_options demux_mkv_conf;
extern const struct m_sub_options vd_lavc_conf;
extern const struct m_sub_options ad_lavc_conf;
extern const struct m_sub_options input_config;
@@ -311,11 +312,7 @@ const m_option_t mp_opts[] = {
OPT_SUBSTRUCT("demuxer-lavf", demux_lavf, demux_lavf_conf, 0),
OPT_SUBSTRUCT("demuxer-rawaudio", demux_rawaudio, demux_rawaudio_conf, 0),
OPT_SUBSTRUCT("demuxer-rawvideo", demux_rawvideo, demux_rawvideo_conf, 0),
OPT_FLAG("demuxer-mkv-subtitle-preroll", mkv_subtitle_preroll, 0),
OPT_DOUBLE("demuxer-mkv-subtitle-preroll-secs", mkv_subtitle_preroll_secs,
M_OPT_MIN, .min = 0),
OPT_FLAG("demuxer-mkv-probe-video-duration", mkv_probe_duration, 0),
OPT_SUBSTRUCT("demuxer-mkv", demux_mkv, demux_mkv_conf, 0),
// ------------------------- subtitles options --------------------
@@ -764,7 +761,6 @@ const struct MPOpts mp_default_opts = {
.use_embedded_fonts = 1,
.sub_fix_timing = 1,
.sub_cp = "auto",
.mkv_subtitle_preroll_secs = 1.0,
.screenshot_template = "shot%n",
.hwdec_codecs = "h264,vc1,wmv3",

View File

@@ -199,9 +199,6 @@ typedef struct MPOpts {
double demuxer_min_secs;
char *audio_demuxer_name;
char *sub_demuxer_name;
int mkv_subtitle_preroll;
double mkv_subtitle_preroll_secs;
int mkv_probe_duration;
double demuxer_min_secs_cache;
int cache_pausing;
@@ -294,6 +291,7 @@ typedef struct MPOpts {
struct demux_rawaudio_opts *demux_rawaudio;
struct demux_rawvideo_opts *demux_rawvideo;
struct demux_lavf_opts *demux_lavf;
struct demux_mkv_opts *demux_mkv;
struct vd_lavc_params *vd_lavc_params;
struct ad_lavc_params *ad_lavc_params;