CLibAvConverter.h
Go to the documentation of this file.
1 #ifndef ilibav_CLibAvConverter_included
2 #define ilibav_CLibAvConverter_included
3 
4 
5 #define __STDC_CONSTANT_MACROS
6 
7 // LIBAV includes
8 extern "C"{
9 #include "libavformat/avformat.h"
10 #undef PixelFormat
11 #undef BYTES_PER_SAMPLE
12 #undef BITS_PER_SAMPLE
13 #undef WAVE_FORMAT_PCM
14 }
15 
16 // ACF includes
17 #include "istd/CIndex2d.h"
18 #include "iimg/IBitmap.h"
19 
20 
21 namespace ilibav
22 {
23 
24 
29 {
30 public:
31  static bool ConvertBitmap(const AVFrame& avFrame, const istd::CIndex2d& size, AVPixelFormat pixelFormat, iimg::IBitmap& result);
32 
33 protected:
34  struct Rgba{
35  quint8 r;
36  quint8 g;
37  quint8 b;
38  quint8 a;
39  };
40 };
41 
42 
43 } // namespace ilibav
44 
45 
46 #endif // !ilibav_CLibAvConverter_included
47 
48 
static bool ConvertBitmap(const AVFrame &avFrame, const istd::CIndex2d &size, AVPixelFormat pixelFormat, iimg::IBitmap &result)
Helper class containing static methods to convert between AvLib and ACF classes.

© 2007-2011 Witold Gantzke and Kirill Lepskiy