set(WITH_JASPER ON CACHE BOOL "Include JPEG2K support")
set(WITH_TIFF ON CACHE BOOL "Include TIFF support")
set(WITH_OPENEXR ON CACHE BOOL "Include ILM support via OpenEXR")
-endif()
+
if(UNIX)
set(WITH_FFMPEG ON CACHE BOOL "Include FFMPEG support")
set(WITH_1394 ON CACHE BOOL "Include IEEE1394 support")
endif()
+endif()
+
if(APPLE)
set(WITH_CARBON OFF CACHE BOOL "Use Carbon for UI instead of Cocoa")
set(WITH_QUICKTIME OFF CACHE BOOL "Use QuickTime for Video I/O insted of QTKit")
endif()
+if(IOS)
+ set(WITH_AVFOUNDATION ON CACHE BOOL "Use AVFoundation for Video I/O")
+endif()
+
set(WITH_TBB OFF CACHE BOOL "Include Intel TBB support")
set(WITH_IPP OFF CACHE BOOL "Include Intel IPP support")
set(WITH_EIGEN ON CACHE BOOL "Include Eigen2/Eigen3 support")
/* QuickTime video libraries */
#cmakedefine HAVE_QUICKTIME
+/* AVFoundation video libraries */
+#cmakedefine HAVE_AVFOUNDATION
+
/* TIFF codec */
#cmakedefine HAVE_TIFF
-message (STATUS "Setting up iPhoneOS toolchain")
+message (STATUS "Setting up iPhoneSimulator toolchain")
set (IPHONESIMULATOR TRUE)
# Standard settings
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-message (STATUS "iPhoneOS toolchain loaded")
\ No newline at end of file
+message (STATUS "iPhoneSimulator toolchain loaded")
\ No newline at end of file
endif()
endif()
-if(UNIX)
- if(NOT IOS)
-
+if(UNIX)
if(NOT HAVE_QT)
if(HAVE_GTK)
set(highgui_srcs ${highgui_srcs} src/window_gtk.cpp)
endif()
endif()
- endif(NOT IOS)
-
foreach(P ${HIGHGUI_INCLUDE_DIRS})
include_directories(${P})
endforeach()
endif()
#YV
-if(APPLE AND NOT IOS)
- add_definitions(-DHAVE_QUICKTIME=1)
+if(APPLE)
+ if (NOT IOS)
+ add_definitions(-DHAVE_QUICKTIME=1)
+ endif()
+
if(NOT OPENCV_BUILD_3RDPARTY_LIBS)
add_definitions(-DHAVE_IMAGEIO=1)
endif()
if(WITH_QUICKTIME)
set(highgui_srcs ${highgui_srcs} src/cap_qt.cpp)
else()
- set(highgui_srcs ${highgui_srcs} src/cap_qtkit.mm)
+ if (WITH_AVFOUNDATION)
+ add_definitions(-DHAVE_AVFOUNDATION=1)
+ set(highgui_srcs ${highgui_srcs} src/cap_avfoundation.mm)
+ else()
+ set(highgui_srcs ${highgui_srcs} src/cap_qtkit.mm)
+ endif()
endif()
+
+
+
+endif(APPLE)
-endif(APPLE AND NOT IOS)
-if (IOS)
- add_definitions(-DHAVE_IMAGEIO=1)
- set(highgui_srcs ${highgui_srcs} src/cap_avfoundation.mm)
-endif()
if(WITH_ANDROID_CAMERA)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../androidcamera/include")
defined(HAVE_DC1394_2) || defined(HAVE_DC1394) || defined(HAVE_CMU1394) || \
defined(HAVE_GSTREAMER) || defined(HAVE_MIL) || defined(HAVE_QUICKTIME) || \
defined(HAVE_UNICAP) || defined(HAVE_PVAPI) || defined(HAVE_OPENNI) || defined(HAVE_ANDROID_NATIVE_CAMERA) || \
- defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
+ defined(HAVE_AVFOUNDATION)
// local variable to memorize the captured device
CvCapture *capture;
#endif
break;
#endif
- #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
+ #ifdef HAVE_AVFOUNDATION
case CV_CAP_AVFOUNDATION:
capture = cvCreateCameraCapture_AVFoundation (index);
if (capture)
result = cvCreateFileCapture_QT (filename);
#endif
- #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
+ #ifdef HAVE_AVFOUNDATION
if (! result)
result = cvCreateFileCapture_AVFoundation (filename);
#endif
result = cvCreateVideoWriter_XINE(filename, fourcc, fps, frameSize, is_color);
#endif
*/
- #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
+ #ifdef HAVE_AVFOUNDATION
if (! result)
result = cvCreateVideoWriter_AVFoundation(filename, fourcc, fps, frameSize, is_color);
#endif
CvCapture* cvCreateCameraCapture_OpenNI( int index );
CvCapture* cvCreateCameraCapture_Android( int index );
CvCapture* cvCreateCameraCapture_XIMEA( int index );
+CvCapture* cvCreateCameraCapture_AVFoundation(int index);
+
CVAPI(int) cvHaveImageReader(const char* filename);
CVAPI(int) cvHaveImageWriter(const char* filename);
CvCapture* cvCreateFileCapture_XINE (const char* filename);
+
+
+
#define CV_CAP_GSTREAMER_1394 0
#define CV_CAP_GSTREAMER_V4L 1
#define CV_CAP_GSTREAMER_V4L2 2
CvVideoWriter* cvCreateVideoWriter_QT ( const char* filename, int fourcc,
double fps, CvSize frameSize, int is_color );
+CvCapture* cvCreateFileCapture_AVFoundation (const char * filename);
+CvVideoWriter* cvCreateVideoWriter_AVFoundation( const char* filename, int fourcc,
+ double fps, CvSize frameSize, int is_color );
+
+
CvCapture * cvCreateCameraCapture_Unicap (const int index);
CvCapture * cvCreateCameraCapture_PvAPI (const int index);
CvVideoWriter* cvCreateVideoWriter_GStreamer( const char* filename, int fourcc,