Mercurial > mplayer.hg
annotate libmpdemux/test.c @ 7978:ab15849ec648
10L ! Don't remove the scale filter if we don't added ourself
author | albeu |
---|---|
date | Wed, 30 Oct 2002 17:45:44 +0000 |
parents | 4c832590e18e |
children | 9a88e80e6314 |
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 | |
7862
013c255225d8
mpdemux.c|h moved to libinput, mpdemux_check_interrupt() -> mp_input_check_interrupt()
arpi
parents:
7859
diff
changeset
|
22 int mp_input_check_interrupt(int time){ |
7867 | 23 if(time) usleep(time); |
7862
013c255225d8
mpdemux.c|h moved to libinput, mpdemux_check_interrupt() -> mp_input_check_interrupt()
arpi
parents:
7859
diff
changeset
|
24 return 0; |
013c255225d8
mpdemux.c|h moved to libinput, mpdemux_check_interrupt() -> mp_input_check_interrupt()
arpi
parents:
7859
diff
changeset
|
25 } |
013c255225d8
mpdemux.c|h moved to libinput, mpdemux_check_interrupt() -> mp_input_check_interrupt()
arpi
parents:
7859
diff
changeset
|
26 |
7859 | 27 // for libmpdvdkit2: |
28 #include "../get_path.c" | |
29 | |
2322 | 30 int verbose=5; // must be global! |
2310 | 31 |
7874 | 32 int stream_cache_size=0; |
33 | |
34 // for demux_ogg: | |
35 void* vo_sub=NULL; | |
36 int vo_osd_changed(int new_value){return 0;} | |
37 int subcc_enabled=0; | |
38 | |
2310 | 39 //--------------- |
40 | |
41 extern stream_t* open_stream(char* filename,int vcd_track,int* file_format); | |
42 | |
43 int main(int argc,char* argv[]){ | |
44 | |
45 stream_t* stream=NULL; | |
46 demuxer_t* demuxer=NULL; | |
47 int file_format=DEMUXER_TYPE_UNKNOWN; | |
48 | |
49 mp_msg_init(verbose+MSGL_STATUS); | |
50 | |
51 if(argc>1) | |
52 stream=open_stream(argv[1],0,&file_format); | |
53 else | |
54 // stream=open_stream("/3d/divx/405divx_sm_v2[1].avi",0,&file_format); | |
55 stream=open_stream("/dev/cdrom",2,&file_format); // VCD track 2 | |
56 | |
57 if(!stream){ | |
58 printf("Cannot open file/device\n"); | |
59 exit(1); | |
60 } | |
2322 | 61 |
2310 | 62 printf("success: format: %d data: 0x%X - 0x%X\n",file_format, (int)(stream->start_pos),(int)(stream->end_pos)); |
63 | |
7874 | 64 if(stream_cache_size) |
65 stream_enable_cache(stream,stream_cache_size,0,0); | |
2322 | 66 |
2310 | 67 demuxer=demux_open(stream,file_format,-1,-1,-1); |
68 if(!demuxer){ | |
69 printf("Cannot open demuxer\n"); | |
70 exit(1); | |
71 } | |
7874 | 72 |
73 if(demuxer->video->sh) | |
74 video_read_properties(demuxer->video->sh); | |
2310 | 75 |
76 } |