core/vidl/vidl_ffmpeg_ostream.cxx
Go to the documentation of this file.
00001 // This is core/vidl/vidl_ffmpeg_ostream.cxx
00002 #include "vidl_ffmpeg_ostream.h"
00003 
00004 #include <vidl/vidl_config.h>
00005 
00006 #if VIDL_HAS_FFMPEG
00007 
00008 // The ffmpeg API keeps changing, so we use different implementations
00009 // depending on which version of ffmpeg we have.
00010 
00011 extern "C" {
00012 // some versions of FFMPEG require this definition before including
00013 // the headers for C++ compatibility
00014 #define __STDC_CONSTANT_MACROS
00015 #if FFMPEG_IN_SEVERAL_DIRECTORIES
00016 #include <libavcodec/avcodec.h>
00017 #else
00018 #include <ffmpeg/avcodec.h>
00019 #endif
00020 }
00021 #include "vidl_ffmpeg_convert.h"
00022 
00023 #if LIBAVCODEC_BUILD < ((51<<16)+(49<<8)+0)  // ver 51.49.0
00024 # include "vidl_ffmpeg_ostream_v1.txx"
00025 #elif LIBAVCODEC_BUILD < ((52<<16)+(10<<8)+0)  // before ver 52.10.0
00026 # include "vidl_ffmpeg_ostream_v2.txx"
00027 #elif LIBAVCODEC_BUILD < ((53<<16)+(0<<8)+0)  // before ver 53.0.0
00028 # include "vidl_ffmpeg_ostream_v3.txx"
00029 #else
00030 # include "vidl_ffmpeg_ostream_v4.txx"
00031 #endif
00032 
00033 #else // VIDL_HAS_FFMPEG
00034 
00035 # include "vidl_ffmpeg_ostream_stub.txx"
00036 
00037 #endif // VIDL_HAS_FFMPEG