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