comparison mplayer.c @ 18222:8c35bd43135f

Add a new command: osd_show_property_text that show an expanded property string on the OSD. Based on a patch 'by someone named "veal" on irc' that showed the filename.
author albeu
date Sun, 23 Apr 2006 14:31:54 +0000
parents 4bc744cb60e7
children cdf3cb516027
comparison
equal deleted inserted replaced
18221:8ea3b8660dd7 18222:8c35bd43135f
4231 else 4231 else
4232 rm_osd_msg(OSD_MSG_OSD_STATUS); 4232 rm_osd_msg(OSD_MSG_OSD_STATUS);
4233 } break; 4233 } break;
4234 case MP_CMD_OSD_SHOW_TEXT : { 4234 case MP_CMD_OSD_SHOW_TEXT : {
4235 set_osd_msg(OSD_MSG_TEXT,1,osd_duration,"%-.63s",cmd->args[0].v.s); 4235 set_osd_msg(OSD_MSG_TEXT,1,osd_duration,"%-.63s",cmd->args[0].v.s);
4236 } break;
4237 case MP_CMD_OSD_SHOW_PROPERTY_TEXT : {
4238 char* txt = m_properties_expand_string(mp_properties,cmd->args[0].v.s);
4239 /* if no argument supplied take default osd_duration, otherwise <arg> ms. */
4240 if(txt) {
4241 set_osd_msg(OSD_MSG_TEXT,cmd->args[2].v.i,
4242 (cmd->args[1].v.i < 0 ? osd_duration : cmd->args[1].v.i),
4243 "%-.63s",txt);
4244 free(txt);
4245 }
4236 } break; 4246 } break;
4237 case MP_CMD_LOADFILE : { 4247 case MP_CMD_LOADFILE : {
4238 play_tree_t* e = play_tree_new(); 4248 play_tree_t* e = play_tree_new();
4239 play_tree_add_file(e,cmd->args[0].v.s); 4249 play_tree_add_file(e,cmd->args[0].v.s);
4240 4250