summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-05-01 08:18:50 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-05-01 08:18:50 +0300
commitbec3b84f5ef798ab843028dd62018571a50330ed (patch)
treea1805e73289111518e6343d255da1085736cb7f1
parent9d27862072a233b423d4a81e966b1ba9627724a6 (diff)
parent19c9e0aceb9620c862cab91b509df91931821d66 (diff)
downloadmpv-bec3b84f5ef798ab843028dd62018571a50330ed.tar.bz2
mpv-bec3b84f5ef798ab843028dd62018571a50330ed.tar.xz
Merge svn changes up to r26624
Conflicts: Makefile
-rw-r--r--Makefile136
-rw-r--r--TOOLS/asfinfo.c6
-rw-r--r--TOOLS/fastmemcpybench.c2
-rw-r--r--TOOLS/modify_reg.c2
-rw-r--r--TOOLS/movinfo.c14
-rw-r--r--TOOLS/netstream.c2
-rw-r--r--TOOLS/subrip.c6
-rw-r--r--TOOLS/vfw2menc.c7
-rw-r--r--TOOLS/vivodump.c5
-rwxr-xr-xconfigure2
-rw-r--r--etc/codecs.conf8
-rw-r--r--libass/ass.h5
-rw-r--r--libass/ass_fontconfig.c38
-rw-r--r--libass/ass_fontconfig.h2
-rw-r--r--libass/ass_mp.c5
-rw-r--r--libass/ass_render.c14
-rw-r--r--libmenu/menu_cmdlist.c1
-rw-r--r--libmpdemux/muxer.c2
-rw-r--r--libmpdemux/muxer_lavf.c1
-rw-r--r--libmpdemux/muxer_mpeg.c1
-rw-r--r--libmpdemux/muxer_rawvideo.c2
-rw-r--r--libvo/aspecttest.c2
-rw-r--r--osdep/mplayer.rc4
23 files changed, 154 insertions, 113 deletions
diff --git a/Makefile b/Makefile
index 7dd96652ec..9af84f9c17 100644
--- a/Makefile
+++ b/Makefile
@@ -358,14 +358,14 @@ SRCS_COMMON-$(LIBVORBIS) += libmpcodecs/ad_libvorbis.c \
SRCS_COMMON-$(MACOSX_FINDER_SUPPORT) += osdep/macosx_finder_args.c
SRCS_COMMON-$(MP3LIB) += libmpcodecs/ad_mp3lib.c mp3lib/sr1.c
SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32) += mp3lib/decode_i586.c
-SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_3DNOW) += mp3lib/dct36_3dnow.c \
- mp3lib/dct64_3dnow.c
-SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_3DNOWEX) += mp3lib/dct36_k7.c \
- mp3lib/dct64_k7.c
-SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_MMX) += mp3lib/dct64_mmx.c
+SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_3DNOW) += mp3lib/dct36_3dnow.c \
+ mp3lib/dct64_3dnow.c
+SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_3DNOWEX) += mp3lib/dct36_k7.c \
+ mp3lib/dct64_k7.c
+SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_MMX) += mp3lib/dct64_mmx.c
SRCS_COMMON-$(MP3LIB)-$(HAVE_ALTIVEC) += mp3lib/dct64_altivec.c
-SRCS_COMMON-$(MP3LIB)-$(HAVE_MMX) += mp3lib/decode_mmx.c
-SRCS_COMMON-$(MP3LIB)-$(HAVE_SSE) += mp3lib/dct64_sse.c
+SRCS_COMMON-$(MP3LIB)-$(HAVE_MMX) += mp3lib/decode_mmx.c
+SRCS_COMMON-$(MP3LIB)-$(HAVE_SSE) += mp3lib/dct64_sse.c
SRCS_COMMON-$(MPLAYER_NETWORK) += stream/stream_netstream.c \
stream/asf_mmst_streaming.c \
stream/asf_streaming.c \
@@ -485,7 +485,6 @@ SRCS_COMMON-$(XVID4) += libmpcodecs/vd_xvid4.c
SRCS_COMMON-$(ZORAN) += libmpcodecs/vd_zrmjpeg.c \
libmpcodecs/vf_zrmjpeg.c
-
SRCS_MPLAYER = mplayer.c \
m_property.c \
mp_fifo.c \
@@ -560,7 +559,7 @@ SRCS_MPLAYER-$(LIBMENU) += libmenu/menu.c \
libmenu/vf_menu.c \
SRCS_MPLAYER-$(LIBMENU_DVBIN) += libmenu/menu_dvbin.c
-SRCS_MPLAYER-$(LIRC) += input/lirc.c
+SRCS_MPLAYER-$(LIRC) += input/lirc.c
SRCS_MPLAYER-$(VIDIX) += libvo/vosub_vidix.c \
vidix/vidixlib.c \
@@ -571,21 +570,19 @@ SRCS_MPLAYER-$(VIDIX) += libvo/vosub_vidix.c \
vidix/pci_names.c \
vidix/pci_dev_ids.c\
-SRCS_MPLAYER-$(VIDIX_CYBERBLADE) += vidix/cyberblade_vid.c
-SRCS_MPLAYER-$(VIDIX_IVTV) += vidix/ivtv_vid.c
-SRCS_MPLAYER-$(VIDIX_MACH64) += vidix/mach64_vid.c
-SRCS_MPLAYER-$(VIDIX_MGA) += vidix/mga_vid.c
-SRCS_MPLAYER-$(VIDIX_MGA_CRTC2) += vidix/mga_crtc2_vid.c
-SRCS_MPLAYER-$(VIDIX_NVIDIA) += vidix/nvidia_vid.c
-SRCS_MPLAYER-$(VIDIX_PM2) += vidix/pm2_vid.c
-SRCS_MPLAYER-$(VIDIX_PM3) += vidix/pm3_vid.c
-SRCS_MPLAYER-$(VIDIX_RADEON) += vidix/radeon_vid.c
-SRCS_MPLAYER-$(VIDIX_RAGE128) += vidix/rage128_vid.c
-SRCS_MPLAYER-$(VIDIX_S3) += vidix/s3_vid.c
-SRCS_MPLAYER-$(VIDIX_SIS) += vidix/sis_vid.c vidix/sis_bridge.c
-SRCS_MPLAYER-$(VIDIX_UNICHROME) += vidix/unichrome_vid.c
-
-OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mplayer-rc.o
+SRCS_MPLAYER-$(VIDIX_CYBERBLADE) += vidix/cyberblade_vid.c
+SRCS_MPLAYER-$(VIDIX_IVTV) += vidix/ivtv_vid.c
+SRCS_MPLAYER-$(VIDIX_MACH64) += vidix/mach64_vid.c
+SRCS_MPLAYER-$(VIDIX_MGA) += vidix/mga_vid.c
+SRCS_MPLAYER-$(VIDIX_MGA_CRTC2) += vidix/mga_crtc2_vid.c
+SRCS_MPLAYER-$(VIDIX_NVIDIA) += vidix/nvidia_vid.c
+SRCS_MPLAYER-$(VIDIX_PM2) += vidix/pm2_vid.c
+SRCS_MPLAYER-$(VIDIX_PM3) += vidix/pm3_vid.c
+SRCS_MPLAYER-$(VIDIX_RADEON) += vidix/radeon_vid.c
+SRCS_MPLAYER-$(VIDIX_RAGE128) += vidix/rage128_vid.c
+SRCS_MPLAYER-$(VIDIX_S3) += vidix/s3_vid.c
+SRCS_MPLAYER-$(VIDIX_SIS) += vidix/sis_vid.c vidix/sis_bridge.c
+SRCS_MPLAYER-$(VIDIX_UNICHROME) += vidix/unichrome_vid.c
SRCS_MENCODER = mencoder.c \
mp_msg-mencoder.c \
@@ -614,30 +611,29 @@ SRCS_MENCODER-$(WIN32DLL) += libmpcodecs/ve_vfw.c
SRCS_MENCODER-$(X264) += libmpcodecs/ve_x264.c
SRCS_MENCODER-$(XVID4) += libmpcodecs/ve_xvid4.c
-COMMON_LIBS = libswscale/libswscale.a \
+SRCS_COMMON += $(SRCS_COMMON-yes) $(SRCS_COMMON-yes-yes) $(SRCS_COMMON-yes-yes-yes)
+SRCS_MENCODER += $(SRCS_MENCODER-yes)
+SRCS_MPLAYER += $(SRCS_MPLAYER-yes)
COMMON_LIBS-$(LIBAVFORMAT_A) += ffmpeg/libavformat/libavformat.a
COMMON_LIBS-$(LIBAVCODEC_A) += ffmpeg/libavcodec/libavcodec.a
COMMON_LIBS-$(LIBAVUTIL_A) += ffmpeg/libavutil/libavutil.a
COMMON_LIBS-$(LIBPOSTPROC_A) += ffmpeg/libpostproc/libpostproc.a
+COMMON_LIBS = libswscale/libswscale.a
+COMMON_LIBS += $(COMMON_LIBS-yes)
-ALL_PRG-$(MPLAYER) += mplayer$(EXESUF)
-ALL_PRG-$(MENCODER) += mencoder$(EXESUF)
-
-COMMON_LIBS += $(COMMON_LIBS-yes)
-OBJS_MPLAYER += $(OBJS_MPLAYER-yes)
-ALL_PRG += $(ALL_PRG-yes)
+OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON)))
+OBJS_MENCODER += $(addsuffix .o, $(basename $(SRCS_MENCODER)))
+OBJS_MPLAYER += $(addsuffix .o, $(basename $(SRCS_MPLAYER)))
+OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mplayer-rc.o
+OBJS_MPLAYER += $(OBJS_MPLAYER-yes)
MPLAYER_DEPS = $(OBJS_MPLAYER) $(OBJS_COMMON) $(COMMON_LIBS)
MENCODER_DEPS = $(OBJS_MENCODER) $(OBJS_COMMON) $(COMMON_LIBS)
-SRCS_COMMON += $(SRCS_COMMON-yes) $(SRCS_COMMON-yes-yes) $(SRCS_COMMON-yes-yes-yes)
-SRCS_MENCODER += $(SRCS_MENCODER-yes)
-SRCS_MPLAYER += $(SRCS_MPLAYER-yes)
-
-OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON)) )
-OBJS_MENCODER += $(addsuffix .o, $(basename $(SRCS_MENCODER)) )
-OBJS_MPLAYER += $(addsuffix .o, $(basename $(SRCS_MPLAYER)) )
+ALL_PRG-$(MPLAYER) += mplayer$(EXESUF)
+ALL_PRG-$(MENCODER) += mencoder$(EXESUF)
+ALL_PRG += $(ALL_PRG-yes)
INSTALL_TARGETS-$(MPLAYER) += install-mplayer install-mplayer-man
INSTALL_TARGETS-$(MENCODER) += install-mencoder install-mplayer-man
@@ -697,7 +693,7 @@ DIRS = . \
TOOLS \
vidix \
-all: $(ALL_PRG)
+all: recurse $(ALL_PRG)
recurse:
for part in $(PARTS); do $(MAKE) -C $$part; done
@@ -717,13 +713,19 @@ recurse:
%.o: %.m
$(CC) $(CFLAGS) -c -o $@ $<
+codec-cfg.d: codecs.conf.h
+mencoder.d mplayer.d vobsub.d gui/win32/gui.d libmpdemux/muxer_avi.d stream/network.d stream/stream_cddb.d: version.h
DEPS = $(filter-out %.S,$(patsubst %.cpp,%.d,$(patsubst %.c,%.d,$(SRCS_COMMON) $(SRCS_MPLAYER:.m=.d) $(SRCS_MENCODER))))
-$(DEPS) recurse: help_mp.h version.h codecs.conf.h
+$(DEPS): help_mp.h
+
dep depend: $(DEPS)
for part in $(PARTS); do $(MAKE) -C $$part depend; done
-# rebuild at every config.h/config.mak change:
-version.h: config.h config.mak
+# rebuild version.h each time the working copy is updated
+ifeq ($(wildcard .svn/entries),.svn/entries)
+version.h: .svn/entries
+endif
+version.h:
./version.sh `$(CC) -dumpversion`
help_mp.h: help/help_mp-en.h $(HELP_FILE)
@@ -751,8 +753,6 @@ endef
$(foreach part,$(PARTS),$(eval $(RECURSIVE_RULE)))
-$(OBJS): recurse
-
mplayer$(EXESUF): $(MPLAYER_DEPS)
$(CC) -o $@ $^ $(LDFLAGS_MPLAYER)
@@ -774,10 +774,7 @@ codec-cfg-test$(EXESUF): codecs.conf.h codec-cfg.h mp_msg.o osdep/getch2.o
osdep/mplayer-rc.o: osdep/mplayer.rc version.h
$(WINDRES) -o $@ $<
-dvdread/%.o dvdread/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE
-ifeq ($(LIBDVDCSS_INTERNAL),yes)
-dvdread/%.o dvdread/%.d: CFLAGS += -Ilibdvdcss -DHAVE_DVDCSS_DVDCSS_H
-endif
+dvdread/%.o dvdread/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE $(LIBDVDCSS_DVDREAD_FLAGS)
libdvdcss/%.o libdvdcss/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\"
libfaad2/%.o libfaad2/%.d: CFLAGS += -Ilibfaad2 -D_GNU_SOURCE
@@ -800,16 +797,29 @@ VIDIX_OBJS = $(filter vidix/%,$(SRCS_MPLAYER:.c=.o))
$(VIDIX_DEPS) $(VIDIX_OBJS): $(VIDIX_PCI_FILES)
-liba52/test: liba52/test.c cpudetect.o $(filter liba52/%,$(SRCS_COMMON:.c=.o))
+TEST_OBJS = mp_msg-mencoder.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
+
+liba52/test$(EXESUF): liba52/test.c cpudetect.o $(filter liba52/%,$(SRCS_COMMON:.c=.o))
-LOADER_TEST_OBJS = $(filter loader/%,$(SRCS_COMMON:.c=.o)) libmpdemux/aviprint.o cpudetect.o mp_msg.o mp_fifo.o osdep/mmap_anon.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
+libvo/aspecttest$(EXESUF): libvo/aspecttest.c libvo/aspect.o libvo/geometry.o $(TEST_OBJS)
-loader/qtx/list loader/qtx/qtxload: CFLAGS += -g
-loader/qtx/list: loader/qtx/list.c $(LOADER_TEST_OBJS)
-loader/qtx/qtxload: loader/qtx/qtxload.c $(LOADER_TEST_OBJS)
+LOADER_TEST_OBJS = $(filter loader/%,$(SRCS_COMMON:.c=.o)) libmpdemux/aviprint.o osdep/mmap_anon.o cpudetect.o $(TEST_OBJS)
-mp3lib/test: mp3lib/test.c $(filter mp3lib/%,$(SRCS_COMMON:.c=.o)) libvo/aclib.o cpudetect.o mp_msg-mencoder.o mp_fifo.o osdep/$(TIMER) osdep/$(GETCH) -ltermcap -lm
-mp3lib/test2: mp3lib/test2.c $(filter mp3lib/%,$(SRCS_COMMON:.c=.o)) libvo/aclib.o cpudetect.o mp_msg-mencoder.o mp_fifo.o osdep/$(TIMER) osdep/$(GETCH) -ltermcap -lm
+loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g
+loader/qtx/list$(EXESUF): loader/qtx/list.c $(LOADER_TEST_OBJS)
+loader/qtx/qtxload$(EXESUF): loader/qtx/qtxload.c $(LOADER_TEST_OBJS)
+
+mp3lib/test$(EXESUF): mp3lib/test.c $(filter mp3lib/%,$(SRCS_COMMON:.c=.o)) libvo/aclib.o cpudetect.o $(TEST_OBJS)
+mp3lib/test2$(EXESUF): mp3lib/test2.c $(filter mp3lib/%,$(SRCS_COMMON:.c=.o)) libvo/aclib.o cpudetect.o $(TEST_OBJS)
+
+TESTS = liba52/test$(EXESUF) libvo/aspecttest$(EXESUF) \
+ loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF) \
+ mp3lib/test$(EXESUF) mp3lib/test2$(EXESUF)
+
+tests: $(TESTS)
+
+testsclean:
+ rm -f $(TESTS)
install: install-dirs $(INSTALL_TARGETS)
@@ -867,11 +877,11 @@ uninstall:
fi ; \
done
-clean: toolsclean
+clean:
rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.o /*.a /*.ho /*~, $(addsuffix $(suffix),$(dir))))
rm -f mplayer$(EXESUF) mencoder$(EXESUF)
-distclean: clean doxygen_clean
+distclean: clean doxygen_clean testsclean toolsclean
rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.d, $(addsuffix $(suffix),$(dir))))
rm -f configure.log config.mak config.h codecs.conf.h help_mp.h \
version.h $(VIDIX_PCI_FILES) \
@@ -925,18 +935,16 @@ ALLTOOLS = $(TOOLS) \
tools: $(TOOLS)
alltools: $(ALLTOOLS)
-TOOLS_COMMON_LIBS = mp_msg-mencoder.o mp_fifo.o osdep/$(TIMER) osdep/$(GETCH) \
- -ltermcap -lm
-
TOOLS/bmovl-test$(EXESUF): TOOLS/bmovl-test.c -lSDL_image
TOOLS/subrip$(EXESUF): TOOLS/subrip.c vobsub.o spudec.o unrar_exec.o \
- libswscale/libswscale.a libavutil/libavutil.a $(TOOLS_COMMON_LIBS)
+ libvo/aclib.o libswscale/libswscale.a libavutil/libavutil.a \
+ $(TEST_OBJS)
TOOLS/vfw2menc$(EXESUF): TOOLS/vfw2menc.c -lwinmm -lole32
#FIXME: Linking is broken, help welcome.
-TOOLS/vivodump$(EXESUF): TOOLS/vivodump.c $(TOOLS_COMMON_LIBS)
+TOOLS/vivodump$(EXESUF): TOOLS/vivodump.c $(TEST_OBJS)
fastmemcpybench: TOOLS/fastmemcpybench.c
$(CC) $(CFLAGS) $< -o TOOLS/fastmem-mmx$(EXESUF) -DNAME=\"mmx\" -DHAVE_MMX
@@ -963,7 +971,7 @@ fastmemcpybench realcodecs: CFLAGS += -g
NETSTREAM_DEPS = libavutil/libavutil.a \
m_option.o \
m_struct.o \
- $(TOOLS_COMMON_LIBS)
+ $(TEST_OBJS)
TOOLS/netstream$(EXESUF): TOOLS/netstream.o $(NETSTREAM_DEPS)
$(CC) $(CFLAGS) -o $@ $^
@@ -974,4 +982,4 @@ toolsclean:
-include $(DEPS)
.PHONY: all doxygen *install* recurse strip *tools
-.PHONY: checkheaders *clean dep depend
+.PHONY: checkheaders *clean dep depend tests
diff --git a/TOOLS/asfinfo.c b/TOOLS/asfinfo.c
index 89e332a4d8..b226dba906 100644
--- a/TOOLS/asfinfo.c
+++ b/TOOLS/asfinfo.c
@@ -89,7 +89,7 @@ unsigned char buffer[8192];
int i;
-char* chunk_type(unsigned char* guid){
+static char* chunk_type(unsigned char* guid){
switch(*((unsigned int*)guid)){
case 0xF8699E40: return "guid_audio_stream";
case 0xBC19EFC0: return "guid_video_stream";
@@ -105,7 +105,7 @@ char* chunk_type(unsigned char* guid){
return NULL;
}
-void print_wave_header(WAVEFORMATEX *h){
+static void print_wave_header(WAVEFORMATEX *h){
printf("======= WAVE Format =======\n");
@@ -135,7 +135,7 @@ void print_wave_header(WAVEFORMATEX *h){
}
-void print_video_header(BITMAPINFOHEADER *h){
+static void print_video_header(BITMAPINFOHEADER *h){
printf("======= VIDEO Format ======\n");
printf(" biSize %ld\n", h->biSize);
printf(" biWidth %ld\n", h->biWidth);
diff --git a/TOOLS/fastmemcpybench.c b/TOOLS/fastmemcpybench.c
index 37693c50e7..b4b2bb6ff9 100644
--- a/TOOLS/fastmemcpybench.c
+++ b/TOOLS/fastmemcpybench.c
@@ -74,7 +74,7 @@ static int mga_init(){
#endif
// Returns current time in microseconds
-unsigned int GetTimer(){
+static unsigned int GetTimer(){
struct timeval tv;
struct timezone tz;
// float s;
diff --git a/TOOLS/modify_reg.c b/TOOLS/modify_reg.c
index 47d802621c..6a05422b47 100644
--- a/TOOLS/modify_reg.c
+++ b/TOOLS/modify_reg.c
@@ -53,7 +53,7 @@ static void remove_key(long handle, const char* name) {
save_registry();
}
-void parse_key(char *raw, HKEY *root, char *path, char *key) {
+static void parse_key(char *raw, HKEY *root, char *path, char *key) {
char *tmpkey, *start;
tmpkey = strrchr(raw, '\\');
if (tmpkey == raw || tmpkey == NULL) {
diff --git a/TOOLS/movinfo.c b/TOOLS/movinfo.c
index 6e997b532b..73849b24a7 100644
--- a/TOOLS/movinfo.c
+++ b/TOOLS/movinfo.c
@@ -22,7 +22,7 @@
#undef NO_SPECIAL
-char *atom2human_type(int type)
+static char *atom2human_type(int type)
{
switch (type)
{
@@ -57,13 +57,13 @@ int stream = S_NONE;
int v_stream = 0;
int a_stream = 0;
-unsigned int read_dword(FILE *f){
+static unsigned int read_dword(FILE *f){
unsigned char atom_size_b[4];
if(fread(&atom_size_b,4,1,f)<=0) return -1;
return (atom_size_b[0]<<24)|(atom_size_b[1]<<16)|(atom_size_b[2]<<8)|atom_size_b[3];
}
-void video_stream_info(FILE *f, int len)
+static void video_stream_info(FILE *f, int len)
{
int orig_pos = ftell(f);
unsigned char data[len-8];
@@ -79,7 +79,7 @@ void video_stream_info(FILE *f, int len)
fseek(f,orig_pos,SEEK_SET);
}
-void audio_stream_info(FILE *f, int len)
+static void audio_stream_info(FILE *f, int len)
{
int orig_pos = ftell(f);
unsigned char data[len-8];
@@ -98,7 +98,8 @@ void audio_stream_info(FILE *f, int len)
fseek(f,orig_pos,SEEK_SET);
}
-void userdata_info(FILE *f, int len, int pos, int level)
+#if 0
+static void userdata_info(FILE *f, int len, int pos, int level)
{
int orig_pos = pos; /*ftell(f);*/
unsigned int atom_size = 1;
@@ -150,10 +151,11 @@ void userdata_info(FILE *f, int len, int pos, int level)
}
fseek(f,orig_pos,SEEK_SET);
}
+#endif
int time_scale = 0;
-void lschunks(FILE *f,int level,unsigned int endpos){
+static void lschunks(FILE *f,int level,unsigned int endpos){
unsigned int atom_size;
unsigned int atom_type;
int pos;
diff --git a/TOOLS/netstream.c b/TOOLS/netstream.c
index 7917811a93..a2b5bd3768 100644
--- a/TOOLS/netstream.c
+++ b/TOOLS/netstream.c
@@ -181,7 +181,7 @@ static int net_stream_close(client_t* cl) {
return 1;
}
-int handle_client(client_t* cl,mp_net_stream_packet_t* pack) {
+static int handle_client(client_t* cl,mp_net_stream_packet_t* pack) {
if(!pack)
return 0;
diff --git a/TOOLS/subrip.c b/TOOLS/subrip.c
index 82a401a253..2c783394a5 100644
--- a/TOOLS/subrip.c
+++ b/TOOLS/subrip.c
@@ -187,12 +187,6 @@ draw_alpha(int x0, int y0, int w, int h, unsigned char *src, unsigned char *srca
unlink(tmpfname);
}
-void
-fast_memcpy(void *a, void *b, int s)
-{ //FIXME
- memcpy(a, b, s);
-}
-
int
main(int argc, char **argv)
{
diff --git a/TOOLS/vfw2menc.c b/TOOLS/vfw2menc.c
index 91a2cde3ca..b15b773a05 100644
--- a/TOOLS/vfw2menc.c
+++ b/TOOLS/vfw2menc.c
@@ -33,6 +33,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/stat.h>
#include <getopt.h>
#include <windows.h>
@@ -59,7 +60,7 @@ enum
MODE_VIEW
};
-int save_settings(HDRVR hDriver, const char *filename)
+static int save_settings(HDRVR hDriver, const char *filename)
{
FILE *fd = NULL;
DWORD cb = (DWORD) SendDriverMessage(hDriver, ICM_GETSTATE, 0, 0);
@@ -99,7 +100,7 @@ int save_settings(HDRVR hDriver, const char *filename)
return 0;
}
-int load_settings(HDRVR hDriver, const char *filename)
+static int load_settings(HDRVR hDriver, const char *filename)
{
struct stat info;
FILE *fd = NULL;
@@ -150,7 +151,7 @@ static struct option long_options[] =
{ 0, 0, 0, 0 }
};
-void help(const char *progname)
+static void help(const char *progname)
{
printf("VFW to mencoder v"VERSION" - Copyright 2007 - Gianluigi Tiesi <sherpya@netfarm.it>\n");
printf("This program is Free Software\n\n");
diff --git a/TOOLS/vivodump.c b/TOOLS/vivodump.c
index bd6d3db3a1..fe1cd90d77 100644
--- a/TOOLS/vivodump.c
+++ b/TOOLS/vivodump.c
@@ -4,7 +4,6 @@
#include <inttypes.h>
#include "loader/wine/mmreg.h"
-#include "loader/wine/avifmt.h"
#include "loader/wine/vfw.h"
#include "stream/stream.h"
@@ -34,7 +33,7 @@ int bufptr=0;
int bitcnt=0;
unsigned char buf=0;
-unsigned int x_get_bits(int n){
+static unsigned int x_get_bits(int n){
unsigned int x=0;
while(n-->0){
if(!bitcnt){
@@ -59,7 +58,7 @@ int width=320;
int height=240;
/* most is hardcoded. should extend to handle all h263 streams */
-int h263_decode_picture_header(unsigned char *b_ptr)
+static int h263_decode_picture_header(unsigned char *b_ptr)
{
int i;
diff --git a/configure b/configure
index be33c779da..b8071473b4 100755
--- a/configure
+++ b/configure
@@ -5490,6 +5490,7 @@ if test "$_libdvdcss_internal" = yes ; then
_def_dvd_darwin='#define DARWIN_DVD_IOCTL'
_ld_extra="$_ld_extra -framework IOKit"
fi
+ _libdvdcss_dvdread_flags="-Ilibdvdcss -DHAVE_DVDCSS_DVDCSS_H"
_inputmodules="libdvdcss(internal) $_inputmodules"
_largefiles=yes
else
@@ -7789,6 +7790,7 @@ VCD = $_vcd
DVDREAD = $_dvdread
DVDREAD_INTERNAL = $_dvdread_internal
LIBDVDCSS_INTERNAL = $_libdvdcss_internal
+LIBDVDCSS_DVDREAD_FLAGS = $_libdvdcss_dvdread_flags
DVDNAV = $_dvdnav
WIN32DLL = $_win32dll
WIN32_EMULATION = $_win32_emulation
diff --git a/etc/codecs.conf b/etc/codecs.conf
index f30ed61d29..0ce6f6d016 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -1752,7 +1752,7 @@ videocodec ffvmnc
status working
fourcc VMnc
driver ffmpeg
- dll "VMware video"
+ dll "vmnc"
out BGR32,BGR15,BGR8
videocodec vmnc
@@ -2520,7 +2520,7 @@ audiocodec ffatrc
format 0x63727461 ; "atrc"
format 0x270 ; atrac3 in wav
driver ffmpeg
- dll "atrac 3"
+ dll "atrac3"
audiocodec ra144
info "RealAudio 1.0"
@@ -3092,7 +3092,7 @@ audiocodec ffmusepack7
status working
fourcc "MPC "
driver ffmpeg
- dll "mpc sv7"
+ dll "mpc7"
audiocodec ffmusepack8
info "Musepack sv8 audio codec"
@@ -3100,7 +3100,7 @@ audiocodec ffmusepack8
status working
fourcc "MPC8"
driver ffmpeg
- dll "mpc sv8"
+ dll "mpc8"
audiocodec musepack
info "Musepack audio codec"
diff --git a/libass/ass.h b/libass/ass.h
index 851be6681d..9710ae7276 100644
--- a/libass/ass.h
+++ b/libass/ass.h
@@ -94,6 +94,11 @@ void ass_set_line_spacing(ass_renderer_t* priv, double line_spacing);
int ass_set_fonts(ass_renderer_t* priv, const char* default_font, const char* default_family);
/**
+ * \brief set font lookup defaults, don't use fontconfig even if it is available
+ */
+int ass_set_fonts_nofc(ass_renderer_t* priv, const char* default_font, const char* default_family);
+
+/**
* \brief render a frame, producing a list of ass_image_t
* \param priv library
* \param track subtitle track
diff --git a/libass/ass_fontconfig.c b/libass/ass_fontconfig.c
index addcc82646..610ab28dc2 100644
--- a/libass/ass_fontconfig.c
+++ b/libass/ass_fontconfig.c
@@ -40,8 +40,6 @@
#include <fontconfig/fcfreetype.h>
#endif
-extern int font_fontconfig;
-
struct fc_instance_s {
#ifdef HAVE_FONTCONFIG
FcConfig* config;
@@ -83,6 +81,26 @@ static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold
goto error;
FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)family);
+
+ // In SSA/ASS fonts are sometimes referenced by their "full name",
+ // which is usually a concatenation of family name and font
+ // style (ex. Ottawa Bold). Full name is available from
+ // FontConfig pattern element FC_FULLNAME, but it is never
+ // used for font matching.
+ // Therefore, I'm removing words from the end of the name one
+ // by one, and adding shortened names to the pattern. It seems
+ // that the first value (full name in this case) has
+ // precedence in matching.
+ // An alternative approach could be to reimplement FcFontSort
+ // using FC_FULLNAME instead of FC_FAMILY.
+ if (strchr(family, ' ')) {
+ char *p, *s = strdup(family);
+ while (p = strrchr(s, ' ')) {
+ *p = '\0';
+ FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)s);
+ }
+ free(s);
+ }
FcPatternAddBool(pat, FC_OUTLINE, FcTrue);
FcPatternAddInteger(pat, FC_SLANT, italic);
FcPatternAddInteger(pat, FC_WEIGHT, bold);
@@ -126,9 +144,12 @@ static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold
if (result != FcResultMatch)
goto error;
- if (strcasecmp((const char*)val_s, family) != 0)
- mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_SelectedFontFamilyIsNotTheRequestedOne,
- (const char*)val_s, family);
+ if (strcasecmp((const char*)val_s, family) != 0) {
+ result = FcPatternGetString(rpat, FC_FULLNAME, 0, &val_s);
+ if (result != FcResultMatch || strcasecmp((const char*)val_s, family) != 0)
+ mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_SelectedFontFamilyIsNotTheRequestedOne,
+ (const char*)val_s, family);
+ }
result = FcPatternGetString(rpat, FC_FILE, 0, &val_s);
if (result != FcResultMatch)
@@ -155,7 +176,7 @@ char* fontconfig_select(fc_instance_t* priv, const char* family, unsigned bold,
uint32_t code)
{
char* res = 0;
- if (font_fontconfig < 0) {
+ if (!priv->config) {
*index = priv->index_default;
return priv->path_default;
}
@@ -319,16 +340,17 @@ static void process_fontdata(fc_instance_t* priv, ass_library_t* library, FT_Lib
* \param path default font path
* \return pointer to fontconfig private data
*/
-fc_instance_t* fontconfig_init(ass_library_t* library, FT_Library ftlibrary, const char* family, const char* path)
+fc_instance_t* fontconfig_init(ass_library_t* library, FT_Library ftlibrary, const char* family, const char* path, int fc)
{
int rc;
fc_instance_t* priv = calloc(1, sizeof(fc_instance_t));
const char* dir = library->fonts_dir;
int i;
- if (font_fontconfig < 0) {
+ if (!fc) {
mp_msg(MSGT_ASS, MSGL_WARN,
MSGTR_LIBASS_FontconfigDisabledDefaultFontWillBeUsed);
+ priv->config = NULL;
priv->path_default = strdup(path);
priv->index_default = 0;
return priv;
diff --git a/libass/ass_fontconfig.h b/libass/ass_fontconfig.h
index 3806f2468b..f5762f854b 100644
--- a/libass/ass_fontconfig.h
+++ b/libass/ass_fontconfig.h
@@ -32,7 +32,7 @@
typedef struct fc_instance_s fc_instance_t;
-fc_instance_t* fontconfig_init(ass_library_t* library, FT_Library ftlibrary, const char* family, const char* path);
+fc_instance_t* fontconfig_init(ass_library_t* library, FT_Library ftlibrary, const char* family, const char* path, int fc);
char* fontconfig_select(fc_instance_t* priv, const char* family, unsigned bold, unsigned italic, int* index, uint32_t code);
void fontconfig_done(fc_instance_t* priv);
diff --git a/libass/ass_mp.c b/libass/ass_mp.c
index b3b3963eef..5fa2cd53c2 100644
--- a/libass/ass_mp.c
+++ b/libass/ass_mp.c
@@ -242,7 +242,10 @@ void ass_configure_fonts(ass_renderer_t* priv) {
else if (font_fontconfig >= 0 && font_name) family = strdup(font_name);
else family = 0;
- ass_set_fonts(priv, path, family);
+ if (font_fontconfig >= 0)
+ ass_set_fonts(priv, path, family);
+ else
+ ass_set_fonts_nofc(priv, path, family);
free(dir);
free(path);
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 05657294a7..8951af0ad0 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -2083,7 +2083,7 @@ void ass_set_line_spacing(ass_renderer_t* priv, double line_spacing)
priv->settings.line_spacing = line_spacing;
}
-int ass_set_fonts(ass_renderer_t* priv, const char* default_font, const char* default_family)
+static int ass_set_fonts_(ass_renderer_t* priv, const char* default_font, const char* default_family, int fc)
{
if (priv->settings.default_font)
free(priv->settings.default_font);
@@ -2095,11 +2095,21 @@ int ass_set_fonts(ass_renderer_t* priv, const char* default_font, const char* de
if (priv->fontconfig_priv)
fontconfig_done(priv->fontconfig_priv);
- priv->fontconfig_priv = fontconfig_init(priv->library, priv->ftlibrary, default_family, default_font);
+ priv->fontconfig_priv = fontconfig_init(priv->library, priv->ftlibrary, default_family, default_font, fc);
return !!priv->fontconfig_priv;
}
+int ass_set_fonts(ass_renderer_t* priv, const char* default_font, const char* default_family)
+{
+ return ass_set_fonts_(priv, default_font, default_family, 1);
+}
+
+int ass_set_fonts_nofc(ass_renderer_t* priv, const char* default_font, const char* default_family)
+{
+ return ass_set_fonts_(priv, default_font, default_family, 0);
+}
+
/**
* \brief Start a new frame
*/
diff --git a/libmenu/menu_cmdlist.c b/libmenu/menu_cmdlist.c
index 2c2edf0970..5b450ef6f1 100644
--- a/libmenu/menu_cmdlist.c
+++ b/libmenu/menu_cmdlist.c
@@ -20,7 +20,6 @@
#include "libvo/font_load.h"
#include "input/input.h"
-#include "version.h"
diff --git a/libmpdemux/muxer.c b/libmpdemux/muxer.c
index a5ab94e2d5..4c4e5a18cf 100644
--- a/libmpdemux/muxer.c
+++ b/libmpdemux/muxer.c
@@ -6,8 +6,6 @@
#include <unistd.h>
#include "config.h"
-#include "version.h"
-
#include "aviheader.h"
#include "ms_hdr.h"
diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c
index cd52168cdc..f1cd641d13 100644
--- a/libmpdemux/muxer_lavf.c
+++ b/libmpdemux/muxer_lavf.c
@@ -5,7 +5,6 @@
#include <inttypes.h>
#include <limits.h>
#include "config.h"
-#include "version.h"
#include "mp_msg.h"
#include "help_mp.h"
diff --git a/libmpdemux/muxer_mpeg.c b/libmpdemux/muxer_mpeg.c
index c32262359c..f5367e515b 100644
--- a/libmpdemux/muxer_mpeg.c
+++ b/libmpdemux/muxer_mpeg.c
@@ -6,7 +6,6 @@
#include <sys/types.h>
#include "config.h"
-#include "version.h"
#include "mp_msg.h"
#include "help_mp.h"
diff --git a/libmpdemux/muxer_rawvideo.c b/libmpdemux/muxer_rawvideo.c
index 4600752b89..b5c25aff0a 100644
--- a/libmpdemux/muxer_rawvideo.c
+++ b/libmpdemux/muxer_rawvideo.c
@@ -6,8 +6,6 @@
#include <unistd.h>
#include "config.h"
-#include "version.h"
-
//#include "stream/stream.h"
//#include "demuxer.h"
//#include "stheader.h"
diff --git a/libvo/aspecttest.c b/libvo/aspecttest.c
index 14791dfcb7..350db61290 100644
--- a/libvo/aspecttest.c
+++ b/libvo/aspecttest.c
@@ -11,6 +11,8 @@
#define DEF_ZOOM 1
extern float monitor_aspect;
+int vo_fs;
+float vo_panscan;
int main(int argc, char *argv[]) {
int w,h,z=DEF_ZOOM;