Mercurial > mplayer.hg
view libmpdemux/test.c @ 7787:05e518badc1b
doc fixes part 1 (more will come when i find the time to read the rest)
if anything is not ok, please let me know
documentation.html:
* OGG -> OGG/OGM (both file formats are supported)
* somewhat better wording (no real change of meaning)
* update of the current xf86 version from 4.2.0 to 4.2.1
* mga_vid is not old
* partial sync of the options with the manpage (someone with deeper knwoledge
should check them and finish the sync)
* added 2 links about quoting and correct writing of mails to the mailinglists
formats.html:
* fixing typo interleaved -> non-interleaved (at least i think it's a typo
please someone check it)
* non-interleaved AVIs should be played with -ni
* OGG -> OGG/OGM
author | attila |
---|---|
date | Fri, 18 Oct 2002 17:57:05 +0000 |
parents | e84d6c8ff59b |
children | 72671e2510fd |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "config.h" #include "mp_msg.h" #include "stream.h" #include "demuxer.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){ } int verbose=5; // must be global! //--------------- 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)); stream_enable_cache(stream,2048*1024,0,0); demuxer=demux_open(stream,file_format,-1,-1,-1); if(!demuxer){ printf("Cannot open demuxer\n"); exit(1); } }