[Mplayer-cvslog] CVS: main Makefile,1.279,1.280 configure,1.818,1.819 mplayer.c,1.737,1.738 mencoder.c,1.224,1.225
Alex Beregszaszi
alex at mplayerhq.hu
Mon Dec 8 13:11:54 CET 2003
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv12542
Modified Files:
Makefile configure mplayer.c mencoder.c
Log Message:
Fontconfig support based on patch by Arwed von Merkatz <v.merkatz at gmx.net>, but slightly reworked
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.279
retrieving revision 1.280
diff -u -r1.279 -r1.280
--- Makefile 8 Dec 2003 11:21:59 -0000 1.279
+++ Makefile 8 Dec 2003 12:11:28 -0000 1.280
@@ -36,9 +36,9 @@
VO_LIBS = $(AA_LIB) $(X_LIB) $(SDL_LIB) $(GGI_LIB) $(MP1E_LIB) $(MLIB_LIB) $(SVGA_LIB) $(DIRECTFB_LIB)
AO_LIBS = $(ARTS_LIB) $(ESD_LIB) $(NAS_LIB) $(SGIAUDIO_LIB)
CODEC_LIBS = $(AV_LIB) $(FAME_LIB) $(MAD_LIB) $(VORBIS_LIB) $(THEORA_LIB) $(FAAD_LIB) $(LIBLZO_LIB) $(DECORE_LIB) $(XVID_LIB) $(PNG_LIB) $(Z_LIB) $(JPEG_LIB) $(ALSA_LIB) $(XMMS_LIB) $(MATROSKA_LIB)
-COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(CSS_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(MPLAYER_NETWORK_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) $(SMBSUPPORT_LIB) $(FRIBIDI_LIB) $(FLAC_LIB)
+COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(CSS_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(MPLAYER_NETWORK_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) $(SMBSUPPORT_LIB) $(FRIBIDI_LIB) $(FLAC_LIB) $(FONTCONFIG_LIB)
-CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(FREETYPE_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(SDL_INC) $(X11_INC) $(FRIBIDI_INC) $(DVB_INC) $(XVID_INC) # -Wall
+CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(FREETYPE_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(SDL_INC) $(X11_INC) $(FRIBIDI_INC) $(DVB_INC) $(XVID_INC) $(FONTCONFIG_INC) # -Wall
PARTS = libmpdemux libmpcodecs mp3lib liba52 libmpeg2 libavcodec libao2 drivers osdep postproc input libvo libaf
ifeq ($(INTERNAL_FAAD),yes)
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.818
retrieving revision 1.819
diff -u -r1.818 -r1.819
--- configure 7 Dec 2003 15:26:12 -0000 1.818
+++ configure 8 Dec 2003 12:11:29 -0000 1.819
@@ -175,6 +175,7 @@
--disable-css Disable old-style libcss DVD support [autodetect]
--disable-cdparanoia Disable cdparanoia support [autodetect]
--disable-freetype Disable freetype2 font rendering support [autodetect]
+ --disable-fontconfig Disable fontconfig font lookup support [autodetect]
--disable-unrarlib Disable Unique RAR File Library [enabled]
--enable-menu Enable OSD menu support (NOT DVD MENU) [disabled]
--disable-sortsub Disable subtitles sorting [enabled]
@@ -1185,6 +1186,7 @@
_cdparanoia=auto
_big_endian=auto
_freetype=auto
+_fontconfig=auto
_shared_pp=no
_menu=no
_qtx=auto
@@ -1400,6 +1402,8 @@
--disable-big-endian) _big_endian=no ;;
--enable-freetype) _freetype=yes ;;
--disable-freetype) _freetype=no ;;
+ --enable-fontconfig) _fontconfig=yes ;;
+ --disable-fontconfig) _fontconfig=no ;;
--enable-unrarlib) _unrarlib=yes ;;
--disable-unrarlib) _unrarlib=no ;;
--enable-ftp) _ftp=yes ;;
@@ -4274,6 +4278,40 @@
fi
echores "$_freetype"
+if test "$_freetype" = no ; then
+ _fontconfig=no
+fi
+echocheck "fontconfig"
+if test "$_fontconfig" = auto ; then
+ if ( pkg-config fontconfig --modversion) > /dev/null 2>&1 ; then
+ cat > $TMPC << EOF
+#include <stdio.h>
+#include <fontconfig/fontconfig.h>
+int main()
+{
+ int err = FcInit();
+ if(err == FcFalse){
+ printf("Couldn't initialize fontconfig lib\n");
+ exit(err);
+ }
+ return 0;
+
+}
+EOF
+ _fontconfig=no
+ cc_check `pkg-config fontconfig --cflags --libs` && ( $TMPO >> "$TMPLOG" ) && _fontconfig=yes
+ else
+ _fontconfig=no
+ fi
+fi
+if test "$_fontconfig" = yes ; then
+ _def_fontconfig='#define HAVE_FONTCONFIG'
+ _inc_fontconfig=`pkg-config fontconfig --cflags`
+ _ld_fontconfig=`pkg-config fontconfig --libs`
+else
+ _def_fontconfig='#undef HAVE_FONTCONFIG'
+fi
+echores "$_fontconfig"
echocheck "fribidi with charsets"
if test "$_fribidi" = yes ; then
@@ -5887,6 +5925,8 @@
CDPARANOIA_LIB = $_ld_cdparanoia
FREETYPE_INC = $_inc_freetype
FREETYPE_LIB = $_ld_freetype
+FONTCONFIG_INC = $_inc_fontconfig
+FONTCONFIG_LIB = $_ld_fontconfig
FRIBIDI_INC = $_inc_fribidi
FRIBIDI_LIB = $_ld_fribidi
LIBLZO_LIB= $_ld_liblzo
@@ -6340,6 +6380,9 @@
/* enable FreeType support */
$_def_freetype
+
+/* enable Fontconfig support */
+$_def_fontconfig
/* enable FriBiDi usage */
$_def_fribidi
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.737
retrieving revision 1.738
diff -u -r1.737 -r1.738
--- mplayer.c 30 Nov 2003 16:35:38 -0000 1.737
+++ mplayer.c 8 Dec 2003 12:11:29 -0000 1.738
@@ -288,6 +288,9 @@
// sub:
char *font_name=NULL;
+#ifdef HAVE_FONTCONFIG
+int font_fontconfig=0;
+#endif
float font_factor=0.75;
char **sub_name=NULL;
float sub_delay=0;
@@ -1058,8 +1061,15 @@
//------ load global data first ------
-#ifdef USE_OSD
// check font
+#ifdef USE_OSD
+#ifdef HAVE_FREETYPE
+ init_freetype();
+#endif
+#ifdef HAVE_FONTCONFIG
+ if(!font_fontconfig)
+ {
+#endif
if(font_name){
vo_font=read_font_desc(font_name,font_factor,verbose>1);
if(!vo_font) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadFont,font_name);
@@ -1069,9 +1079,8 @@
if(!vo_font)
vo_font=read_font_desc(MPLAYER_DATADIR "/font/font.desc",font_factor,verbose>1);
}
-#ifdef HAVE_FREETYPE
- if (!vo_font)
- init_freetype();
+#ifdef HAVE_FONTCONFIG
+ }
#endif
#endif
vo_init_osd();
@@ -1373,7 +1382,9 @@
#endif
// CACHE2: initial prefill: 20% later: 5% (should be set by -cacheopts)
+#ifdef HAS_DVBIN_SUPPORT
goto_enable_cache:
+#endif
if(stream_cache_size>0){
current_module="enable_cache";
if(!stream_enable_cache(stream,stream_cache_size*1024,stream_cache_size*1024/5,stream_cache_size*1024/20))
Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.224
retrieving revision 1.225
diff -u -r1.224 -r1.225
--- mencoder.c 8 Dec 2003 09:32:40 -0000 1.224
+++ mencoder.c 8 Dec 2003 12:11:29 -0000 1.225
@@ -175,6 +175,9 @@
// sub:
char *font_name=NULL;
+#ifdef HAVE_FONTCONFIG
+int font_fontconfig=0;
+#endif
float font_factor=0.75;
char **sub_name=NULL;
float sub_delay=0;
@@ -443,7 +446,11 @@
#ifdef USE_OSD
#ifdef HAVE_FREETYPE
init_freetype();
-#else
+#endif
+#ifdef HAVE_FONTCONFIG
+ if(!font_fontconfig)
+ {
+#endif
if(font_name){
vo_font=read_font_desc(font_name,font_factor,verbose>1);
if(!vo_font) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadFont,font_name);
@@ -452,6 +459,8 @@
vo_font=read_font_desc(get_path("font/font.desc"),font_factor,verbose>1);
if(!vo_font)
vo_font=read_font_desc(MPLAYER_DATADIR "/font/font.desc",font_factor,verbose>1);
+ }
+#ifdef HAVE_FONTCONFIG
}
#endif
#endif
More information about the MPlayer-cvslog
mailing list