1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-19 05:15:12 +00:00

Fix the linking of TOOLS/netstream and TOOLS/vivodump.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26995 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2008-06-06 13:28:25 +00:00
parent 92f79295d2
commit f9810c0dfb
4 changed files with 29 additions and 66 deletions

View File

@ -898,7 +898,9 @@ TOOLS = TOOLS/alaw-gen$(EXESUF) \
TOOLS/compare$(EXESUF) \ TOOLS/compare$(EXESUF) \
TOOLS/dump_mp4$(EXESUF) \ TOOLS/dump_mp4$(EXESUF) \
TOOLS/movinfo$(EXESUF) \ TOOLS/movinfo$(EXESUF) \
TOOLS/netstream$(EXESUF) \
TOOLS/subrip$(EXESUF) \ TOOLS/subrip$(EXESUF) \
TOOLS/vivodump$(EXESUF) \
ifdef ARCH_X86 ifdef ARCH_X86
TOOLS += TOOLS/modify_reg$(EXESUF) TOOLS += TOOLS/modify_reg$(EXESUF)
@ -907,8 +909,6 @@ endif
ALLTOOLS = $(TOOLS) \ ALLTOOLS = $(TOOLS) \
TOOLS/bmovl-test$(EXESUF) \ TOOLS/bmovl-test$(EXESUF) \
TOOLS/vfw2menc$(EXESUF) \ TOOLS/vfw2menc$(EXESUF) \
TOOLS/vivodump$(EXESUF) \
TOOLS/netstream$(EXESUF) \
tools: $(TOOLS) tools: $(TOOLS)
alltools: $(ALLTOOLS) alltools: $(ALLTOOLS)
@ -924,8 +924,13 @@ TOOLS/subrip$(EXESUF): TOOLS/subrip.c vobsub.o spudec.o unrar_exec.o \
TOOLS/vfw2menc$(EXESUF): TOOLS/vfw2menc.c -lwinmm -lole32 TOOLS/vfw2menc$(EXESUF): TOOLS/vfw2menc.c -lwinmm -lole32
#FIXME: Linking is broken, help welcome. mplayer-nomain.o: mplayer.c
TOOLS/vivodump$(EXESUF): TOOLS/vivodump.c $(TEST_OBJS) $(CC) $(CFLAGS) -DDISABLE_MAIN -c -o $@ $<
TOOLS/netstream$(EXESUF): TOOLS/netstream.c $(subst mplayer.o,mplayer-nomain.o,$(OBJS_MPLAYER)) $(filter-out %mencoder.o,$(OBJS_MENCODER)) $(OBJS_COMMON) $(COMMON_LIBS)
TOOLS/vivodump$(EXESUF): TOOLS/vivodump.c $(subst mplayer.o,mplayer-nomain.o,$(OBJS_MPLAYER)) $(filter-out %mencoder.o,$(OBJS_MENCODER)) $(OBJS_COMMON) $(COMMON_LIBS)
TOOLS/netstream$(EXESUF) TOOLS/vivodump$(EXESUF):
$(CC) $(CFLAGS) -o $@ $^ $(EXTRALIBS_MPLAYER) $(EXTRALIBS_MENCODER) $(COMMON_LDFLAGS)
fastmemcpybench: TOOLS/fastmemcpybench.c fastmemcpybench: TOOLS/fastmemcpybench.c
$(CC) $(CFLAGS) $< -o TOOLS/fastmem-mmx$(EXESUF) -DNAME=\"mmx\" -DHAVE_MMX $(CC) $(CFLAGS) $< -o TOOLS/fastmem-mmx$(EXESUF) -DNAME=\"mmx\" -DHAVE_MMX
@ -947,16 +952,6 @@ fastmemcpybench realcodecs: CFLAGS += -g
%.so.6.0: %.o %.so.6.0: %.o
ld -shared -o $@ $< -ldl -lc ld -shared -o $@ $< -ldl -lc
# FIXME: netstream linking is a mess that should be fixed properly some day.
# It does not work with either GUI, LIVE555, libavformat, cdparanoia enabled.
NETSTREAM_DEPS = libavutil/libavutil.a \
m_option.o \
m_struct.o \
$(TEST_OBJS)
TOOLS/netstream$(EXESUF): TOOLS/netstream.o $(NETSTREAM_DEPS)
$(CC) $(CFLAGS) -o $@ $^
###### drivers ####### ###### drivers #######

View File

@ -46,16 +46,18 @@
/// Netstream packets def and some helpers /// Netstream packets def and some helpers
#include "stream/netstream.h" #include "stream/netstream.h"
// linking hacks
char *info_name;
char *info_artist;
char *info_genre;
char *info_subject;
char *info_copyright;
char *info_sourceform;
char *info_comment;
//Set some standard variables char* out_filename = NULL;
char* dvdsub_lang=NULL; char* force_fourcc=NULL;
char* audio_lang=NULL; char* passtmpfile="divx2pass.log";
int sub_justify=0;
int identify=0;
int dvdsub_id=0;
int audio_id=0;
int video_id=0;
void af_fmt2str() {};
#ifdef __MINGW32__ #ifdef __MINGW32__
#define usleep sleep #define usleep sleep
@ -367,46 +369,3 @@ int main(void) {
} }
return main_loop(listen_fd); return main_loop(listen_fd);
} }
//---- For libmpdemux
float stream_cache_seek_min_percent=50.0;
float stream_cache_min_percent=20.0;
#include <libmpdemux/demuxer.h>
#include <libmpdemux/stheader.h>
// audio stream skip/resync functions requires only for seeking.
// (they should be implemented in the audio codec layer)
void skip_audio_frame(sh_audio_t *sh_audio){
sh_audio=NULL;
}
void resync_audio_stream(sh_audio_t *sh_audio){
sh_audio=NULL;
}
int mp_input_check_interrupt(int time){
if(time) usleep(time);
return 0;
}
// for libdvdread:
#include "get_path.c"
// linking hacks
int stream_cache_size=0;
int index_mode=0;
// for demux_ogg:
void* vo_sub=NULL;
int vo_osd_changed(int new_value){ new_value++; return 0;}
int subcc_enabled=0;
float sub_fps=0;
int sub_utf8=0;
int suboverlap_enabled = 1;
float sub_delay=0;
//---------------

View File

@ -10,6 +10,7 @@
#include "libmpdemux/muxer.h" #include "libmpdemux/muxer.h"
#include "libmpdemux/demuxer.h" #include "libmpdemux/demuxer.h"
/* linking hacks */
char *info_name; char *info_name;
char *info_artist; char *info_artist;
char *info_genre; char *info_genre;
@ -18,6 +19,10 @@ char *info_copyright;
char *info_sourceform; char *info_sourceform;
char *info_comment; char *info_comment;
char* out_filename = NULL;
char* force_fourcc=NULL;
char* passtmpfile="divx2pass.log";
static const short h263_format[8][2] = { static const short h263_format[8][2] = {
{ 0, 0 }, { 0, 0 },
{ 128, 96 }, { 128, 96 },

View File

@ -2537,6 +2537,9 @@ static int seek(MPContext *mpctx, double amount, int style)
return 0; return 0;
} }
/* This preprocessor directive is a hack to generate a mplayer-nomain.o object
* file for some tools to link against. */
#ifndef DISABLE_MAIN
int main(int argc,char* argv[]){ int main(int argc,char* argv[]){
@ -4038,3 +4041,4 @@ exit_player_with_rc(MSGTR_Exit_eof, 0);
return 1; return 1;
} }
#endif /* DISABLE_MAIN */