[Mplayer-cvslog] CVS: main mplayer.c,1.533,1.534
Alban Bedel CVS
albeu at mplayerhq.hu
Fri Jul 26 23:26:41 CEST 2002
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv32657
Modified Files:
mplayer.c
Log Message:
Add loadfile and loadlist commands. May be buggy if the filename contain some
spaces.
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.533
retrieving revision 1.534
diff -u -r1.533 -r1.534
--- mplayer.c 25 Jul 2002 20:34:33 -0000 1.533
+++ mplayer.c 26 Jul 2002 21:26:30 -0000 1.534
@@ -2393,7 +2393,31 @@
case MP_CMD_MUTE: {
mixer_mute();
}
- case MP_CMD_MIXER_USEMASTER : {
+ case MP_CMD_LOADFILE : {
+ play_tree_t* e = play_tree_new();
+ play_tree_add_file(e,cmd->args[0].v.s);
+
+ // Go back to the start point
+ while(play_tree_iter_up_step(playtree_iter,0,1) != PLAY_TREE_ITER_END)
+ /* NOP */;
+ play_tree_free_list(playtree->child,1);
+ play_tree_set_child(playtree,e);
+ play_tree_iter_step(playtree_iter,0,0);
+ eof = PT_NEXT_SRC;
+ } break;
+ case MP_CMD_LOADLIST : {
+ play_tree_t* e = parse_playlist_file(cmd->args[0].v.s);
+ if(!e)
+ mp_msg(MSGT_CPLAYER,MSGL_ERR,"\nUnable to load playlist %s\n",cmd->args[0].v.s);
+ else {
+ // Go back to the start point
+ while(play_tree_iter_up_step(playtree_iter,0,1) != PLAY_TREE_ITER_END)
+ /* NOP */;
+ play_tree_free_list(playtree->child,1);
+ play_tree_set_child(playtree,e);
+ play_tree_iter_step(playtree_iter,0,0);
+ eof = PT_NEXT_SRC;
+ }
} break;
case MP_CMD_BRIGHTNESS : {
int v = cmd->args[0].v.i, abs = cmd->args[1].v.i;
More information about the MPlayer-cvslog
mailing list