Mercurial > mplayer.hg
annotate libmpdemux/test.c @ 7859:72671e2510fd
added libmpdemux depends to test.c
author | arpi |
---|---|
date | Wed, 23 Oct 2002 13:59:05 +0000 |
parents | e84d6c8ff59b |
children | 013c255225d8 |
rev | line source |
---|---|
2310 | 1 |
2 #include <stdio.h> | |
3 #include <stdlib.h> | |
4 #include <string.h> | |
5 | |
2555
66837325b929
config.h cleanup, few things added to steram/demuxer headers
arpi
parents:
2338
diff
changeset
|
6 #include "config.h" |
2310 | 7 #include "mp_msg.h" |
8 | |
9 #include "stream.h" | |
10 #include "demuxer.h" | |
11 #include "stheader.h" | |
12 | |
13 //-------------------------- | |
14 | |
15 // audio stream skip/resync functions requires only for seeking. | |
16 // (they should be implemented in the audio codec layer) | |
17 void skip_audio_frame(sh_audio_t *sh_audio){ | |
18 } | |
19 void resync_audio_stream(sh_audio_t *sh_audio){ | |
20 } | |
21 | |
7859 | 22 // for libmpdvdkit2: |
23 #include "../get_path.c" | |
24 | |
2322 | 25 int verbose=5; // must be global! |
2310 | 26 |
27 //--------------- | |
28 | |
29 extern stream_t* open_stream(char* filename,int vcd_track,int* file_format); | |
30 | |
31 int main(int argc,char* argv[]){ | |
32 | |
33 stream_t* stream=NULL; | |
34 demuxer_t* demuxer=NULL; | |
35 int file_format=DEMUXER_TYPE_UNKNOWN; | |
36 | |
37 mp_msg_init(verbose+MSGL_STATUS); | |
38 | |
39 if(argc>1) | |
40 stream=open_stream(argv[1],0,&file_format); | |
41 else | |
42 // stream=open_stream("/3d/divx/405divx_sm_v2[1].avi",0,&file_format); | |
43 stream=open_stream("/dev/cdrom",2,&file_format); // VCD track 2 | |
44 | |
45 if(!stream){ | |
46 printf("Cannot open file/device\n"); | |
47 exit(1); | |
48 } | |
2322 | 49 |
2310 | 50 printf("success: format: %d data: 0x%X - 0x%X\n",file_format, (int)(stream->start_pos),(int)(stream->end_pos)); |
51 | |
3562 | 52 stream_enable_cache(stream,2048*1024,0,0); |
2322 | 53 |
2310 | 54 demuxer=demux_open(stream,file_format,-1,-1,-1); |
55 if(!demuxer){ | |
56 printf("Cannot open demuxer\n"); | |
57 exit(1); | |
58 } | |
59 | |
60 | |
61 } |