mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
options: remove --chapter
Has been deprecated for almost 3 years. Manpage didn't mention the deprecation, but CLI and release notes did. It wouldn't be much effort to keep this option working, but I just don't see the damn point. --start/--end can specify chapters using special syntax, which is equivalent.
This commit is contained in:
@@ -88,6 +88,7 @@ Interface changes
|
||||
- always prefer EGL over GLX, which helps with AMD/vaapi, but will break
|
||||
vdpau with --vo=gpu - use --gpu-context=x11 to be able to use vdpau. This
|
||||
does not affect --vo=vdpau or --hwdec=vdpau-copy.
|
||||
- remove deprecated --chapter option
|
||||
--- mpv 0.29.0 ---
|
||||
- drop --opensles-sample-rate, as --audio-samplerate should be used if desired
|
||||
- drop deprecated --videotoolbox-format, --ff-aid, --ff-vid, --ff-sid,
|
||||
|
||||
@@ -150,12 +150,6 @@ Playback Control
|
||||
``--shuffle``
|
||||
Play files in random order.
|
||||
|
||||
``--chapter=<start[-end]>``
|
||||
Specify which chapter to start playing at. Optionally specify which
|
||||
chapter to end playing at.
|
||||
|
||||
See also: ``--start``.
|
||||
|
||||
``--playlist-start=<auto|index>``
|
||||
Set which file on the internal playlist to start playback with. The index
|
||||
is an integer, with 0 meaning the first file. The value ``auto`` means that
|
||||
|
||||
@@ -389,8 +389,6 @@ const m_option_t mp_opts[] = {
|
||||
#if HAVE_DVDNAV
|
||||
OPT_SUBSTRUCT("", dvd_opts, dvd_conf, 0),
|
||||
#endif
|
||||
OPT_INTPAIR("chapter", chapterrange, 0, .deprecation_message = "instead of "
|
||||
"--chapter=A-B use --start=#A --end=#B+1"),
|
||||
OPT_CHOICE_OR_INT("edition", edition_id, 0, 0, 8190,
|
||||
({"auto", -1})),
|
||||
#if HAVE_LIBBLURAY
|
||||
@@ -865,6 +863,7 @@ const m_option_t mp_opts[] = {
|
||||
OPT_REMOVED("heartbeat-cmd", "use Lua scripting instead"),
|
||||
OPT_REMOVED("no-ometadata", "use --no-ocopy-metadata"),
|
||||
OPT_REMOVED("video-stereo-mode", "removed, try --vf=stereo3d"),
|
||||
OPT_REMOVED("chapter", "use '--start=#123' '--end=#124' (for chapter 123)"),
|
||||
|
||||
{0}
|
||||
};
|
||||
@@ -909,7 +908,6 @@ const struct MPOpts mp_default_opts = {
|
||||
.hls_bitrate = INT_MAX,
|
||||
.cache_pause = 1,
|
||||
.cache_pause_wait = 1.0,
|
||||
.chapterrange = {-1, -1},
|
||||
.ab_loop = {MP_NOPTS_VALUE, MP_NOPTS_VALUE},
|
||||
.edition_id = -1,
|
||||
.default_max_pts_correction = -1,
|
||||
|
||||
@@ -194,7 +194,6 @@ typedef struct MPOpts {
|
||||
char *force_configdir;
|
||||
int use_filedir_conf;
|
||||
int hls_bitrate;
|
||||
int chapterrange[2];
|
||||
int edition_id;
|
||||
int correct_pts;
|
||||
int initial_audio_sync;
|
||||
|
||||
@@ -100,11 +100,6 @@ double get_play_end_pts(struct MPContext *mpctx)
|
||||
if (length != MP_NOPTS_VALUE && (end == MP_NOPTS_VALUE || start + length < end))
|
||||
end = start + length;
|
||||
}
|
||||
if (opts->chapterrange[1] > 0) {
|
||||
double cend = chapter_start_time(mpctx, opts->chapterrange[1]);
|
||||
if (cend != MP_NOPTS_VALUE && (end == MP_NOPTS_VALUE || cend < end))
|
||||
end = cend;
|
||||
}
|
||||
// even though MP_NOPTS_VALUE is currently negative
|
||||
// it doesn't necessarily have to remain that way
|
||||
double ab_loop_start_time = get_ab_loop_start_time(mpctx);
|
||||
@@ -129,24 +124,7 @@ double get_play_end_pts(struct MPContext *mpctx)
|
||||
double get_play_start_pts(struct MPContext *mpctx)
|
||||
{
|
||||
struct MPOpts *opts = mpctx->opts;
|
||||
double play_start_pts = rel_time_to_abs(mpctx, opts->play_start);
|
||||
if (play_start_pts == MP_NOPTS_VALUE && opts->chapterrange[0] > 0) {
|
||||
double chapter_start_pts = chapter_start_time(mpctx, opts->chapterrange[0] - 1);
|
||||
if (chapter_start_pts != MP_NOPTS_VALUE) {
|
||||
/*
|
||||
* get_play_start_pts always returns rebased timetamps,
|
||||
* even with --rebase-start-time=no. chapter_start_time
|
||||
* values are not rebased without --rebase-start-time=yes,
|
||||
* so we need to rebase them here to be consistent with
|
||||
* the rest of get_play_start_pts.
|
||||
*/
|
||||
if (mpctx->demuxer && !mpctx->opts->rebase_start_time){
|
||||
chapter_start_pts -= mpctx->demuxer->start_time;
|
||||
}
|
||||
play_start_pts = chapter_start_pts;
|
||||
}
|
||||
}
|
||||
return play_start_pts;
|
||||
return rel_time_to_abs(mpctx, opts->play_start);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user