path: root/core/cfg-mplayer.h
diff options
authorwm4 <wm4@nowhere>2012-11-15 18:49:17 +0100
committerwm4 <wm4@nowhere>2012-11-16 21:21:15 +0100
commit51503a05778290edc0bb77276b67d33ca0e10783 (patch)
tree4745d8d476e788fe0a36c1151dd28118cac0a911 /core/cfg-mplayer.h
parentb4b86e9286ba175ba0da4d19e165660bed7002e4 (diff)
options: rename -ss and -endpos, allow relative times
Rename the -ss option to -start, and -endpos to -length. Add a -end option. The -end option always specifies an absolute end time, as opposed to -endpos/-length. All these options (--start, --end, --length) now accept relative times. Percent positions (e.g. "--start=30%") are interpreted as fractions of the file duration. Negative times (e.g. "--start=-1:00) are interpreted relative to the end of the file. Chapters (e.g. "--start=#3") yield the chapter's time position. The chapter support might be able to replace --chapter completely, but for now I am not sure how well this works out with e.g. DVDs and BDs, and a separate --chapter option is useful interface-wise.
Diffstat (limited to 'core/cfg-mplayer.h')
1 files changed, 3 insertions, 4 deletions
diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h
index 776798aaad..b6e947be5f 100644
--- a/core/cfg-mplayer.h
+++ b/core/cfg-mplayer.h
@@ -376,14 +376,13 @@ const m_option_t common_opts[] = {
// seek to byte/seconds position
{"sb", &seek_to_byte, CONF_TYPE_INT64, CONF_MIN, 0, 0, NULL},
- OPT_TIME("ss", seek_to_sec, 0),
+ OPT_REL_TIME("start", play_start, 0),
+ OPT_REL_TIME("end", play_end, 0),
+ OPT_REL_TIME("length", play_length, 0),
// start paused
OPT_FLAG_ON("pause", start_paused, 0),
- // stop at given position
- {"endpos", &end_at, CONF_TYPE_TIME_SIZE, 0, 0, 0, NULL},
// AVI specific: force non-interleaved mode
{"avi-ni", &force_ni, CONF_TYPE_FLAG, 0, 0, 1, NULL},