[MPlayer-users] A small wish (for the next release?) ...
Carsten Schultz
carsten at gnocchi.dialup.fu-berlin.de
Fri Apr 18 12:46:29 CEST 2003
Hi Lars!
On Wed, Apr 16, 2003 at 05:27:07PM +0200, Lars Gemeinhardt wrote:
> I need a command like this:
>
> "osd_text" or "osd_show_text" with a STRING as parameter that shows this
> (one line string) like the processbars (volume, ...) 1 second ... I need
> this to dynamicly uptade the OSD-text (then the subtexts are parsed at
> the begin )
I'm attaching what I have done. It may work for you, or you may be
able to change this to fit your needs.
Greetings,
Carsten
--
Carsten Schultz (2:40, 33:47), FB Mathematik, FU Berlin
http://www.math.fu-berlin.de/~cschultz/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
-------------- next part --------------
--- MPlayer-20021230-orig/mplayer.c Sun Dec 29 22:06:20 2002
+++ MPlayer-20021230/mplayer.c Wed Jan 1 00:37:02 2003
@@ -618,6 +618,9 @@
int osd_show_vobsub_changed = 0;
int osd_show_percentage = 0;
int osd_show_tv_channel = 25;
+int osd_show_msg_text = 0;
+#define OSD_MSG_TEXT_LENGTH 20
+char osd_msg_text[OSD_MSG_TEXT_LENGTH+1];
int rtc_fd=-1;
@@ -2607,6 +2610,12 @@
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_PERCENT_POSITION=%ld\n", demuxer_get_percent_pos(demuxer));
} break;
+ case MP_CMD_OSD_TEXT : {
+ strncpy(osd_msg_text, cmd->args[0].v.s, OSD_MSG_TEXT_LENGTH);
+ osd_msg_text[OSD_MSG_TEXT_LENGTH]=0;
+ osd_show_msg_text = sh_video->fps;
+ } break;
+
#ifdef USE_DVDNAV
case MP_CMD_DVDNAV_EVENT: {
dvdnav_priv_t * dvdnav_priv = (dvdnav_priv_t*)(stream->priv);
@@ -3022,6 +3031,10 @@
if (osd_show_av_delay) {
sprintf(osd_text_tmp, "A-V delay: %d ms", ROUND(audio_delay*1000));
osd_show_av_delay--;
+ } else
+ if (osd_show_msg_text) {
+ strcpy(osd_text_tmp, osd_msg_text);
+ osd_show_msg_text--;
} else if(osd_level>=2) {
int len = demuxer_get_time_length(demuxer);
int percentage = -1;
--- MPlayer-20021230-orig/input/input.c Sat Dec 28 23:57:38 2002
+++ MPlayer-20021230/input/input.c Wed Jan 1 00:37:36 2003
@@ -87,6 +87,7 @@
{ MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
{ MP_CMD_LOADLIST, "loadlist", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
{ MP_CMD_VF_CHANGE_RECTANGLE, "change_rectangle", 2, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}}}},
+ { MP_CMD_OSD_TEXT, "osd_text", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
#ifdef HAVE_NEW_GUI
{ MP_CMD_GUI_LOADFILE, "gui_loadfile", 0, { {-1,{0}} } },
--- MPlayer-20021230-orig/input/input.h Sat Dec 28 23:57:38 2002
+++ MPlayer-20021230/input/input.h Wed Jan 1 00:37:32 2003
@@ -42,6 +42,7 @@
#endif
#define MP_CMD_SUB_ALIGNMENT 39
#define MP_CMD_TV_LAST_CHANNEL 40
+#define MP_CMD_OSD_TEXT 41
#define MP_CMD_GUI_EVENTS 5000
#define MP_CMD_GUI_LOADFILE 5001
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20030418/1eee5dd1/attachment.pgp>
More information about the MPlayer-users
mailing list