summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-05-26 01:11:54 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:05 +0200
commit900a9624f9156dd1160b2488536156f9e9e654bd (patch)
tree4ca36ee821f4913d00bf35c33b06da0549e124b8
parentf68d9e75f8957957a9b97e2883a9482fd0b6479a (diff)
downloadmpv-900a9624f9156dd1160b2488536156f9e9e654bd.tar.bz2
mpv-900a9624f9156dd1160b2488536156f9e9e654bd.tar.xz
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.
-rw-r--r--DOCS/interface-changes.rst1
-rw-r--r--DOCS/man/options.rst6
-rw-r--r--options/options.c4
-rw-r--r--options/options.h1
-rw-r--r--player/misc.c24
5 files changed, 3 insertions, 33 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 50cc2eb100..67fc2ee921 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -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,
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index ce31635192..775a937c1e 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -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
diff --git a/options/options.c b/options/options.c
index 65c6d7234e..0d7d0ed51e 100644
--- a/options/options.c
+++ b/options/options.c
@@ -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,
diff --git a/options/options.h b/options/options.h
index 26693221a3..8489c79aa9 100644
--- a/options/options.h
+++ b/options/options.h
@@ -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;
diff --git a/player/misc.c b/player/misc.c
index ec8812f773..43d5a750e5 100644
--- a/player/misc.c
+++ b/player/misc.c
@@ -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);
}
/**