From 7e366113f75c696ae2b32f5faa5f80ec3fca96b8 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 18 Dec 2010 01:00:28 +0200 Subject: options: add "choice" option type, use for -pts-association-mode Add a "choice" option type. Options of this type take a string as input and set an int option variable to the value corresponding to the string. The string->int mapping is option-specific and is given in the option definition. Strings not found in the mapping are rejected as invalid option values. Change the option -pts-association-mode to use this new option type and accept values "auto, decoder, sort" instead of "0, 1, 2". The change in accepted values shouldn't cause problems as this option is not appropriate to use in normal user config files. --- DOCS/man/en/mplayer.1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 60ee3b9169..a6c103ce25 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -1076,16 +1076,17 @@ MPlayer will not load or search for video segments from other files, and will also ignore any chapter order specified for the main file. . .TP -.B \-pts\-association\-mode +.B \-pts\-association\-mode auto|decode|sort Select the method used to determine which container packet timestamp corresponds to a particular output frame from the video decoder. +Normally you shouldn't need to change this option. .PD 0 .RSs -.IPs 0 +.IPs auto Try to pick a working mode from the ones below automatically (default) -.IPs 1 +.IPs decoder Use decoder reordering functionality. -.IPs 2 +.IPs sort Maintain a buffer of unused pts values and use the lowest value for the frame. .RE .PD 1 -- cgit v1.2.3 From b9a3579ec980dfb01d0b952bf0b859ecdf62d7ea Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 18 Dec 2010 08:02:48 +0200 Subject: commands: add generic option -> property wrapper Add mp_property_generic_option(), a property function that can be used for generic option-based properties that do not require any action beyond manipulating the value of the option variable. Currently it directly implements GET and SET, plus STEP_UP for "choice" options only. Use it to add a property for -pts-association-mode (not particularly useful in normal use, but serves as a test). --- DOCS/tech/slave.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'DOCS') diff --git a/DOCS/tech/slave.txt b/DOCS/tech/slave.txt index e923232689..be0ebf9937 100644 --- a/DOCS/tech/slave.txt +++ b/DOCS/tech/slave.txt @@ -513,6 +513,7 @@ name type min max get set step comment osdlevel int 0 3 X X X as -osdlevel speed float 0.01 100 X X X as -speed loop int -1 X X X as -loop +pts_association_mode string X X X as -pts-association-mode pause flag 0 1 X 1 if paused, use with pausing_keep_force filename string X file playing wo path path string X file playing -- cgit v1.2.3 From f0649f13d698eb6aeffeaacd6801b666c4366caf Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Wed, 15 Dec 2010 01:09:47 +0200 Subject: core: add support for precise non-keyframe-limited seeks Add support for seeking to an arbitrary non-keyframe position by decoding video starting from the previous keyframe. Whether to use this functionality when seeking is controlled by the new option -hr-seek and a new third argument to the "seek" command. The default is to use it for absolute seeks (like chapter seeks) but not for relative ones. Because there's currently no support for cutting encoded audio some desync is expected if encoded audio passthrough is used. Currently precise seeks always go to the first frame with timestamp equal to or greater than the target position; there's no support for "matching or earlier" backwards seeks at frame level. --- DOCS/man/en/mplayer.1 | 21 +++++++++++++++++++++ DOCS/tech/slave.txt | 14 ++++++++++---- 2 files changed, 31 insertions(+), 4 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index a6c103ce25..95ef58de81 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -909,6 +909,27 @@ mplayer \-heartbeat\-cmd "gnome\-screensaver\-command \-p" file .PD 1 . .TP +.B \-hr\-seek off|absolute|always +Select when to use precise seeks that are not limited to keyframes. +Such seeks require decoding video from the previous keyframe up to the target +position and so can take some time depending on decoding performance. +For some video formats precise seeks are disabled. This option selects the +default choice to use for seeks; it's possible to explicitly override that +default in the definition of key bindings and in slave mode commands. +.PD 0 +.RSs +.IPs off +Never use precise seeks. +.IPs absolute +Use precise seeks if the seek is to an absolute position in the file, +such as a chapter seek, but not for relative seeks like the default +behavior of arrow keys (default). +.IPs always +Use precise seeks whenever possible. +.RE +.PD 1 +. +.TP .B \-identify Shorthand for \-msglevel identify=4. Show file parameters in an easily parseable format. diff --git a/DOCS/tech/slave.txt b/DOCS/tech/slave.txt index be0ebf9937..6187affab5 100644 --- a/DOCS/tech/slave.txt +++ b/DOCS/tech/slave.txt @@ -272,11 +272,16 @@ radio_step_channel <-1|1> radio_step_freq Tune frequency by the (positive - up, negative - down). -seek [type] +seek [type] [hr-seek] Seek to some place in the movie. - 0 is a relative seek of +/- seconds (default). - 1 is a seek to % in the movie. - 2 is a seek to an absolute position of seconds. + type = 0 is a relative seek of +/- seconds (default). + type = 1 is a seek to % in the movie. + type = 2 is a seek to an absolute position of seconds. + The hr-seek parameter controls whether to use precise seeks (not limited + to keyframe positions in video). + hr-seek = 0 means use default set with option -hr-seek (default). + hr-seek = 1 means force precise seek if possible. + hr-seek = -1 means force non-precise seek. seek_chapter [type] Seek to the start of a chapter. @@ -513,6 +518,7 @@ name type min max get set step comment osdlevel int 0 3 X X X as -osdlevel speed float 0.01 100 X X X as -speed loop int -1 X X X as -loop +hr_seek string X X X as -hr-seek pts_association_mode string X X X as -pts-association-mode pause flag 0 1 X 1 if paused, use with pausing_keep_force filename string X file playing wo path -- cgit v1.2.3 From 5bb2f9787f557bd91d5eb9021238ed7b131d5fa9 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sun, 19 Dec 2010 13:34:06 +0200 Subject: input: add default keybindings Shift+[arrow] for small exact seeks --- DOCS/man/en/mplayer.1 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 95ef58de81..e9065e941b 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -206,8 +206,12 @@ See the \-input option for ways to customize it. .RS .IPs "<\- and \->" Seek backward/\:forward 10 seconds. +Shift+arrow does a 1 second exact seek (see \-hr\-seek; currently modifier +keys like shift only work if used in an X output window). .IPs "up and down" Seek forward/\:backward 1 minute. +Shift+arrow does a 5 second exact seek (see \-hr\-seek; currently modifier +keys like shift only work if used in an X output window). .IPs "pgup and pgdown" Seek forward/\:backward 10 minutes. .IPs "[ and ]" -- cgit v1.2.3