mirror of https://github.com/opencv/opencv.git
Merge pull request #7743 from alalek:cmake_ffmpeg_cleanup_2.4
commit
3d8395cae9
7 changed files with 104 additions and 76 deletions
@ -1,13 +1,11 @@ |
||||
set(HAVE_FFMPEG 1) |
||||
set(HAVE_FFMPEG_CODEC 1) |
||||
set(HAVE_FFMPEG_FORMAT 1) |
||||
set(HAVE_FFMPEG_UTIL 1) |
||||
set(HAVE_FFMPEG_SWSCALE 1) |
||||
set(HAVE_FFMPEG_RESAMPLE 0) |
||||
set(HAVE_GENTOO_FFMPEG 1) |
||||
set(FFMPEG_libavcodec_FOUND 1) |
||||
set(FFMPEG_libavformat_FOUND 1) |
||||
set(FFMPEG_libavutil_FOUND 1) |
||||
set(FFMPEG_libswscale_FOUND 1) |
||||
set(FFMPEG_libavresample_FOUND 1) |
||||
|
||||
set(ALIASOF_libavcodec_VERSION 55.18.102) |
||||
set(ALIASOF_libavformat_VERSION 55.12.100) |
||||
set(ALIASOF_libavutil_VERSION 52.38.100) |
||||
set(ALIASOF_libswscale_VERSION 2.3.100) |
||||
set(ALIASOF_libavresample_VERSION 1.0.1) |
||||
set(FFMPEG_libavcodec_VERSION 55.18.102) |
||||
set(FFMPEG_libavformat_VERSION 55.12.100) |
||||
set(FFMPEG_libavutil_VERSION 52.38.100) |
||||
set(FFMPEG_libswscale_VERSION 2.3.100) |
||||
set(FFMPEG_libavresample_VERSION 1.0.1) |
||||
|
@ -0,0 +1,24 @@ |
||||
#include <stdlib.h> |
||||
|
||||
extern "C" { |
||||
#include <libavformat/avformat.h> |
||||
#include <libavcodec/avcodec.h> |
||||
#include <libswscale/swscale.h> |
||||
} |
||||
|
||||
#define CALC_FFMPEG_VERSION(a,b,c) ( a<<16 | b<<8 | c ) |
||||
|
||||
static void test() |
||||
{ |
||||
AVFormatContext* c = 0; |
||||
AVCodec* avcodec = 0; |
||||
AVFrame* frame = 0; |
||||
|
||||
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0) |
||||
int err = avformat_open_input(&c, "", NULL, NULL); |
||||
#else |
||||
int err = av_open_input_file(&c, "", NULL, 0, NULL); |
||||
#endif |
||||
} |
||||
|
||||
int main() { test(); return 0; } |
Loading…
Reference in new issue