diff options
author | reynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-05 22:47:44 +0000 |
---|---|---|
committer | reynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-05 22:47:44 +0000 |
commit | d2e67a69fb4472dff49dabd37eb9b8380f833ff1 (patch) | |
tree | 1880e1f2979b7755384f4b030e4f18d9cb69c39a /mplayer.c | |
parent | f78a2c49108d2b7a516cb8109de3776c10dc4fc4 (diff) | |
download | mpv-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
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -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 : { |