Mercurial > mplayer.hg
diff 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 |
line wrap: on
line diff
--- a/mplayer.c Sun Apr 23 12:53:29 2006 +0000 +++ b/mplayer.c Sun Apr 23 14:31:54 2006 +0000 @@ -4234,6 +4234,16 @@ case MP_CMD_OSD_SHOW_TEXT : { set_osd_msg(OSD_MSG_TEXT,1,osd_duration,"%-.63s",cmd->args[0].v.s); } break; + case MP_CMD_OSD_SHOW_PROPERTY_TEXT : { + char* txt = m_properties_expand_string(mp_properties,cmd->args[0].v.s); + /* if no argument supplied take default osd_duration, otherwise <arg> ms. */ + if(txt) { + set_osd_msg(OSD_MSG_TEXT,cmd->args[2].v.i, + (cmd->args[1].v.i < 0 ? osd_duration : cmd->args[1].v.i), + "%-.63s",txt); + free(txt); + } + } break; case MP_CMD_LOADFILE : { play_tree_t* e = play_tree_new(); play_tree_add_file(e,cmd->args[0].v.s);