Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[d45a8e]: core / vidl / vidl_ffmpeg_istream.cxx Maximize Restore History

Download this file

vidl_ffmpeg_istream.cxx    39 lines (29 with data), 1.0 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// This is core/vidl/vidl_ffmpeg_istream.cxx
#include "vidl_ffmpeg_istream.h"
#include <vidl/vidl_config.h>
#if VIDL_HAS_FFMPEG
#include "vidl_ffmpeg_ostream.h"
// The ffmpeg API keeps changing, so we use different implementations
// depending on which version of ffmpeg we have.
extern "C" {
// some versions of FFMPEG require this definition before including
// the headers for C++ compatibility
#define __STDC_CONSTANT_MACROS
#if FFMPEG_IN_SEVERAL_DIRECTORIES
#include <libavformat/avformat.h>
#else
#include <ffmpeg/avformat.h>
#endif
}
#if LIBAVFORMAT_BUILD < ((52<<16)+(2<<8)+0) // before ver 52.2.0
# include "vidl_ffmpeg_istream_v1.txx"
#elif LIBAVFORMAT_BUILD < ((53<<16)+(0<<8)+0) // before ver 53.0.0
# include "vidl_ffmpeg_istream_v2.txx"
#elif LIBAVFORMAT_BUILD < ((53<<16)+(24<<8)+0) // before ver 53.24.0
# include "vidl_ffmpeg_istream_v3.txx"
#else
# include "vidl_ffmpeg_istream_v0.9.txx"
#endif
#else // VIDL_HAS_FFMPEG
# include "vidl_ffmpeg_istream_stub.txx"
#endif // VIDL_HAS_FFMPEG