Merge pull request from alalek:pr7159

This commit is contained in:
Vadim Pisarevsky 2016-09-16 21:18:26 +00:00
commit dc3d0cbc22
4 changed files with 1351 additions and 23 deletions

View File

@ -169,7 +169,7 @@ OCV_OPTION(OPENCV_ENABLE_NONFREE "Enable non-free algorithms" OFF)
# Optional 3rd party components # Optional 3rd party components
# =================================================== # ===================================================
OCV_OPTION(WITH_1394 "Include IEEE1394 support" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT) ) OCV_OPTION(WITH_1394 "Include IEEE1394 support" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
OCV_OPTION(WITH_AVFOUNDATION "Use AVFoundation for Video I/O" ON IF IOS) OCV_OPTION(WITH_AVFOUNDATION "Use AVFoundation for Video I/O (iOS/Mac)" ON IF APPLE)
OCV_OPTION(WITH_CARBON "Use Carbon for UI instead of Cocoa" OFF IF APPLE ) OCV_OPTION(WITH_CARBON "Use Carbon for UI instead of Cocoa" OFF IF APPLE )
OCV_OPTION(WITH_CAROTENE "Use NVidia carotene acceleration library for ARM platform" ON IF (ARM OR AARCH64) AND NOT IOS AND NOT (CMAKE_VERSION VERSION_LESS "2.8.11")) OCV_OPTION(WITH_CAROTENE "Use NVidia carotene acceleration library for ARM platform" ON IF (ARM OR AARCH64) AND NOT IOS AND NOT (CMAKE_VERSION VERSION_LESS "2.8.11"))
OCV_OPTION(WITH_VTK "Include VTK library support (and build opencv_viz module eiher)" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT AND NOT CMAKE_CROSSCOMPILING) ) OCV_OPTION(WITH_VTK "Include VTK library support (and build opencv_viz module eiher)" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT AND NOT CMAKE_CROSSCOMPILING) )
@ -199,7 +199,8 @@ OCV_OPTION(WITH_PVAPI "Include Prosilica GigE support" OFF
OCV_OPTION(WITH_GIGEAPI "Include Smartek GigE support" OFF IF (NOT ANDROID AND NOT IOS AND NOT WINRT) ) OCV_OPTION(WITH_GIGEAPI "Include Smartek GigE support" OFF IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
OCV_OPTION(WITH_QT "Build with Qt Backend support" OFF IF (NOT ANDROID AND NOT IOS AND NOT WINRT) ) OCV_OPTION(WITH_QT "Build with Qt Backend support" OFF IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
OCV_OPTION(WITH_WIN32UI "Build with Win32 UI Backend support" ON IF WIN32 AND NOT WINRT) OCV_OPTION(WITH_WIN32UI "Build with Win32 UI Backend support" ON IF WIN32 AND NOT WINRT)
OCV_OPTION(WITH_QUICKTIME "Use QuickTime for Video I/O insted of QTKit" OFF IF APPLE ) OCV_OPTION(WITH_QUICKTIME "Use QuickTime for Video I/O" OFF IF APPLE )
OCV_OPTION(WITH_QTKIT "Use QTKit Video I/O backend" OFF IF APPLE )
OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF IF (NOT IOS AND NOT WINRT) ) OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF IF (NOT IOS AND NOT WINRT) )
OCV_OPTION(WITH_OPENMP "Include OpenMP support" OFF) OCV_OPTION(WITH_OPENMP "Include OpenMP support" OFF)
OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF IF (WIN32 AND NOT WINRT) ) OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF IF (WIN32 AND NOT WINRT) )
@ -1077,10 +1078,6 @@ if(DEFINED WITH_1394)
status(" DC1394 2.x:" HAVE_DC1394_2 THEN "YES (ver ${ALIASOF_libdc1394-2_VERSION})" ELSE NO) status(" DC1394 2.x:" HAVE_DC1394_2 THEN "YES (ver ${ALIASOF_libdc1394-2_VERSION})" ELSE NO)
endif(DEFINED WITH_1394) endif(DEFINED WITH_1394)
if(DEFINED WITH_AVFOUNDATION)
status(" AVFoundation:" WITH_AVFOUNDATION THEN YES ELSE NO)
endif(DEFINED WITH_AVFOUNDATION)
if(DEFINED WITH_FFMPEG) if(DEFINED WITH_FFMPEG)
if(WIN32) if(WIN32)
status(" FFMPEG:" WITH_FFMPEG THEN "YES (prebuilt binaries)" ELSE NO) status(" FFMPEG:" WITH_FFMPEG THEN "YES (prebuilt binaries)" ELSE NO)
@ -1126,10 +1123,15 @@ if(DEFINED WITH_GIGEAPI)
status(" GigEVisionSDK:" HAVE_GIGE_API THEN YES ELSE NO) status(" GigEVisionSDK:" HAVE_GIGE_API THEN YES ELSE NO)
endif(DEFINED WITH_GIGEAPI) endif(DEFINED WITH_GIGEAPI)
if(DEFINED WITH_QUICKTIME) if(DEFINED APPLE)
status(" AVFoundation:" HAVE_AVFOUNDATION THEN YES ELSE NO)
if(WITH_QUICKTIME OR HAVE_QUICKTIME)
status(" QuickTime:" HAVE_QUICKTIME THEN YES ELSE NO) status(" QuickTime:" HAVE_QUICKTIME THEN YES ELSE NO)
status(" QTKit:" HAVE_QTKIT THEN YES ELSE NO) endif()
endif(DEFINED WITH_QUICKTIME) if(WITH_QTKIT OR HAVE_QTKIT)
status(" QTKit:" HAVE_QTKIT THEN "YES (deprecated)" ELSE NO)
endif()
endif(DEFINED APPLE)
if(DEFINED WITH_UNICAP) if(DEFINED WITH_UNICAP)
status(" UniCap:" HAVE_UNICAP THEN "YES (ver ${ALIASOF_libunicap_VERSION})" ELSE NO) status(" UniCap:" HAVE_UNICAP THEN "YES (ver ${ALIASOF_libunicap_VERSION})" ELSE NO)

