changeset 31580:b6c2b541e1a6

Implement edl-backward-delay to avoid jumping right over an EDL skipped segment. Patch by Vlad Seryakov vseryakov AT Gmail.
author reynaldo
date Thu, 08 Jul 2010 15:52:47 +0000
parents b4e8fb9f8548
children 8f8c92592747
files DOCS/man/en/mplayer.1 cfg-mplayer.h mplayer.c
diffstat 3 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Wed Jul 07 11:52:31 2010 +0000
+++ b/DOCS/man/en/mplayer.1	Thu Jul 08 15:52:47 2010 +0000
@@ -879,6 +879,18 @@
 See http://www.mplayerhq.hu/\:DOCS/\:HTML/\:en/\:edl.html for details.
 .
 .TP
+.B \-edl-backward-delay <number>
+When using EDL during playback and jumping backwards it is possible to
+end up in the middle of an EDL record.
+In that case MPlayer will seek further backwards to the start position
+of the EDL record and then immediately skip the scene specified in the
+EDL record.
+To avoid this kind of behavior, MPlayer jumps to a fixed time interval
+before the start of the EDL record.
+This parameter allows you to specify that time interval in seconds
+(default: 2 seconds).
+.
+.TP
 .B \-enqueue (GUI only)
 Enqueue files given on the command line in the playlist instead of playing them
 immediately.
--- a/cfg-mplayer.h	Wed Jul 07 11:52:31 2010 +0000
+++ b/cfg-mplayer.h	Thu Jul 08 15:52:47 2010 +0000
@@ -102,6 +102,7 @@
     {"noalsa", "-noalsa has been removed. Remove it from your config file.\n",
      CONF_TYPE_PRINT, 0, 0, 0, NULL},
     {"edlout", &edl_output_filename,  CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"edl-backward-delay", &edl_backward_delay,  CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
 
 #ifdef CONFIG_X11
     {"display", &mDisplayName, CONF_TYPE_STRING, 0, 0, 0, NULL},
--- a/mplayer.c	Wed Jul 07 11:52:31 2010 +0000
+++ b/mplayer.c	Thu Jul 08 15:52:47 2010 +0000
@@ -336,7 +336,7 @@
 // have some time after the seek to decide what to do next
 // (next seek, pause,...), otherwise after the seek it will
 // enter the same scene again and skip forward immediately
-float edl_backward_extra_sec = 2;
+float edl_backward_delay = 2;
 int use_filedir_conf;
 int use_filename_title;
 
@@ -2545,7 +2545,7 @@
                     abs_seek_pos = 0;
                     rel_seek_secs = -(mpctx->sh_video->pts -
                                       next_edl_record->start_sec +
-                                      edl_backward_extra_sec);
+                                      edl_backward_delay);
                     mp_msg(MSGT_CPLAYER, MSGL_DBG4, "EDL_SKIP: pts [%f], "
                            "offset [%f], start [%f], stop [%f], length [%f]\n",
                            mpctx->sh_video->pts, rel_seek_secs,