____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"00001 // ____ _ __ 00002 // / __ )____ _____ | | / /___ ___________ 00003 // / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ 00004 // / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) 00005 // /_____/\____/____/ |__/|__/\__,_/_/ /____/ 00006 // 00007 // A futuristic real-time strategy game. 00008 // This file is part of Bos Wars. 00009 // 00011 // 00012 // (c) Copyright 2002-2007 by Lutz Sammer 00013 // 00014 // This program is free software; you can redistribute it and/or modify 00015 // it under the terms of the GNU General Public License as published by 00016 // the Free Software Foundation; only version 2 of the License. 00017 // 00018 // This program is distributed in the hope that it will be useful, 00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 // GNU General Public License for more details. 00022 // 00023 // You should have received a copy of the GNU General Public License 00024 // along with this program; if not, write to the Free Software 00025 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00026 // 02111-1307, USA. 00027 00028 #ifndef __MOVIE_H__ 00029 #define __MOVIE_H__ 00030 00032 00033 #ifdef USE_VORBIS 00034 00035 /*---------------------------------------------------------------------------- 00036 -- Documentation 00037 ----------------------------------------------------------------------------*/ 00038 00039 /*---------------------------------------------------------------------------- 00040 -- Includes 00041 ----------------------------------------------------------------------------*/ 00042 00043 #include "ogg/ogg.h" 00044 #include "vorbis/codec.h" 00045 #ifdef USE_THEORA 00046 #include "theora/theora.h" 00047 #endif 00048 00049 /*---------------------------------------------------------------------------- 00050 -- Declarations 00051 ----------------------------------------------------------------------------*/ 00052 00053 class CFile; 00054 00058 struct OggData { 00059 CFile *File; 00060 ogg_sync_state sync; 00061 ogg_page page; 00062 00063 ogg_stream_state astream; 00064 vorbis_info vinfo; 00065 vorbis_comment vcomment; 00066 vorbis_block vblock; 00067 vorbis_dsp_state vdsp; 00068 00069 #ifdef USE_THEORA 00070 ogg_stream_state vstream; 00071 theora_info tinfo; 00072 theora_comment tcomment; 00073 theora_state tstate; 00074 #endif 00075 00076 int audio : 1; 00077 #ifdef USE_THEORA 00078 int video : 1; 00079 #endif 00080 }; 00081 00082 /*---------------------------------------------------------------------------- 00083 -- Variables 00084 ----------------------------------------------------------------------------*/ 00085 00086 /*---------------------------------------------------------------------------- 00087 -- Functions 00088 ----------------------------------------------------------------------------*/ 00089 00090 extern int OggInit(CFile *f, OggData *data); 00091 extern void OggFree(OggData *data); 00092 extern int OggGetNextPage(ogg_page *page, ogg_sync_state *sync, CFile *f); 00093 00094 extern int VorbisProcessData(OggData *data, char *buffer); 00095 00096 #endif // USE_VORBIS 00097 00099 extern int PlayMovie(const std::string &name); 00100 00102 00103 #endif // !__MOVIE_H__
1.5.6