[MPlayer-dev-eng] [PATCH] Better ARM support for mplayer/ffmpeg, ported from atty fork
Diego Biurrun
diego at biurrun.de
Mon Jun 6 00:09:51 CEST 2005
On Wed, May 25, 2005 at 04:43:23AM +0200, Bernhard Rosenkraenzer wrote:
> while playing with some new hardware, I found it's running a forked mplayer --
> and it looks like they're following the GPL.
Did anybody have a look at this?
It contains several things that should be committed separately. I took
the time to extract an extra slave command from the patch.
osd_show_progbar <percent> displays the progress bar at <percent>
percentage. It's tested to work, but I'm not sure the implementation
couldn't be improved and/or how useful this is.
Please review.
Diego
-------------- next part --------------
--- mplayer/input/input.c.atty~ 2005-05-21 18:23:52.000000000 +0200
+++ mplayer/input/input.c 2005-05-25 04:35:52.000000000 +0200
@@ -111,6 +111,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_RUN, "run", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } },
+ { MP_CMD_OSD_SHOW_PROGBAR, "osd_show_progbar", 1, { {MP_CMD_ARG_INT, {0}}, {-1, {0}} } },
{ MP_CMD_VF_CHANGE_RECTANGLE, "change_rectangle", 2, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}}}},
#ifdef HAVE_NEW_GUI
--- mplayer/input/input.h.atty~ 2005-05-21 18:23:52.000000000 +0200
+++ mplayer/input/input.h 2005-05-25 04:35:52.000000000 +0200
@@ -65,6 +65,7 @@
#define MP_CMD_SUB_LOG 61
#define MP_CMD_SWITCH_AUDIO 62
#define MP_CMD_GET_TIME_POS 63
+#define MP_CMD_OSD_SHOW_PROGBAR 64
#define MP_CMD_GUI_EVENTS 5000
#define MP_CMD_GUI_LOADFILE 5001
--- mplayer/mplayer.c.atty~ 2005-05-21 18:23:44.000000000 +0200
+++ mplayer/mplayer.c 2005-05-25 04:35:52.000000000 +0200
@@ -2917,6 +2975,25 @@
}
#endif
} break;
+ case MP_CMD_OSD_SHOW_PROGBAR : {
+ if (osd_level && sh_video) {
+ int len = demuxer_get_time_length(demuxer);
+ int percentage = cmd->args[0].v.i;
+ char percentage_text[10];
+ int pts = len * percentage / 100;
+
+ osd_visible = sh_video->fps; // 1 sec
+ vo_osd_progbar_type = 0;
+ vo_osd_progbar_value = percentage * 256 / 100;
+ vo_osd_changed(OSDTYPE_PROGBAR);
+
+ snprintf(percentage_text, 9, " (%d%%)", percentage);
+
+ osd_show_text = sh_video->fps; // 1 sec
+ snprintf(osd_show_text_buffer, 63, "%c %02d:%02d:%02d / %02d:%02d:%02d%s",
+ OSD_FFW,pts/3600,(pts/60)%60,pts%60,len/3600,(len/60)%60,len%60,percentage_text);
+ }
+ } break;
case MP_CMD_VOLUME : {
int v = cmd->args[0].v.i;
More information about the MPlayer-dev-eng
mailing list