diff options
author | wm4 <wm4@nowhere> | 2012-11-15 18:49:17 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-11-16 21:21:15 +0100 |
commit | 51503a05778290edc0bb77276b67d33ca0e10783 (patch) | |
tree | 4745d8d476e788fe0a36c1151dd28118cac0a911 /core/options.h | |
parent | b4b86e9286ba175ba0da4d19e165660bed7002e4 (diff) | |
download | mpv-51503a05778290edc0bb77276b67d33ca0e10783.tar.bz2 mpv-51503a05778290edc0bb77276b67d33ca0e10783.tar.xz |
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/options.h')
-rw-r--r-- | core/options.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/options.h b/core/options.h index 31d2726c19..03298554cd 100644 --- a/core/options.h +++ b/core/options.h @@ -1,6 +1,8 @@ #ifndef MPLAYER_OPTIONS_H #define MPLAYER_OPTIONS_H +#include "core/m_option.h" + typedef struct MPOpts { char **video_driver_list; char **audio_driver_list; @@ -69,7 +71,9 @@ typedef struct MPOpts { int consolecontrols; int doubleclick_time; int list_properties; - double seek_to_sec; + struct m_rel_time play_start; + struct m_rel_time play_end; + struct m_rel_time play_length; int start_paused; int audio_id; int video_id; |