comparison mplayer.c @ 6818:b9a6817d9ff3

Add loadfile and loadlist commands. May be buggy if the filename contain some spaces.
author albeu
date Fri, 26 Jul 2002 21:26:39 +0000
parents 9c828335b2d0
children a3867d6e2c11
comparison
equal deleted inserted replaced
6817:3e62e9cd1816 6818:b9a6817d9ff3
2391 #endif 2391 #endif
2392 } break; 2392 } break;
2393 case MP_CMD_MUTE: { 2393 case MP_CMD_MUTE: {
2394 mixer_mute(); 2394 mixer_mute();
2395 } 2395 }
2396 case MP_CMD_MIXER_USEMASTER : { 2396 case MP_CMD_LOADFILE : {
2397 play_tree_t* e = play_tree_new();
2398 play_tree_add_file(e,cmd->args[0].v.s);
2399
2400 // Go back to the start point
2401 while(play_tree_iter_up_step(playtree_iter,0,1) != PLAY_TREE_ITER_END)
2402 /* NOP */;
2403 play_tree_free_list(playtree->child,1);
2404 play_tree_set_child(playtree,e);
2405 play_tree_iter_step(playtree_iter,0,0);
2406 eof = PT_NEXT_SRC;
2407 } break;
2408 case MP_CMD_LOADLIST : {
2409 play_tree_t* e = parse_playlist_file(cmd->args[0].v.s);
2410 if(!e)
2411 mp_msg(MSGT_CPLAYER,MSGL_ERR,"\nUnable to load playlist %s\n",cmd->args[0].v.s);
2412 else {
2413 // Go back to the start point
2414 while(play_tree_iter_up_step(playtree_iter,0,1) != PLAY_TREE_ITER_END)
2415 /* NOP */;
2416 play_tree_free_list(playtree->child,1);
2417 play_tree_set_child(playtree,e);
2418 play_tree_iter_step(playtree_iter,0,0);
2419 eof = PT_NEXT_SRC;
2420 }
2397 } break; 2421 } break;
2398 case MP_CMD_BRIGHTNESS : { 2422 case MP_CMD_BRIGHTNESS : {
2399 int v = cmd->args[0].v.i, abs = cmd->args[1].v.i; 2423 int v = cmd->args[0].v.i, abs = cmd->args[1].v.i;
2400 2424
2401 if (!sh_video) 2425 if (!sh_video)