Strona główna | Hierarchia klas | Lista klas | Katalogi | Lista plików | Składowe klas | Składowe plików

codec_base.h

Idź do dokumentacji tego pliku.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Kamil Pawlowski   *
00003  *   kamilpe@gmail.com   *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00025 #ifndef _CODEC_BASE_H_
00026 #define _CODEC_BASE_H_
00027 
00028 #include <SDL.h>
00029 #include <SDL_audio.h>
00030 #include <ogg/ogg.h>
00031 #include <theora/theora.h>
00032 
00034 class Codec
00035 {
00036         public:
00037                 Codec();
00038                 virtual ~Codec();
00039                 
00044                 virtual int ParseHeader(ogg_packet *p) = 0;
00049                 virtual int InitProcess() = 0;
00055                 virtual int Wrote(ogg_packet *p) = 0;
00056 
00058                 unsigned long msec_pos;
00059                 
00061                 ogg_stream_state *stream;
00063                 int header_packet;
00064 
00065         protected:
00067                 int inited;
00068 };
00069 
00071 class CVideoCodec : public Codec
00072 {
00073         public:
00074                 CVideoCodec();
00075 
00080                 virtual int Decode(yuv_buffer *yuv) = 0;
00081 
00083                 int width;
00085                 int height;
00087                 int frame_width;
00089                 int frame_height;
00091                 int offset_x;
00093                 int offset_y;
00094 };
00095 
00097 class CAudioCodec : public Codec
00098 {
00099         public:
00105                 virtual int Decode(unsigned char *buffer, int len) = 0;
00106                 CAudioCodec();
00107 };
00108 
00109 #endif

Wygenerowano Thu Dec 29 16:21:58 2005 dla snakewars programem  doxygen 1.4.4