Merge pull request #3277 from a-wi:CMake_FFMPEG_config_v3
This commit is contained in:
commit
148e64d4bc
@ -18,13 +18,11 @@ endif()
|
|||||||
|
|
||||||
set(videoio_hdrs
|
set(videoio_hdrs
|
||||||
${CMAKE_CURRENT_LIST_DIR}/src/precomp.hpp
|
${CMAKE_CURRENT_LIST_DIR}/src/precomp.hpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/src/cap_ffmpeg_impl.hpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(videoio_srcs
|
set(videoio_srcs
|
||||||
${CMAKE_CURRENT_LIST_DIR}/src/cap.cpp
|
${CMAKE_CURRENT_LIST_DIR}/src/cap.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/src/cap_images.cpp
|
${CMAKE_CURRENT_LIST_DIR}/src/cap_images.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/src/cap_ffmpeg.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
file(GLOB videoio_ext_hdrs
|
file(GLOB videoio_ext_hdrs
|
||||||
@ -111,6 +109,8 @@ if(HAVE_XIMEA)
|
|||||||
endif(HAVE_XIMEA)
|
endif(HAVE_XIMEA)
|
||||||
|
|
||||||
if(HAVE_FFMPEG)
|
if(HAVE_FFMPEG)
|
||||||
|
list(APPEND videoio_hdrs ${CMAKE_CURRENT_LIST_DIR}/src/cap_ffmpeg_impl.hpp)
|
||||||
|
list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_ffmpeg.cpp)
|
||||||
if(UNIX AND BZIP2_LIBRARIES)
|
if(UNIX AND BZIP2_LIBRARIES)
|
||||||
list(APPEND VIDEOIO_LIBRARIES ${BZIP2_LIBRARIES})
|
list(APPEND VIDEOIO_LIBRARIES ${BZIP2_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
@ -363,8 +363,10 @@ CV_IMPL CvCapture * cvCreateFileCapture (const char * filename)
|
|||||||
{
|
{
|
||||||
CvCapture * result = 0;
|
CvCapture * result = 0;
|
||||||
|
|
||||||
|
#ifdef HAVE_FFMPEG
|
||||||
if (! result)
|
if (! result)
|
||||||
result = cvCreateFileCapture_FFMPEG_proxy (filename);
|
result = cvCreateFileCapture_FFMPEG_proxy (filename);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_VFW
|
#ifdef HAVE_VFW
|
||||||
if (! result)
|
if (! result)
|
||||||
@ -421,8 +423,10 @@ CV_IMPL CvVideoWriter* cvCreateVideoWriter( const char* filename, int fourcc,
|
|||||||
if(!fourcc || !fps)
|
if(!fourcc || !fps)
|
||||||
result = cvCreateVideoWriter_Images(filename);
|
result = cvCreateVideoWriter_Images(filename);
|
||||||
|
|
||||||
|
#ifdef HAVE_FFMPEG
|
||||||
if(!result)
|
if(!result)
|
||||||
result = cvCreateVideoWriter_FFMPEG_proxy (filename, fourcc, fps, frameSize, is_color);
|
result = cvCreateVideoWriter_FFMPEG_proxy (filename, fourcc, fps, frameSize, is_color);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_VFW
|
#ifdef HAVE_VFW
|
||||||
if(!result)
|
if(!result)
|
||||||
@ -454,6 +458,19 @@ CV_IMPL CvVideoWriter* cvCreateVideoWriter( const char* filename, int fourcc,
|
|||||||
result = cvCreateVideoWriter_GStreamer(filename, fourcc, fps, frameSize, is_color);
|
result = cvCreateVideoWriter_GStreamer(filename, fourcc, fps, frameSize, is_color);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(HAVE_FFMPEG) && \
|
||||||
|
!defined(HAVE_VFW) && \
|
||||||
|
!defined(HAVE_MSMF) && \
|
||||||
|
!defined(HAVE_AVFOUNDATION) && \
|
||||||
|
!defined(HAVE_QUICKTIME) && \
|
||||||
|
!defined(HAVE_QTKIT) && \
|
||||||
|
!defined(HAVE_GSTREAMER)
|
||||||
|
// If none of the writers is used
|
||||||
|
// these statements suppress 'unused parameter' warnings.
|
||||||
|
(void)frameSize;
|
||||||
|
(void)is_color;
|
||||||
|
#endif
|
||||||
|
|
||||||
if(!result)
|
if(!result)
|
||||||
result = cvCreateVideoWriter_Images(filename);
|
result = cvCreateVideoWriter_Images(filename);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user