Mercurial > mplayer.hg
annotate libmpdemux/test.c @ 5630:dfc219577da6
FPS calculation fixed
author | arpi |
---|---|
date | Mon, 15 Apr 2002 02:48:11 +0000 |
parents | e84d6c8ff59b |
children | 72671e2510fd |
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 | |
2322 | 22 int verbose=5; // must be global! |
2310 | 23 |
24 //--------------- | |
25 | |
26 extern stream_t* open_stream(char* filename,int vcd_track,int* file_format); | |
27 | |
28 int main(int argc,char* argv[]){ | |
29 | |
30 stream_t* stream=NULL; | |
31 demuxer_t* demuxer=NULL; | |
32 int file_format=DEMUXER_TYPE_UNKNOWN; | |
33 | |
34 mp_msg_init(verbose+MSGL_STATUS); | |
35 | |
36 if(argc>1) | |
37 stream=open_stream(argv[1],0,&file_format); | |
38 else | |
39 // stream=open_stream("/3d/divx/405divx_sm_v2[1].avi",0,&file_format); | |
40 stream=open_stream("/dev/cdrom",2,&file_format); // VCD track 2 | |
41 | |
42 if(!stream){ | |
43 printf("Cannot open file/device\n"); | |
44 exit(1); | |
45 } | |
2322 | 46 |
2310 | 47 printf("success: format: %d data: 0x%X - 0x%X\n",file_format, (int)(stream->start_pos),(int)(stream->end_pos)); |
48 | |
3562 | 49 stream_enable_cache(stream,2048*1024,0,0); |
2322 | 50 |
2310 | 51 demuxer=demux_open(stream,file_format,-1,-1,-1); |
52 if(!demuxer){ | |
53 printf("Cannot open demuxer\n"); | |
54 exit(1); | |
55 } | |
56 | |
57 | |
58 } |