summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-05 22:47:44 +0000
committerreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-05 22:47:44 +0000
commitd2e67a69fb4472dff49dabd37eb9b8380f833ff1 (patch)
tree1880e1f2979b7755384f4b030e4f18d9cb69c39a
parentf78a2c49108d2b7a516cb8109de3776c10dc4fc4 (diff)
downloadmpv-d2e67a69fb4472dff49dabd37eb9b8380f833ff1.tar.bz2
mpv-d2e67a69fb4472dff49dabd37eb9b8380f833ff1.tar.xz
Modifies behavior of -edlout
Now it creates a new file and writes edit decision list (EDL) records to it just as it did before but instead of making pas-2-seconds blocks for each 'i' keystroke lets the user hits 'i' to mark the start or end of a block. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18916 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/man/en/mplayer.17
-rw-r--r--help/help_mp-en.h3
-rw-r--r--mplayer.c17
3 files changed, 22 insertions, 5 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index 160e849b6e..6bcebd4fdd 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -304,7 +304,7 @@ Adjust subtitle delay by +/- 0.1 seconds.
.IPs "r and t"
Move subtitles up/down.
.IPs "i (\-edlout mode only)"
-Set EDL mark.
+Set start or end of an EDL skip and write it out to the given file.
.IPs "s (\-vf screenshot only)"
Take a screenshot.
.IPs "I"
@@ -727,9 +727,8 @@ Support must be compiled in by configuring with --enable-crash-debug.
.
.TP
.B \-edlout <filename>
-Creates a new file and writes edit decision list (EDL) records to that file.
-During playback, when the user hits 'i', an entry to skip over the last two
-seconds of playback will be written to the file.
+Creates a new file and writes edit decision list (EDL) records to it.
+During playback, the user hits 'i' to mark the start or end of a skip block
This provides a starting point from which the user can fine-tune EDL entries
later.
See DOCS/\:HTML/\:en/\:edl.html for details.
diff --git a/help/help_mp-en.h b/help/help_mp-en.h
index 85481dfbd5..5aba692138 100644
--- a/help/help_mp-en.h
+++ b/help/help_mp-en.h
@@ -198,6 +198,9 @@ static char help_text[]=
#define MSGTR_EdlBadLineOverlap "Last stop position was [%f]; next start is [%f].\n"\
"Entries must be in chronological order, cannot overlap. Discarding.\n"
#define MSGTR_EdlBadLineBadStop "Stop time has to be after start time.\n"
+#define MSGTR_EdloutBadStop "EDL skip canceled, last start > stop\n"
+#define MSGTR_EdloutStartSkip "EDL skip start, press 'i' again to end block.\n"
+#define MSGTR_EdloutEndSkip "EDL skip end, line written.\n"
// mplayer.c OSD
diff --git a/mplayer.c b/mplayer.c
index bc63dbe857..570939e8a6 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -397,6 +397,7 @@ short user_muted = 0; ///< Stores whether user wanted muted mode.
short edl_muted = 0; ///< Stores whether EDL is currently in muted mode.
short edl_decision = 0; ///< 1 when an EDL operation has been made.
FILE* edl_fd = NULL; ///< fd to write to when in -edlout mode.
+float begin_skip = MP_NOPTS_VALUE; ///< start time of the current skip while on edlout mode
static unsigned int inited_flags=0;
#define INITED_VO 1
@@ -4226,7 +4227,21 @@ if(step_sec>0) {
if( edl_fd ) {
float v = sh_video ? sh_video->pts :
playing_audio_pts(sh_audio, d_audio, audio_out);
- fprintf( edl_fd, "%f %f %d\n", v-2, v, 0 );
+
+ if(begin_skip == MP_NOPTS_VALUE)
+ {
+ begin_skip = v;
+ mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdloutStartSkip);
+ }else{
+ if(begin_skip > v)
+ {
+ mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_EdloutBadStop);
+ }else{
+ fprintf(edl_fd, "%f %f %d\n", begin_skip, v, 0);
+ mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdloutEndSkip);
+ }
+ begin_skip = MP_NOPTS_VALUE;
+ }
}
break;
case MP_CMD_SWITCH_RATIO : {