[MPlayer-cvslog] r18916 - in trunk: DOCS/man/en/mplayer.1 help/help_mp-en.h mplayer.c

reynaldo subversion at mplayerhq.hu
Thu Jul 6 00:47:51 CEST 2006


Author: reynaldo
Date: Thu Jul  6 00:47:44 2006
New Revision: 18916

Modified:
   trunk/help/help_mp-en.h
   trunk/mplayer.c

Changes in other areas also in this revision:
Modified:
   trunk/DOCS/man/en/mplayer.1

Log:

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.



Modified: trunk/help/help_mp-en.h
==============================================================================
--- trunk/help/help_mp-en.h	(original)
+++ trunk/help/help_mp-en.h	Thu Jul  6 00:47:44 2006
@@ -198,6 +198,9 @@
 #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
 

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Thu Jul  6 00:47:44 2006
@@ -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 : {



More information about the MPlayer-cvslog mailing list