changeset 18223:cdf3cb516027

Align osd_show_text with osd_show_property_text.
author albeu
date Sun, 23 Apr 2006 14:48:15 +0000
parents 8c35bd43135f
children c4e25e4d7117
files DOCS/tech/slave.txt input/input.c mplayer.c
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/tech/slave.txt	Sun Apr 23 14:31:54 2006 +0000
+++ b/DOCS/tech/slave.txt	Sun Apr 23 14:48:15 2006 +0000
@@ -143,7 +143,7 @@
     is shown for [duration] ms. [level] set the minimum OSD level needed for
     the message to be visible, default to 0 (always show).
 
-osd_show_text <string>
+osd_show_text <string> [duration] [level]
     Show <string> on the OSD.
 
 panscan <-1.0 - 1.0> | <0.0 - 1.0> <abs>
--- a/input/input.c	Sun Apr 23 14:31:54 2006 +0000
+++ b/input/input.c	Sun Apr 23 14:48:15 2006 +0000
@@ -65,7 +65,7 @@
   { MP_CMD_SUB_DELAY, "sub_delay",1,  { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
   { MP_CMD_SUB_STEP, "sub_step",1,  { { MP_CMD_ARG_INT,{0} }, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
   { MP_CMD_OSD, "osd",0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } },
-  { MP_CMD_OSD_SHOW_TEXT, "osd_show_text", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
+  { MP_CMD_OSD_SHOW_TEXT, "osd_show_text", 1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_INT,{-1}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
   { MP_CMD_OSD_SHOW_PROPERTY_TEXT, "osd_show_property_text",1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_INT,{-1}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
   { MP_CMD_VOLUME, "volume", 1, { { MP_CMD_ARG_FLOAT,{0} }, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
   { MP_CMD_MIXER_USEMASTER, "use_master", 0, { {-1,{0}} } },
--- a/mplayer.c	Sun Apr 23 14:31:54 2006 +0000
+++ b/mplayer.c	Sun Apr 23 14:48:15 2006 +0000
@@ -4232,7 +4232,9 @@
 	  rm_osd_msg(OSD_MSG_OSD_STATUS);
     } break;
     case MP_CMD_OSD_SHOW_TEXT :  {
-      set_osd_msg(OSD_MSG_TEXT,1,osd_duration,"%-.63s",cmd->args[0].v.s);
+      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",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);