Main Page | Class Hierarchy | Class List | File List | Class Members

mediadec_ffmpeg.h

00001 00002 // Name: mediadec_ffmpeg.h 00003 // Purpose: FFMPEG Media Decoder 00004 // Author: Alex Thuering 00005 // Created: 21.07.2007 00006 // RCS-ID: $Id: mediadec_ffmpeg.h,v 1.1 2007/11/15 20:46:31 ntalex Exp $ 00007 // Copyright: (c) Alex Thuering 00008 // Licence: wxWindows licence 00010 00011 #ifndef FFMPEG_MEDIA_DECODER_H 00012 #define FFMPEG_MEDIA_DECODER_H 00013 00014 #include <wx/string.h> 00015 #include <wx/image.h> 00016 struct AVFormatContext; 00017 struct AVCodecContext; 00018 struct AVFrame; 00019 struct AVStream; 00020 00021 class wxFfmpegMediaDecoder 00022 { 00023 public: 00024 wxFfmpegMediaDecoder(); 00025 virtual ~wxFfmpegMediaDecoder(); 00026 static void Init(); 00027 00028 virtual bool Load(const wxString& fileName); 00029 virtual void Close(); 00030 00031 double GetDuration(); 00032 bool SetPosition(double pos); 00033 00034 virtual wxSize GetVideoSize(); 00035 00036 virtual bool BeginDecode(int width = -1, int height = -1); 00037 virtual wxImage GetNextFrame(); 00038 virtual void EndDecode(); 00039 00040 private: 00041 AVFormatContext* m_formatCtx; 00042 int m_videoStream; 00043 AVCodecContext* m_codecCtx; 00044 AVFrame* m_frame; 00045 int m_width; 00046 int m_height; 00047 bool OpenVideoDecoder(); 00048 void CloseVideoDecoder(); 00049 }; 00050 00051 #endif //FFMPEG_MEDIA_DECODER_H

Generated on Mon Nov 19 21:06:44 2007 for wxVillaLib by doxygen 1.3.7