mirror of
https://github.com/mpv-player/mpv
synced 2025-01-03 13:32:16 +00:00
libdemuxer...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2311 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
daab5f2480
commit
881e5d0783
13
Makefile
13
Makefile
@ -16,13 +16,13 @@ PRG_CFG = codec-cfg
|
||||
#prefix = /usr/local
|
||||
BINDIR = ${prefix}/bin
|
||||
# BINDIR = /usr/local/bin
|
||||
SRCS = cpudetect.c postproc/swscale.c postproc/postprocess.c mp_msg.c open.c parse_es.c ac3-iec958.c find_sub.c aviprint.c dec_audio.c dec_video.c aviwrite.c aviheader.c asfheader.c demux_avi.c demux_asf.c demux_mpg.c demux_mov.c demuxer.c stream.c codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c xa/rle8.c lirc_mp.c cfgparser.c mixer.c dvdauth.c spudec.c $(STREAM_SRCS)
|
||||
SRCS = cpudetect.c postproc/swscale.c postproc/postprocess.c mp_msg.c ac3-iec958.c find_sub.c dec_audio.c dec_video.c codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c xa/rle8.c lirc_mp.c cfgparser.c mixer.c spudec.c
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo $(CSS_INC) $(EXTRA_INC) # -Wall
|
||||
CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(CSS_INC) $(EXTRA_INC) # -Wall
|
||||
A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3 $(ALSA_LIB) $(ESD_LIB)
|
||||
VO_LIBS = -Llibvo -lvo $(MLIB_LIB) $(X_LIBS)
|
||||
|
||||
PARTS = mp3lib libac3 libmpeg2 opendivx libavcodec encore libvo libao2 drivers drivers/syncfb
|
||||
PARTS = libmpdemux mp3lib libac3 libmpeg2 opendivx libavcodec encore libvo libao2 drivers drivers/syncfb
|
||||
ifeq ($(GUI),yes)
|
||||
PARTS += Gui
|
||||
endif
|
||||
@ -50,11 +50,14 @@ all: $(ALL_PRG)
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
COMMONLIBS = libvo/libvo.a libao2/libao2.a libac3/libac3.a mp3lib/libMP3.a libmpeg2/libmpeg2.a opendivx/libdecore.a encore/libencore.a
|
||||
COMMONLIBS = libmpdemux/libmpdemux.a libvo/libvo.a libao2/libao2.a libac3/libac3.a mp3lib/libMP3.a libmpeg2/libmpeg2.a opendivx/libdecore.a encore/libencore.a
|
||||
|
||||
loader/libloader.a:
|
||||
$(MAKE) -C loader
|
||||
|
||||
libmpdemux/libmpdemux.a:
|
||||
$(MAKE) -C libmpdemux
|
||||
|
||||
loader/DirectShow/libDS_Filter.a:
|
||||
$(MAKE) -C loader/DirectShow
|
||||
|
||||
@ -93,7 +96,7 @@ mplayerwithoutlink: $(MPLAYER_DEP)
|
||||
@for a in $(PARTS); do $(MAKE) -C $$a all ; done
|
||||
|
||||
$(PRG): $(MPLAYER_DEP)
|
||||
$(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) $(LIB_LOADER) $(AV_LIB) -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 $(VO_LIBS) $(CSS_LIB) -Lencore -lencore $(DECORE_LIBS) $(GUI_LIBS) $(ARCH_LIBS)
|
||||
$(CC) $(CFLAGS) -o $(PRG) mplayer.o -Llibmpdemux -lmpdemux $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) $(LIB_LOADER) $(AV_LIB) -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 $(VO_LIBS) $(CSS_LIB) -Lencore -lencore $(DECORE_LIBS) $(GUI_LIBS) $(ARCH_LIBS)
|
||||
|
||||
$(PRG_FIBMAP): fibmap_mplayer.o
|
||||
$(CC) -o $(PRG_FIBMAP) fibmap_mplayer.o
|
||||
|
@ -51,7 +51,7 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
typedef struct codecs_st {
|
||||
unsigned int fourcc[CODECS_MAX_FOURCC];
|
||||
unsigned int fourccmap[CODECS_MAX_FOURCC];
|
||||
unsigned int outfmt[CODECS_MAX_OUTFMT];
|
||||
|
4
configure
vendored
4
configure
vendored
@ -1734,7 +1734,7 @@ fi
|
||||
|
||||
_streamingdef='#undef STREAMING'
|
||||
if test "$_streaming" = yes ; then
|
||||
_streamingsrcs='asf_streaming.c network.c url.c http.c'
|
||||
# _streamingsrcs='asf_streaming.c network.c url.c http.c'
|
||||
_streamingdef='#define STREAMING'
|
||||
fi
|
||||
|
||||
@ -2271,7 +2271,7 @@ AV_LIB = $_lavclib
|
||||
ALSA_LIB = $_alsalib
|
||||
ESD_LIB = $_esdlib
|
||||
ARCH_LIBS = $_archlibs $_iconvlib
|
||||
STREAM_SRCS = $_streamingsrcs
|
||||
STREAMING=$_streaming
|
||||
DECORE_LIBS = $_decorelibs
|
||||
DIVX4LINUX=$_divx4linux
|
||||
MLIB_INC = $_mlibinc
|
||||
|
2
libmpdemux/bswap.h
Normal file
2
libmpdemux/bswap.h
Normal file
@ -0,0 +1,2 @@
|
||||
/* Let it be for now*/
|
||||
#include "../bswap.h"
|
0
libmpdemux/codec-cfg.h
Normal file
0
libmpdemux/codec-cfg.h
Normal file
2
libmpdemux/config.h
Normal file
2
libmpdemux/config.h
Normal file
@ -0,0 +1,2 @@
|
||||
/* Let it be for now*/
|
||||
#include "../config.h"
|
1
libmpdemux/help_mp.h
Normal file
1
libmpdemux/help_mp.h
Normal file
@ -0,0 +1 @@
|
||||
#include "../help_mp.h"
|
2
libmpdemux/mp_msg.h
Normal file
2
libmpdemux/mp_msg.h
Normal file
@ -0,0 +1,2 @@
|
||||
/* Let it be for now*/
|
||||
#include "../mp_msg.h"
|
@ -28,7 +28,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
demux_stream_t *ds;
|
||||
unsigned int format;
|
||||
codecs_t *codec;
|
||||
struct codecs_st *codec;
|
||||
int inited;
|
||||
// output format:
|
||||
float timer; // value of old a_frame
|
||||
@ -66,7 +66,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
demux_stream_t *ds;
|
||||
unsigned int format;
|
||||
codecs_t *codec;
|
||||
struct codecs_st *codec;
|
||||
int inited;
|
||||
// output format:
|
||||
float timer; // value of old v_frame
|
@ -17,9 +17,9 @@
|
||||
extern int verbose; // defined in mplayer.c
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include "vcd_read_fbsd.c"
|
||||
#include "vcd_read_fbsd.h"
|
||||
#else
|
||||
#include "vcd_read.c"
|
||||
#include "vcd_read.h"
|
||||
#endif
|
||||
|
||||
#ifdef USE_DVDREAD
|
66
libmpdemux/test.c
Normal file
66
libmpdemux/test.c
Normal file
@ -0,0 +1,66 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "mp_msg.h"
|
||||
|
||||
#include "stream.h"
|
||||
#include "demuxer.h"
|
||||
|
||||
#include "wine/mmreg.h"
|
||||
#include "wine/avifmt.h"
|
||||
#include "wine/vfw.h"
|
||||
#include "codec-cfg.h"
|
||||
#include "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){
|
||||
}
|
||||
void resync_audio_stream(sh_audio_t *sh_audio){
|
||||
}
|
||||
|
||||
// some globals:
|
||||
int verbose=1;
|
||||
|
||||
// AVI demuxer parameters:
|
||||
int index_mode=-1; // -1=untouched 0=don't use index 1=use (geneate) index
|
||||
int force_ni=0; // force non-interleaved AVI parsing
|
||||
int pts_from_bps=1; // PTS: 0=interleaved 1=BPS-based
|
||||
|
||||
//---------------
|
||||
|
||||
extern stream_t* open_stream(char* filename,int vcd_track,int* file_format);
|
||||
|
||||
int main(int argc,char* argv[]){
|
||||
|
||||
stream_t* stream=NULL;
|
||||
demuxer_t* demuxer=NULL;
|
||||
int file_format=DEMUXER_TYPE_UNKNOWN;
|
||||
|
||||
mp_msg_init(verbose+MSGL_STATUS);
|
||||
|
||||
if(argc>1)
|
||||
stream=open_stream(argv[1],0,&file_format);
|
||||
else
|
||||
// stream=open_stream("/3d/divx/405divx_sm_v2[1].avi",0,&file_format);
|
||||
stream=open_stream("/dev/cdrom",2,&file_format); // VCD track 2
|
||||
|
||||
if(!stream){
|
||||
printf("Cannot open file/device\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
printf("success: format: %d data: 0x%X - 0x%X\n",file_format, (int)(stream->start_pos),(int)(stream->end_pos));
|
||||
|
||||
demuxer=demux_open(stream,file_format,-1,-1,-1);
|
||||
if(!demuxer){
|
||||
printf("Cannot open demuxer\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user