Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ffmpeg_init.h
Go to the documentation of this file.
1 //
2 //C++ Interface: FFMpeg initialization
3 //
4 #ifndef __FFMPEG_INIT_H__INCLUDED__
5 #define __FFMPEG_INIT_H__INCLUDED__
6 
7 namespace FFMpeg
8 {
9 void initLibraries();
10 };
11 
12 #ifdef HAVE_FFMPEG
13 
14 extern "C" {
15 #ifdef _WIN32
16 #define HAVE_FFMPEG_SWSCALE_H
17 #endif
18  #ifdef HAVE_FFMPEG_SWSCALE_H //Not sure how many people have swscale.
19  #include <ffmpeg/swscale.h>
20  #else
21  #ifdef HAVE_LIBSWSCALE_SWSCALE_H
22  #include <libswscale/swscale.h>
23  #else
24  #ifdef HAVE_SWSCALE_H
25  #include <swscale.h>
26  #else
27  #define DEPRECATED_IMG_CONVERT 1
28  #endif
29  #endif
30  #endif
31  #ifdef HAVE_LIBAVCODEC_AVCODEC_H
32  #include <libavcodec/avcodec.h>
33  #else
34  #ifdef HAVE_AVCODEC_H
35  #include <avcodec.h>
36  #else
37  #include <ffmpeg/avcodec.h>
38  #endif
39  #endif
40  #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
41  #include <libavformat/avformat.h>
42  #else
43  #ifdef HAVE_AVFORMAT_H
44  #include <avformat.h>
45  #else
46  #include <ffmpeg/avformat.h>
47  #endif
48  #endif
49  #ifdef HAVE_LIBAVFORMAT_AVIO_H
50  #include <libavformat/avio.h>
51  #else
52  #ifdef HAVE_AVIO_H
53  #include <avio.h>
54  #else
55  #include <ffmpeg/avio.h>
56  #endif
57  #endif
58 }
59 
60 
61 #if (LIBAVCODEC_VERSION_MAJOR > 52)
62 #define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO
63 #define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO
64 #endif
65 
66 
67 #endif
68 
69 #endif //__FFMPEG_INIT_H__INCLUDED__
70