mirror of https://github.com/mpv-player/mpv
options: remove a few options marked with .deprecation_message
A bit different from the OPT_REPLACED/OPT_REMOVED ones in that the options still possibly do something but they have a deprecation message. Most of these are old and have no real usage. The only potentially controversial ones are the removal of --oaffset and --ovoffset which were deprecated years ago and seemingly have no real replacement. There's a cryptic message about --audio-delay but who knows. The less encoding mode code we have, the better so just chuck it.
This commit is contained in:
parent
4b2276b730
commit
36ea5d7b5c
|
@ -81,6 +81,8 @@ Interface changes
|
|||
instead)
|
||||
- writing the current value to playlist-pos will no longer restart playback (use
|
||||
`playlist-play-index` instead)
|
||||
- remove deprecated `--oaoffset`, `--oafirst`, `--ovoffset`, `--ovfirst`,
|
||||
`--demuxer-force-retry-on-eof`, `--fit-border` options
|
||||
--- mpv 0.36.0 ---
|
||||
- add `--target-contrast`
|
||||
- Target luminance value is now also applied when ICC profile is used.
|
||||
|
|
|
@ -28,10 +28,6 @@ You can encode files from one format/codec to another using this facility.
|
|||
Specifies the output audio codec. See ``--oac=help`` for a full list of
|
||||
supported codecs.
|
||||
|
||||
``--oaoffset=<value>``
|
||||
Shifts audio data by the given time (in seconds) by adding/removing
|
||||
samples at the start. Deprecated.
|
||||
|
||||
``--oacopts=<options>``
|
||||
Specifies the output audio codec options for libavcodec.
|
||||
See ``--oacopts=help`` for a full list of supported options.
|
||||
|
@ -50,18 +46,10 @@ You can encode files from one format/codec to another using this facility.
|
|||
``--oacopts=""``
|
||||
Completely empties the options list.
|
||||
|
||||
``--oafirst``
|
||||
Force the audio stream to become the first stream in the output.
|
||||
By default, the order is unspecified. Deprecated.
|
||||
|
||||
``--ovc=<codec>``
|
||||
Specifies the output video codec. See ``--ovc=help`` for a full list of
|
||||
supported codecs.
|
||||
|
||||
``--ovoffset=<value>``
|
||||
Shifts video data by the given time (in seconds) by shifting the pts
|
||||
values. Deprecated.
|
||||
|
||||
``--ovcopts=<options>``
|
||||
Specifies the output video codec options for libavcodec.
|
||||
See --ovcopts=help for a full list of supported options.
|
||||
|
@ -83,10 +71,6 @@ You can encode files from one format/codec to another using this facility.
|
|||
``--ovcopts=""``
|
||||
Completely empties the options list.
|
||||
|
||||
``--ovfirst``
|
||||
Force the video stream to become the first stream in the output.
|
||||
By default, the order is unspecified. Deprecated.
|
||||
|
||||
``--orawts``
|
||||
Copies input pts to the output video (not supported by some output
|
||||
container formats, e.g. AVI). In this mode, discontinuities are not fixed
|
||||
|
|
|
@ -3834,16 +3834,6 @@ Demuxer
|
|||
``--cache-secs`` is used (i.e. when the stream appears to be a network
|
||||
stream or the stream cache is enabled).
|
||||
|
||||
``--demuxer-force-retry-on-eof=<yes|no>``
|
||||
Whether to keep retrying making the demuxer thread read more packets each
|
||||
time the decoder dequeues a packet, even if the end of the file was reached
|
||||
(default: no). This does not really make sense, but was the default behavior
|
||||
in mpv 0.32.0 and earlier. This option will be silently removed after a
|
||||
while, and exists only to restore the old behavior for testing, in case this
|
||||
was actually needed somewhere. This does _not_ help with files that are
|
||||
being appended to (in these cases use ``appending://``, or disable the
|
||||
cache).
|
||||
|
||||
``--demuxer-thread=<yes|no>``
|
||||
Run the demuxer in a separate thread, and let it prefetch a certain amount
|
||||
of packets (default: yes). Having this enabled leads to smoother playback,
|
||||
|
|
|
@ -280,9 +280,6 @@ static bool audio_write(struct ao *ao, void **data, int samples)
|
|||
outpts = pts + ectx->discontinuity_pts_offset;
|
||||
}
|
||||
|
||||
// Shift pts by the pts offset first.
|
||||
outpts += encoder_get_offset(ac->enc);
|
||||
|
||||
// Calculate expected pts of next audio frame (input side).
|
||||
ac->expected_next_pts = pts + mp_aframe_get_size(af) / (double) ao->samplerate;
|
||||
|
||||
|
|
|
@ -38,11 +38,7 @@ struct encode_opts {
|
|||
char **vopts;
|
||||
char *acodec;
|
||||
char **aopts;
|
||||
float voffset;
|
||||
float aoffset;
|
||||
bool rawts;
|
||||
bool video_first;
|
||||
bool audio_first;
|
||||
bool copy_metadata;
|
||||
char **set_metadata;
|
||||
char **remove_metadata;
|
||||
|
|
|
@ -83,15 +83,7 @@ const struct m_sub_options encode_config = {
|
|||
{"ovcopts", OPT_KEYVALUELIST(vopts), .flags = M_OPT_HAVE_HELP},
|
||||
{"oac", OPT_STRING(acodec)},
|
||||
{"oacopts", OPT_KEYVALUELIST(aopts), .flags = M_OPT_HAVE_HELP},
|
||||
{"ovoffset", OPT_FLOAT(voffset), M_RANGE(-1000000.0, 1000000.0),
|
||||
.deprecation_message = "--audio-delay (once unbroken)"},
|
||||
{"oaoffset", OPT_FLOAT(aoffset), M_RANGE(-1000000.0, 1000000.0),
|
||||
.deprecation_message = "--audio-delay (once unbroken)"},
|
||||
{"orawts", OPT_BOOL(rawts)},
|
||||
{"ovfirst", OPT_BOOL(video_first),
|
||||
.deprecation_message = "no replacement"},
|
||||
{"oafirst", OPT_BOOL(audio_first),
|
||||
.deprecation_message = "no replacement"},
|
||||
{"ocopy-metadata", OPT_BOOL(copy_metadata)},
|
||||
{"oset-metadata", OPT_KEYVALUELIST(set_metadata)},
|
||||
{"oremove-metadata", OPT_STRINGLIST(remove_metadata)},
|
||||
|
@ -954,13 +946,4 @@ fail:
|
|||
return false;
|
||||
}
|
||||
|
||||
double encoder_get_offset(struct encoder_context *p)
|
||||
{
|
||||
switch (p->encoder->codec_type) {
|
||||
case AVMEDIA_TYPE_VIDEO: return p->options->voffset;
|
||||
case AVMEDIA_TYPE_AUDIO: return p->options->aoffset;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// vim: ts=4 sw=4 et
|
||||
|
|
|
@ -111,6 +111,4 @@ bool encoder_encode(struct encoder_context *p, AVFrame *frame);
|
|||
// Caller needs to acquire encode_lavc_context.lock (or call it from on_ready).
|
||||
AVRational encoder_get_mux_timebase_unlocked(struct encoder_context *p);
|
||||
|
||||
double encoder_get_offset(struct encoder_context *p);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -103,7 +103,6 @@ struct demux_opts {
|
|||
int back_batch[STREAM_TYPE_COUNT];
|
||||
double back_seek_size;
|
||||
char *meta_cp;
|
||||
bool force_retry_eof;
|
||||
};
|
||||
|
||||
#define OPT_BASE_STRUCT struct demux_opts
|
||||
|
@ -140,8 +139,6 @@ const struct m_sub_options demux_conf = {
|
|||
{"demuxer-backward-playback-step", OPT_DOUBLE(back_seek_size),
|
||||
M_RANGE(0, DBL_MAX)},
|
||||
{"metadata-codepage", OPT_STRING(meta_cp)},
|
||||
{"demuxer-force-retry-on-eof", OPT_BOOL(force_retry_eof),
|
||||
.deprecation_message = "temporary debug option, no replacement"},
|
||||
{0}
|
||||
},
|
||||
.size = sizeof(struct demux_opts),
|
||||
|
@ -2663,7 +2660,7 @@ static int dequeue_packet(struct demux_stream *ds, double min_pts,
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (!in->reading && (!in->eof || in->opts->force_retry_eof)) {
|
||||
if (!in->reading && !in->eof) {
|
||||
in->reading = true; // enable demuxer thread prefetching
|
||||
pthread_cond_signal(&in->wakeup);
|
||||
}
|
||||
|
|
|
@ -114,8 +114,6 @@ static const m_option_t mp_vo_opt_list[] = {
|
|||
{"ontop-level", OPT_CHOICE(ontop_level, {"window", -1}, {"system", -2},
|
||||
{"desktop", -3}), M_RANGE(0, INT_MAX)},
|
||||
{"border", OPT_BOOL(border)},
|
||||
{"fit-border", OPT_BOOL(fit_border),
|
||||
.deprecation_message = "the option is ignored and no longer needed"},
|
||||
{"on-all-workspaces", OPT_BOOL(all_workspaces)},
|
||||
{"geometry", OPT_GEOMETRY(geometry)},
|
||||
{"autofit", OPT_SIZE_BOX(autofit)},
|
||||
|
@ -216,7 +214,6 @@ const struct m_sub_options vo_sub_opts = {
|
|||
.native_fs = true,
|
||||
.taskbar_progress = true,
|
||||
.border = true,
|
||||
.fit_border = true,
|
||||
.appid = "mpv",
|
||||
.content_type = -1,
|
||||
.WinID = -1,
|
||||
|
|
|
@ -16,7 +16,6 @@ typedef struct mp_vo_opts {
|
|||
int ontop_level;
|
||||
bool fullscreen;
|
||||
bool border;
|
||||
bool fit_border;
|
||||
bool all_workspaces;
|
||||
bool window_minimized;
|
||||
bool window_maximized;
|
||||
|
|
|
@ -212,8 +212,6 @@ static void draw_frame(struct vo *vo, struct vo_frame *voframe)
|
|||
outpts = pts + ectx->discontinuity_pts_offset;
|
||||
}
|
||||
|
||||
outpts += encoder_get_offset(enc);
|
||||
|
||||
if (!enc->options->rawts) {
|
||||
// calculate expected pts of next video frame
|
||||
double timeunit = av_q2d(avc->time_base);
|
||||
|
|
Loading…
Reference in New Issue