Mercurial > mplayer.hg
diff mplayer.c @ 18911:89af7441989b
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.
author | reynaldo |
---|---|
date | Wed, 05 Jul 2006 22:47:44 +0000 |
parents | 78547a882a09 |
children | 2dc84d07332c |
line wrap: on
line diff
--- a/mplayer.c Wed Jul 05 22:47:47 2006 +0000 +++ b/mplayer.c Wed Jul 05 22:47:44 2006 +0000 @@ -397,6 +397,7 @@ 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( 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 : {