mirror of
https://github.com/mpv-player/mpv
synced 2025-04-11 04:01:31 +00:00
Add osd_show_progression: Show progress bar and elapsed/total time.
Patch by Hugo Chargois, hugo D chargois A free fr git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31028 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8305385bb7
commit
543504363f
@ -297,6 +297,8 @@ Mache einen Schnappschuss.
|
||||
Beginne/beende die Aufnahme von Schnappschüssen.
|
||||
.IPs "I\ \ \ \ "
|
||||
Zeige den Dateinamen im OSD.
|
||||
.IPs "P\ \ \ \ "
|
||||
Zeige den Fortschrittsbalken, die abgelaufene Zeit und die Gesamtzeit im OSD.
|
||||
.IPs "! und @"
|
||||
Spult zum Anfang des vorigen/nächsten Kapitels.
|
||||
.IPs "D (nur bei \-vo xvmc, \-vf yadif, \-vf kerndeint)"
|
||||
|
@ -286,6 +286,8 @@ Take a screenshot.
|
||||
Start/stop taking screenshots.
|
||||
.IPs "I\ \ \ \ "
|
||||
Show filename on the OSD.
|
||||
.IPs "P\ \ \ \ "
|
||||
Show progression bar, elapsed time and total duration on the OSD.
|
||||
.IPs "! and @"
|
||||
Seek to the beginning of the previous/next chapter.
|
||||
.IPs "D (\-vo xvmc, \-vo vdpau, \-vf yadif, \-vf kerndeint only)"
|
||||
|
@ -303,6 +303,8 @@ R
|
||||
Amorce/arrête la capture d'écran.
|
||||
.IPs "I\ \ \ \ "
|
||||
Affiche le nom de fichier dans l'OSD.
|
||||
.IPs "P\ \ \ \ "
|
||||
Affiche la barre d'avancement, le temps écoulé et la durée totale sur l'OSD.
|
||||
.IPs "! and @"
|
||||
Saute au début du chapitre précédent/suivant.
|
||||
.IPs "D (\-vo xvmc, \-vo vdpau, \-vf yadif et \-vf kerndeint uniquement)"
|
||||
|
@ -201,6 +201,10 @@ mute [value]
|
||||
osd [level]
|
||||
Toggle OSD mode or set it to [level] when [level] >= 0.
|
||||
|
||||
osd_show_progression
|
||||
Show the progression bar, the elapsed time and the total duration of the
|
||||
movie on the OSD.
|
||||
|
||||
osd_show_property_text <string> [duration] [level]
|
||||
Show an expanded property string on the OSD, see -playing-msg for a
|
||||
description of the available expansions. If [duration] is >= 0 the text
|
||||
|
11
command.c
11
command.c
@ -2763,6 +2763,17 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd)
|
||||
brk_cmd = 1;
|
||||
break;
|
||||
|
||||
case MP_CMD_OSD_SHOW_PROGRESSION:{
|
||||
int len = demuxer_get_time_length(mpctx->demuxer);
|
||||
int pts = demuxer_get_current_time(mpctx->demuxer);
|
||||
set_osd_bar(0, "Position", 0, 100, demuxer_get_percent_pos(mpctx->demuxer));
|
||||
set_osd_msg(OSD_MSG_TEXT, 1, osd_duration,
|
||||
"%c %02d:%02d:%02d / %02d:%02d:%02d",
|
||||
mpctx->osd_function, pts/3600, (pts/60)%60, pts%60,
|
||||
len/3600, (len/60)%60, len%60);
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_RADIO
|
||||
case MP_CMD_RADIO_STEP_CHANNEL:
|
||||
if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO) {
|
||||
|
@ -41,6 +41,7 @@ INS alt_src_step 1
|
||||
DEL alt_src_step -1
|
||||
o osd
|
||||
I osd_show_property_text "${filename}" # display filename in osd
|
||||
P osd_show_progression
|
||||
z sub_delay -0.1 # subtract 100 ms delay from subs
|
||||
x sub_delay +0.1 # add
|
||||
9 volume -1
|
||||
|
@ -94,6 +94,7 @@ static const mp_cmd_t mp_cmds[] = {
|
||||
{ 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}}, {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_OSD_SHOW_PROGRESSION, "osd_show_progression", 0, { {-1,{0}} } },
|
||||
{ MP_CMD_VOLUME, "volume", 1, { { MP_CMD_ARG_FLOAT,{0} }, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
|
||||
{ MP_CMD_BALANCE, "balance", 1, { { MP_CMD_ARG_FLOAT,{0} }, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
|
||||
{ MP_CMD_MIXER_USEMASTER, "use_master", 0, { {-1,{0}} } },
|
||||
@ -400,6 +401,7 @@ static const mp_cmd_bind_t def_cmd_binds[] = {
|
||||
{ { KEY_DEL, 0 }, "alt_src_step -1" },
|
||||
{ { 'o', 0 }, "osd" },
|
||||
{ { 'I', 0 }, "osd_show_property_text \"${filename}\"" },
|
||||
{ { 'P', 0 }, "osd_show_progression" },
|
||||
{ { 'z', 0 }, "sub_delay -0.1" },
|
||||
{ { 'x', 0 }, "sub_delay +0.1" },
|
||||
{ { 'g', 0 }, "sub_step -1" },
|
||||
|
@ -94,6 +94,7 @@ typedef enum {
|
||||
MP_CMD_SET_PROPERTY,
|
||||
MP_CMD_GET_PROPERTY,
|
||||
MP_CMD_OSD_SHOW_PROPERTY_TEXT,
|
||||
MP_CMD_OSD_SHOW_PROGRESSION,
|
||||
MP_CMD_SEEK_CHAPTER,
|
||||
MP_CMD_FILE_FILTER,
|
||||
MP_CMD_GET_FILENAME,
|
||||
|
Loading…
Reference in New Issue
Block a user