videoTexture.h

00001 
00002 // protect multiple inclusion
00003 #ifndef _VIDEOTEXTURE_H_INCLUDED_
00004 #define _VIDEOTEXTURE_H_INCLUDED_
00005 
00006 #include "error.h"
00007 
00008 // forward declaration to prevent #include here
00009 class irr::video::ITexture;
00010 struct AVFormatContext;
00011 struct AVCodecContext;
00012 struct AVCodec;
00013 struct AVFrame;
00014 struct SwsContext;
00015 
00016 
00017 
00018 class VideoTexture
00019 {
00020 public:
00021         VideoTexture();
00022         ~VideoTexture();
00023 
00024         // open file and setup video encoder and setup texture
00025         ERR_TYPE openStream( irr::core::stringc fileName, bool loopedPlay = true );
00026         // copy encoded video frame to texture
00027         ERR_TYPE update( irr::u32 timeMS );
00028         // returns texture
00029         irr::video::ITexture* getTexture();
00030 
00031 private:
00032         irr::video::ITexture*   texture;
00033         AVFormatContext*                avFormatContext;
00034     AVCodecContext*                     avCodecContext;
00035         AVCodec*                                avCodec;
00036         AVFrame*                                avFrameYUV; 
00037         AVFrame*                                avFrameRGB;
00038         SwsContext*                             swsContext;
00039         s32                                             videoStreamIndex;
00040         f32                                             videoStreamFPS;
00041         bool                                    loopedPlay;
00042         u32                                             timeSinceLastUpdate;
00043 };
00044 
00045 
00046 #endif // #ifndef _VIDEOTEXTURE_H_INCLUDED_

Generated on Sun Dec 2 03:10:23 2007 for TableTop by  doxygen 1.5.4