1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-14 02:51:26 +00:00

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.
This commit is contained in:
Dudemanguy 2023-09-19 15:22:13 -05:00
parent 84d6044d2b
commit a703dc10c8
3 changed files with 8 additions and 13 deletions

View File

@ -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,

View File

@ -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",

View File

@ -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;