View File

@ -302,19 +302,18 @@ if(WIN32)
endif() endif()
endif(WIN32) endif(WIN32)
# --- Apple AV Foundation --- if(APPLE)
if(WITH_AVFOUNDATION) if(WITH_AVFOUNDATION)
set(HAVE_AVFOUNDATION YES) set(HAVE_AVFOUNDATION YES)
endif() endif()
# --- QuickTime ---
if(NOT IOS) if(NOT IOS)
if(WITH_QUICKTIME) if(WITH_QUICKTIME)
set(HAVE_QUICKTIME YES) set(HAVE_QUICKTIME YES)
elseif(APPLE AND CMAKE_COMPILER_IS_CLANGCXX) elseif(WITH_QTKIT)
set(HAVE_QTKIT YES) set(HAVE_QTKIT YES)
endif() endif()
endif() endif()
endif(APPLE)
# --- Intel Perceptual Computing SDK --- # --- Intel Perceptual Computing SDK ---
if(WITH_INTELPERC) if(WITH_INTELPERC)

View File

@ -168,8 +168,13 @@ if(HAVE_GIGE_API)
endif(HAVE_GIGE_API) endif(HAVE_GIGE_API)
if(HAVE_AVFOUNDATION) if(HAVE_AVFOUNDATION)
if(IOS)
list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_avfoundation.mm) list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_avfoundation.mm)
list(APPEND VIDEOIO_LIBRARIES "-framework AVFoundation" "-framework QuartzCore") list(APPEND VIDEOIO_LIBRARIES "-framework AVFoundation" "-framework QuartzCore")
else()
list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_avfoundation_mac.mm)
list(APPEND VIDEOIO_LIBRARIES "-framework Cocoa" "-framework Accelerate" "-framework AVFoundation" "-framework CoreGraphics" "-framework CoreImage" "-framework CoreMedia" "-framework CoreVideo" "-framework QuartzCore")
endif()
endif() endif()
if(HAVE_QUICKTIME) if(HAVE_QUICKTIME)

File diff suppressed because it is too large Load Diff