00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef __MOVIE_H__
00031 #define __MOVIE_H__
00032
00034
00035 #ifdef USE_VORBIS
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #include "ogg/ogg.h"
00046 #include "vorbis/codec.h"
00047 #ifdef USE_THEORA
00048 #include "theora/theora.h"
00049 #endif
00050
00051
00052
00053
00054
00055 class CFile;
00056
00060 struct OggData {
00061 CFile *File;
00062 ogg_sync_state sync;
00063 ogg_page page;
00064
00065 ogg_stream_state astream;
00066 vorbis_info vinfo;
00067 vorbis_comment vcomment;
00068 vorbis_block vblock;
00069 vorbis_dsp_state vdsp;
00070
00071 #ifdef USE_THEORA
00072 ogg_stream_state vstream;
00073 theora_info tinfo;
00074 theora_comment tcomment;
00075 theora_state tstate;
00076 #endif
00077
00078 int audio : 1;
00079 #ifdef USE_THEORA
00080 int video : 1;
00081 #endif
00082 };
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092 extern int OggInit(CFile *f, OggData *data);
00093 extern void OggFree(OggData *data);
00094 extern int OggGetNextPage(ogg_page *page, ogg_sync_state *sync, CFile *f);
00095
00096 extern int VorbisProcessData(OggData *data, char *buffer);
00097
00098 #endif // USE_VORBIS
00099
00101 extern int PlayMovie(const std::string &name);
00102
00104
00105 #endif // !__MOVIE_H__