mirror of https://github.com/mpv-player/mpv
new option: -font
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@213 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
95a0de994a
commit
920d015335
|
@ -10,6 +10,7 @@ struct config conf[]={
|
|||
{"vo", &video_driver, CONF_TYPE_STRING, 0, 0, 0},
|
||||
{"dsp", &dsp, CONF_TYPE_STRING, 0, 0, 0},
|
||||
{"encode", &encode_name, CONF_TYPE_STRING, 0, 0, 0},
|
||||
{"font", &font_name, CONF_TYPE_STRING, 0, 0, 0},
|
||||
{"bg", &play_in_bg, CONF_TYPE_FLAG, 0, 0, 1},
|
||||
{"nobg", &play_in_bg, CONF_TYPE_FLAG, 0, 1, 0},
|
||||
{"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0},
|
||||
|
|
13
mplayer.c
13
mplayer.c
|
@ -413,6 +413,7 @@ char *dsp="/dev/dsp";
|
|||
int force_ni=0;
|
||||
char *conffile;
|
||||
int conffile_fd;
|
||||
char *font_name=NULL;
|
||||
#include "cfg-mplayer.h"
|
||||
|
||||
printf("%s",banner_text);
|
||||
|
@ -458,6 +459,12 @@ if(video_driver && strcmp(video_driver,"help")==0){
|
|||
exit(0);
|
||||
}
|
||||
|
||||
// check font
|
||||
if(font_name){
|
||||
vo_font=read_font_desc(font_name);
|
||||
if(!vo_font) printf("Can't load font: %s\n",font_name);
|
||||
}
|
||||
|
||||
// check video_out driver name:
|
||||
if(!video_driver)
|
||||
video_out=video_out_drivers[0];
|
||||
|
@ -1134,6 +1141,7 @@ double video_time_usage=0;
|
|||
double vout_time_usage=0;
|
||||
double audio_time_usage=0;
|
||||
int grab_frames=0;
|
||||
char osd_text_buffer[64];
|
||||
|
||||
#ifdef HAVE_LIRC
|
||||
lirc_mp_setup();
|
||||
|
@ -1912,6 +1920,11 @@ switch(has_video){
|
|||
} // while(v_frame<a_frame || force_redraw)
|
||||
|
||||
|
||||
//================= Update OSD ====================
|
||||
|
||||
sprintf(osd_text_buffer,"%02d:%02d:%02d",(int)v_pts/3600,((int)v_pts/60)%60,((int)v_pts)%60);
|
||||
vo_osd_text=osd_text_buffer;
|
||||
|
||||
//================= Keyboard events, SEEKing ====================
|
||||
|
||||
{ int rel_seek_secs=0;
|
||||
|
|
Loading…
Reference in New Issue