diff options
author | Dudemanguy <random342@airmail.cc> | 2023-09-19 15:22:13 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-22 14:20:38 +0000 |
commit | a703dc10c88f42cc4b4033721b03d2ac63800f39 (patch) | |
tree | 6169d41ff5022306b1004ea5573884894e44a695 | |
parent | 84d6044d2bd4b0a2b6bc8d6f3deaf37747619284 (diff) | |
download | mpv-a703dc10c88f42cc4b4033721b03d2ac63800f39.tar.bz2 mpv-a703dc10c88f42cc4b4033721b03d2ac63800f39.tar.xz |
options: move some demux-specific opts to demux opts
These options are only ever accessed by the demuxer and have no need to
be in MPOpts. Move them to demux.c instead.
-rw-r--r-- | demux/demux.c | 8 | ||||
-rw-r--r-- | options/options.c | 8 | ||||
-rw-r--r-- | options/options.h | 5 |
3 files changed, 8 insertions, 13 deletions
diff --git a/demux/demux.c b/demux/demux.c index 2bf04a480b..2bc53fee42 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -96,6 +96,9 @@ struct demux_opts { double min_secs_cache; bool access_references; int seekable_cache; + int index_mode; + double mf_fps; + char *mf_type; bool create_ccs; char *record_file; int video_back_preroll; @@ -126,6 +129,9 @@ const struct m_sub_options demux_conf = { {"access-references", OPT_BOOL(access_references)}, {"demuxer-seekable-cache", OPT_CHOICE(seekable_cache, {"auto", -1}, {"no", 0}, {"yes", 1})}, + {"index", OPT_CHOICE(index_mode, {"default", 1}, {"recreate", 0})}, + {"mf-fps", OPT_DOUBLE(mf_fps)}, + {"mf-type", OPT_STRING(mf_type)}, {"sub-create-cc-track", OPT_BOOL(create_ccs)}, {"stream-record", OPT_STRING(record_file)}, {"video-backward-overlap", OPT_CHOICE(video_back_preroll, {"auto", -1}), @@ -150,6 +156,8 @@ const struct m_sub_options demux_conf = { .min_secs = 1.0, .min_secs_cache = 1000.0 * 60 * 60, .seekable_cache = -1, + .index_mode = 1, + .mf_fps = 1.0, .access_references = true, .video_back_preroll = -1, .audio_back_preroll = -1, diff --git a/options/options.c b/options/options.c index 40f1f6ff83..5e893c4b86 100644 --- a/options/options.c +++ b/options/options.c @@ -516,8 +516,6 @@ static const m_option_t mp_opts[] = { {"image-display-duration", OPT_DOUBLE(image_display_duration), M_RANGE(0, INFINITY)}, - {"index", OPT_CHOICE(index_mode, {"default", 1}, {"recreate", 0})}, - // select audio/video/subtitle stream // keep in sync with num_ptracks[] and MAX_PTRACKS {"aid", OPT_TRACKCHOICE(stream_id[0][STREAM_AUDIO])}, @@ -564,8 +562,6 @@ static const m_option_t mp_opts[] = { {"cache-pause-initial", OPT_BOOL(cache_pause_initial)}, {"cache-pause-wait", OPT_FLOAT(cache_pause_wait), M_RANGE(0, DBL_MAX)}, - {"mf-fps", OPT_DOUBLE(mf_fps)}, - {"mf-type", OPT_STRING(mf_type)}, #if HAVE_DVBIN {"dvbin", OPT_SUBSTRUCT(stream_dvb_opts, stream_dvb_conf)}, #endif @@ -1001,10 +997,6 @@ static const struct MPOpts mp_default_opts = { .auto_safe = 1, }, - .index_mode = 1, - - .mf_fps = 1.0, - .display_tags = (char *[]){ "Artist", "Album", "Album_Artist", "Comment", "Composer", "Date", "Description", "Genre", "Performer", "Rating", diff --git a/options/options.h b/options/options.h index 339acda38c..78cbaf92e4 100644 --- a/options/options.h +++ b/options/options.h @@ -295,8 +295,6 @@ typedef struct MPOpts { char *screenshot_directory; bool screenshot_sw; - int index_mode; - struct m_channels audio_output_channels; int audio_output_format; int force_srate; @@ -330,9 +328,6 @@ typedef struct MPOpts { char *cdrom_device; char *bluray_device; - double mf_fps; - char *mf_type; - struct demux_rawaudio_opts *demux_rawaudio; struct demux_rawvideo_opts *demux_rawvideo; struct demux_playlist_opts *demux_playlist; |