[MPlayer-cvslog] r21177 - in trunk: Gui/mplayer/gtk/opts.c Gui/mplayer/mw.c cfg-common.h cfg-mplayer.h configure find_sub.c libmpcodecs/vf_vo.c libvo/font_load_ft.c libvo/vo_aa.c libvo/vo_caca.c mencoder.c mplayer.c
uau
subversion at mplayerhq.hu
Wed Nov 22 20:21:17 CET 2006
Author: uau
Date: Wed Nov 22 20:21:16 2006
New Revision: 21177
Modified:
trunk/Gui/mplayer/gtk/opts.c
trunk/Gui/mplayer/mw.c
trunk/cfg-common.h
trunk/cfg-mplayer.h
trunk/configure
trunk/find_sub.c
trunk/libmpcodecs/vf_vo.c
trunk/libvo/font_load_ft.c
trunk/libvo/vo_aa.c
trunk/libvo/vo_caca.c
trunk/mencoder.c
trunk/mplayer.c
Log:
Make compilation depending on USE_OSD unconditional.
USE_OSD was hardcoded to true in configure, manually turning it off
would break compilation, and most OSD-related code wasn't affected by it
anyway so it did nothing useful.
Modified: trunk/Gui/mplayer/gtk/opts.c
==============================================================================
--- trunk/Gui/mplayer/gtk/opts.c (original)
+++ trunk/Gui/mplayer/gtk/opts.c Wed Nov 22 20:21:16 2006
@@ -407,13 +407,6 @@
gtk_widget_set_sensitive( SBASSBottomMargin,FALSE );
#endif
-#ifndef USE_OSD
- gtk_widget_set_sensitive( RBOSDNone,FALSE );
- gtk_widget_set_sensitive( RBOSDTandP,FALSE );
- gtk_widget_set_sensitive( RBOSDIndicator,FALSE );
- gtk_widget_set_sensitive( RBOSDTPTT,FALSE );
-#endif
-
// -- signals
gtk_signal_connect( GTK_OBJECT( CBExtraStereo ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)0 );
gtk_signal_connect( GTK_OBJECT( CBNormalize ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)1 );
Modified: trunk/Gui/mplayer/mw.c
==============================================================================
--- trunk/Gui/mplayer/mw.c (original)
+++ trunk/Gui/mplayer/mw.c Wed Nov 22 20:21:16 2006
@@ -263,7 +263,6 @@
// printf( "!!! v: %.2f b: %.2f -> %.2f x %.2f\n",guiIntfStruct.Volume,guiIntfStruct.Balance,l,r );
mixer_setvolume( &mixer,l,r );
}
-#ifdef USE_OSD
if ( osd_level )
{
osd_visible=(GetTimerMS() + 1000) | 1;
@@ -271,7 +270,6 @@
vo_osd_progbar_value=( ( guiIntfStruct.Volume ) * 256.0 ) / 100.0;
vo_osd_changed( OSDTYPE_PROGBAR );
}
-#endif
break;
Modified: trunk/cfg-common.h
==============================================================================
--- trunk/cfg-common.h (original)
+++ trunk/cfg-common.h Wed Nov 22 20:21:16 2006
@@ -288,7 +288,6 @@
{"sub-bg-alpha", &sub_bg_alpha, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
{"sub-no-text-pp", &sub_no_text_pp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"sub-fuzziness", &sub_match_fuzziness, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
-#ifdef USE_OSD
{"font", &font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0, NULL},
{"subpos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
@@ -328,7 +327,6 @@
{"fontconfig", "MPlayer was compiled without fontconfig support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
{"nofontconfig", "MPlayer was compiled without fontconfig support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
#endif
-#endif
#else
Modified: trunk/cfg-mplayer.h
==============================================================================
--- trunk/cfg-mplayer.h (original)
+++ trunk/cfg-mplayer.h Wed Nov 22 20:21:16 2006
@@ -52,9 +52,7 @@
extern int fullscreen;
extern int vidmode;
-#ifdef USE_OSD
extern int osd_level;
-#endif
extern char *ao_outputfilename;
extern int ao_pcm_waveheader;
Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Wed Nov 22 20:21:16 2006
@@ -7531,8 +7531,6 @@
#define PREFIX "$_prefix"
-#define USE_OSD 1
-
/* enable/disable SIGHANDLER */
$_def_sighandler
Modified: trunk/find_sub.c
==============================================================================
--- trunk/find_sub.c (original)
+++ trunk/find_sub.c Wed Nov 22 20:21:16 2006
@@ -4,8 +4,6 @@
#include "config.h"
-#ifdef USE_OSD
-
#include <stdio.h>
#include "libvo/video_out.h"
@@ -151,5 +149,3 @@
vo_sub=NULL; // no sub here
}
-
-#endif
Modified: trunk/libmpcodecs/vf_vo.c
==============================================================================
--- trunk/libmpcodecs/vf_vo.c (original)
+++ trunk/libmpcodecs/vf_vo.c Wed Nov 22 20:21:16 2006
@@ -88,12 +88,10 @@
return(video_out->control(VOCTRL_SET_DEINTERLACE, data)
== VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE;
}
-#ifdef USE_OSD
case VFCTRL_DRAW_OSD:
if(!vo_config_count) return CONTROL_FALSE; // vo not configured?
video_out->draw_osd();
return CONTROL_TRUE;
-#endif
case VFCTRL_FLIP_PAGE:
{
if(!vo_config_count) return CONTROL_FALSE; // vo not configured?
Modified: trunk/libvo/font_load_ft.c
==============================================================================
--- trunk/libvo/font_load_ft.c (original)
+++ trunk/libvo/font_load_ft.c Wed Nov 22 20:21:16 2006
@@ -1150,7 +1150,6 @@
if (vo_font) free_font_desc(vo_font);
-#ifdef USE_OSD
#ifdef HAVE_FONTCONFIG
if (font_fontconfig)
{
@@ -1176,5 +1175,4 @@
else
#endif
vo_font=read_font_desc_ft(font_name, width, height);
-#endif
}
Modified: trunk/libvo/vo_aa.c
==============================================================================
--- trunk/libvo/vo_aa.c (original)
+++ trunk/libvo/vo_aa.c Wed Nov 22 20:21:16 2006
@@ -78,9 +78,7 @@
static int osdx, osdy;
static int osd_text_length = 0;
int aaconfigmode=1;
-#ifdef USE_OSD
font_desc_t* vo_font_save = NULL;
-#endif
static struct SwsContext *sws=NULL;
/* our version of the playmodes :) */
@@ -248,7 +246,6 @@
/* nothing will change its size, be we need some values initialized */
resize();
-#ifdef USE_OSD
/* now init out own 'font' (to use vo_draw_text_sub without edit them) */
if(!vo_font_save) vo_font_save = vo_font;
if(vo_font == vo_font_save) {
@@ -280,7 +277,7 @@
vo_font->pic_b[0]->bmp[i]=i;
}
}
-#endif
+
/* say hello */
osdmessage(5, 1, "Welcome to ASCII ART MPlayer");
@@ -334,11 +331,7 @@
case IMGFMT_RGB24:
case IMGFMT_Y8:
case IMGFMT_Y800:
- return VFCAP_CSP_SUPPORTED|VFCAP_SWSCALE
-#ifdef USE_OSD
- | VFCAP_OSD
-#endif
- ;
+ return VFCAP_CSP_SUPPORTED | VFCAP_SWSCALE | VFCAP_OSD;
}
return 0;
}
@@ -419,9 +412,7 @@
}
}
/* OSD time & playmode , subtitles */
-#ifdef USE_OSD
printosdtext();
-#endif
/* print out */
@@ -516,7 +507,6 @@
if (strstr(c->driver->name,"Curses") || strstr(c->driver->name,"Linux")){
freopen("/dev/tty", "w", stderr);
}
-#ifdef USE_OSD
if(vo_font_save) {
free(vo_font->pic_a[0]->bmp);
free(vo_font->pic_a[0]);
@@ -526,11 +516,9 @@
vo_font = vo_font_save;
vo_font_save = NULL;
}
-#endif
aa_close(c);
}
-#ifdef USE_OSD
static void draw_alpha(int x,int y, int w,int h, unsigned char* src, unsigned char *srca, int stride){
int i,j;
for (i = 0; i < h; i++) {
@@ -553,11 +541,8 @@
}
-#endif
-
static void
draw_osd(void){
-#ifdef USE_OSD
char * vo_osd_text_save;
int vo_osd_progbar_type_save;
@@ -571,7 +556,6 @@
vo_draw_text(aa_scrwidth(c), aa_scrheight(c), draw_alpha);
vo_osd_text=vo_osd_text_save;
vo_osd_progbar_type=vo_osd_progbar_type_save;
-#endif
}
static int
Modified: trunk/libvo/vo_caca.c
==============================================================================
--- trunk/libvo/vo_caca.c (original)
+++ trunk/libvo/vo_caca.c Wed Nov 22 20:21:16 2006
@@ -284,12 +284,10 @@
static void draw_osd(void)
{
-#ifdef USE_OSD
if (vo_osd_progbar_type != -1)
osdpercent(MESSAGE_DURATION, 0, 255,
vo_osd_progbar_value, __sub_osd_names[vo_osd_progbar_type],
"");
-#endif
}
static int preinit(const char *arg)
@@ -318,11 +316,7 @@
static int query_format(uint32_t format)
{
if (format == IMGFMT_BGR24)
- return
-#ifdef USE_OSD
- VFCAP_OSD |
-#endif
- VFCAP_CSP_SUPPORTED;
+ return VFCAP_OSD | VFCAP_CSP_SUPPORTED;
return 0;
}
Modified: trunk/mencoder.c
==============================================================================
--- trunk/mencoder.c (original)
+++ trunk/mencoder.c Wed Nov 22 20:21:16 2006
@@ -520,7 +520,6 @@
#endif
// check font
-#ifdef USE_OSD
#ifdef HAVE_FREETYPE
init_freetype();
#endif
@@ -542,7 +541,6 @@
#ifdef HAVE_FONTCONFIG
}
#endif
-#endif
vo_init_osd();
Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c (original)
+++ trunk/mplayer.c Wed Nov 22 20:21:16 2006
@@ -1443,14 +1443,6 @@
return NULL;
}
-// Make a define to test if we are using the term OSD without having
-// to #ifdef USE_OSD all the time.
-#ifdef USE_OSD
-#define use_term_osd (term_osd && !sh_video)
-#else
-#define use_term_osd (term_osd)
-#endif
-
/**
* \brief Display the OSD bar.
*
@@ -1462,7 +1454,6 @@
if(osd_level < 1) return;
-#ifdef USE_OSD
if(sh_video) {
osd_visible = (GetTimerMS() + 1000) | 1;
vo_osd_progbar_type = type;
@@ -1470,7 +1461,6 @@
vo_osd_changed(OSDTYPE_PROGBAR);
return;
}
-#endif
set_osd_msg(OSD_MSG_BAR,1,osd_duration,"%s: %d %%",
name,ROUND(100*(val-min)/(max-min)));
@@ -1491,24 +1481,19 @@
static char osd_text[64] = "";
static char osd_text_timer[64];
-#ifdef USE_OSD
// we need some mem for vo_osd_text
vo_osd_text = (unsigned char*)osd_text;
-#endif
// Look if we have a msg
if((msg = get_osd_msg())) {
if(strcmp(osd_text,msg->msg)) {
strncpy((char*)osd_text, msg->msg, 63);
-#ifdef USE_OSD
if(sh_video) vo_osd_changed(OSDTYPE_OSD); else
-#endif
if(term_osd) mp_msg(MSGT_CPLAYER,MSGL_STATUS,"%s%s\n",term_osd_esc,msg->msg);
}
return;
}
-#ifdef USE_OSD
if(sh_video) {
// fallback on the timer
if(osd_level>=2) {
@@ -1547,7 +1532,6 @@
}
return;
}
-#endif
// Clear the term osd line
if(term_osd && osd_text[0]) {
@@ -3435,7 +3419,7 @@
// Small hack to display the pause message on the OSD line.
// The pause string is: "\n == PAUSE == \r" so we need to
// take the first and the last char out
- if (use_term_osd) {
+ if (term_osd && !sh_video) {
char msg[128] = MSGTR_Paused;
int mlen = strlen(msg);
msg[mlen-1] = '\0';
@@ -3765,7 +3749,6 @@
//------ load global data first ------
// check font
-#ifdef USE_OSD
#ifdef HAVE_FREETYPE
init_freetype();
#endif
@@ -3788,7 +3771,7 @@
#ifdef HAVE_FONTCONFIG
}
#endif
-#endif /* USE_OSD */
+
vo_init_osd();
#ifdef USE_ASS
@@ -4717,7 +4700,6 @@
current_module="pause";
-#ifdef USE_OSD
if(osd_visible){
// 36000000 means max timed visibility is 1 hour into the future, if
// the difference is greater assume it's wrapped around from below 0
@@ -4729,7 +4711,6 @@
osd_function = OSD_PLAY;
}
}
-#endif
if (osd_function == OSD_PAUSE) {
pause_loop();
@@ -4972,7 +4953,7 @@
} break;
case MP_CMD_OSD : {
int v = cmd->args[0].v.i;
- int max = use_term_osd ? MAX_TERM_OSD_LEVEL : MAX_OSD_LEVEL;
+ int max = (term_osd && !sh_video) ? MAX_TERM_OSD_LEVEL : MAX_OSD_LEVEL;
if(osd_level > max) osd_level = max;
if(v < 0)
osd_level=(osd_level+1)%(max+1);
More information about the MPlayer-cvslog
mailing list