00001
00002
00003 #ifndef _VIDEOTEXTURE_H_INCLUDED_
00004 #define _VIDEOTEXTURE_H_INCLUDED_
00005
00006 #include "error.h"
00007
00008
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
00025 ERR_TYPE openStream( irr::core::stringc fileName, bool loopedPlay = true );
00026
00027 ERR_TYPE update( irr::u32 timeMS );
00028
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_