diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-08-15 08:30:43 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-08-15 08:30:43 +0000 |
commit | 699e0cc67bf6a91419df945eb17015f95edcf2d2 (patch) | |
tree | d822178472e2eb62902980ccd3121559a527d57d | |
parent | a96150da8513c4536e3be1b9cc75c565bd482021 (diff) | |
download | mpv-699e0cc67bf6a91419df945eb17015f95edcf2d2.tar.bz2 mpv-699e0cc67bf6a91419df945eb17015f95edcf2d2.tar.xz |
loadfile/loadlist can now also add files to the playlist
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16228 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | DOCS/tech/slave.txt | 8 | ||||
-rw-r--r-- | input/input.c | 4 | ||||
-rw-r--r-- | mplayer.c | 8 |
3 files changed, 16 insertions, 4 deletions
diff --git a/DOCS/tech/slave.txt b/DOCS/tech/slave.txt index dda091a952..63d2e695eb 100644 --- a/DOCS/tech/slave.txt +++ b/DOCS/tech/slave.txt @@ -173,11 +173,15 @@ panscan <-1.0 - 1.0> | <0.0 - 1.0> <absolute> If <absolute> is != 0, then the pan-and scan range is interpreted as an absolute range. -loadfile <file|url> +loadfile <file|url> <append> Load the given file/URL. + If <append> is 0 or not given playback of the current file will be stopped + and the playlist replaced. Otherwise it will only be added to the playlist. -loadlist <file> +loadlist <file> <append> Load the given playlist file. + If <append> is 0 or not given playback of the current file will be stopped + and the playlist replaced. Otherwise it will only be added to the playlist. change_rectangle <val1> <val2> Change the position of the rectangle filter rectangle. diff --git a/input/input.c b/input/input.c index e63d6f03d9..ea667e4794 100644 --- a/input/input.c +++ b/input/input.c @@ -110,8 +110,8 @@ static mp_cmd_t mp_cmds[] = { { MP_CMD_SCREENSHOT, "screenshot", 0, { {-1,{0}} } }, { MP_CMD_PANSCAN, "panscan",1, { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_SWITCH_VSYNC, "switch_vsync", 0, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, - { MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, - { MP_CMD_LOADLIST, "loadlist", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, + { MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, + { MP_CMD_LOADLIST, "loadlist", 1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_RUN, "run", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } }, { MP_CMD_VF_CHANGE_RECTANGLE, "change_rectangle", 2, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}}}}, @@ -2998,6 +2998,9 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still) play_tree_t* e = play_tree_new(); play_tree_add_file(e,cmd->args[0].v.s); + if (cmd->args[1].v.i) // append + play_tree_append_entry(playtree, e); + else { // Go back to the start point while(play_tree_iter_up_step(playtree_iter,0,1) != PLAY_TREE_ITER_END) /* NOP */; @@ -3005,6 +3008,7 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still) play_tree_set_child(playtree,e); play_tree_iter_step(playtree_iter,0,0); eof = PT_NEXT_SRC; + } brk_cmd = 1; } break; case MP_CMD_LOADLIST : { @@ -3012,6 +3016,9 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still) if(!e) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_PlaylistLoadUnable,cmd->args[0].v.s); else { + if (cmd->args[1].v.i) // append + play_tree_append_entry(playtree, e); + else { // Go back to the start point while(play_tree_iter_up_step(playtree_iter,0,1) != PLAY_TREE_ITER_END) /* NOP */; @@ -3019,6 +3026,7 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still) play_tree_set_child(playtree,e); play_tree_iter_step(playtree_iter,0,0); eof = PT_NEXT_SRC; + } } brk_cmd = 1; } break; |