Index: input/input.c =================================================================== --- input/input.c (revision 32039) +++ input/input.c (working copy) @@ -76,6 +76,7 @@ { MP_CMD_RADIO_STEP_FREQ, "radio_step_freq", 1, { {MP_CMD_ARG_FLOAT,{0}}, {-1,{0}} } }, #endif { MP_CMD_SEEK, "seek", 1, { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, + { MP_CMD_EDL_LOADFILE, "edl_loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, { MP_CMD_EDL_MARK, "edl_mark", 0, { {-1,{0}} } }, { MP_CMD_AUDIO_DELAY, "audio_delay", 1, { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_SPEED_INCR, "speed_incr", 1, { {MP_CMD_ARG_FLOAT,{0}}, {-1,{0}} } }, Index: input/input.h =================================================================== --- input/input.h (revision 32039) +++ input/input.h (working copy) @@ -61,6 +61,7 @@ MP_CMD_GET_PERCENT_POS, MP_CMD_SUB_STEP, MP_CMD_TV_SET_CHANNEL, + MP_CMD_EDL_LOADFILE, MP_CMD_EDL_MARK, MP_CMD_SUB_ALIGNMENT, MP_CMD_TV_LAST_CHANNEL, Index: DOCS/tech/slave.txt =================================================================== --- DOCS/tech/slave.txt (revision 32039) +++ DOCS/tech/slave.txt (working copy) @@ -105,6 +105,9 @@ prev mouse +edl_loadfile + Load new EDL file + edl_mark Write the current position into the EDL file. Index: mplayer.c =================================================================== --- mplayer.c (revision 32039) +++ mplayer.c (working copy) @@ -2533,6 +2533,17 @@ #endif } +static void edl_loadfile(void) +{ + if (edl_filename) { + if (edl_records) { + free_edl(edl_records); + edl_needs_reset = 1; + } + next_edl_record = edl_records = edl_parse_file(); + } +} + // Execute EDL command for the current position if one exists static void edl_update(MPContext *mpctx) { @@ -3211,10 +3222,7 @@ vo_wintitle = strdup ( mp_basename2 (filename)); } -if (edl_filename) { - if (edl_records) free_edl(edl_records); - next_edl_record = edl_records = edl_parse_file(); -} + edl_loadfile(); if (edl_output_filename) { if (edl_fd) fclose(edl_fd); if ((edl_fd = fopen(edl_output_filename, "w")) == NULL) @@ -3975,6 +3983,14 @@ int brk_cmd = 0; while( !brk_cmd && (cmd = mp_input_get_cmd(0,0,0)) != NULL) { brk_cmd = run_command(mpctx, cmd); + if (cmd->id == MP_CMD_EDL_LOADFILE) { + if (edl_filename) free(edl_filename); + edl_filename = strdup(cmd->args[0].v.s); + if (edl_filename) + edl_loadfile(); + else + mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_EdlOutOfMemFile, cmd->args[0].v.s); + } mp_cmd_free(cmd); if (brk_cmd == 2) goto goto_enable_cache; Index: mplayer.h =================================================================== --- mplayer.h (revision 32039) +++ mplayer.h (working copy) @@ -44,7 +44,7 @@ extern int stream_cache_size; extern int autosync; - +extern double start_pts; extern int frame_dropping; extern int auto_quality; Index: help/help_mp-en.h =================================================================== --- help/help_mp-en.h (revision 32039) +++ help/help_mp-en.h (working copy) @@ -183,6 +183,7 @@ // --- edit decision lists #define MSGTR_EdlOutOfMem "Can't allocate enough memory to hold EDL data.\n" +#define MSGTR_EdlOutOfMemFile "Can't allocate enough memory to hold EDL file name [%s].\n" #define MSGTR_EdlRecordsNo "Read %d EDL actions.\n" #define MSGTR_EdlQueueEmpty "There are no EDL actions to take care of.\n" #define MSGTR_EdlCantOpenForWrite "Can't open EDL file [%s] for writing.\n"