Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
3a3bc183
Commit
3a3bc183
authored
Aug 24, 2011
by
Artem Myagkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified capturing building ligic for iOS
parent
8c678230
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
21 deletions
+43
-21
CMakeLists.txt
CMakeLists.txt
+7
-1
cvconfig.h.cmake
cvconfig.h.cmake
+3
-0
Toolchain-iPhoneSimulator_Xcode.cmake
ios/cmake/Toolchains/Toolchain-iPhoneSimulator_Xcode.cmake
+3
-3
CMakeLists.txt
modules/highgui/CMakeLists.txt
+16
-13
cap.cpp
modules/highgui/src/cap.cpp
+4
-4
precomp.hpp
modules/highgui/src/precomp.hpp
+10
-0
No files found.
CMakeLists.txt
View file @
3a3bc183
...
...
@@ -414,7 +414,7 @@ set(WITH_JPEG ON CACHE BOOL "Include JPEG support")
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"
)
...
...
@@ -429,11 +429,17 @@ if(UNIX)
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"
)
...
...
cvconfig.h.cmake
View file @
3a3bc183
...
...
@@ -100,6 +100,9 @@
/* QuickTime video libraries */
#cmakedefine HAVE_QUICKTIME
/* AVFoundation video libraries */
#cmakedefine HAVE_AVFOUNDATION
/* TIFF codec */
#cmakedefine HAVE_TIFF
...
...
ios/cmake/Toolchains/Toolchain-iPhoneSimulator_Xcode.cmake
View file @
3a3bc183
message
(
STATUS
"Setting up iPhone
OS
toolchain"
)
message
(
STATUS
"Setting up iPhone
Simulator
toolchain"
)
set
(
IPHONESIMULATOR TRUE
)
# Standard settings
...
...
@@ -21,4 +21,4 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
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
modules/highgui/CMakeLists.txt
View file @
3a3bc183
...
...
@@ -125,9 +125,7 @@ if(WIN32)
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
)
...
...
@@ -174,8 +172,6 @@ if(UNIX)
endif
()
endif
()
endif
(
NOT IOS
)
foreach
(
P
${
HIGHGUI_INCLUDE_DIRS
}
)
include_directories
(
${
P
}
)
endforeach
()
...
...
@@ -192,8 +188,11 @@ if(WITH_OPENNI AND HAVE_OPENNI)
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
()
...
...
@@ -211,15 +210,19 @@ if(APPLE AND NOT IOS)
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"
)
...
...
modules/highgui/src/cap.cpp
View file @
3a3bc183
...
...
@@ -157,7 +157,7 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
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
...
...
@@ -281,7 +281,7 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
break
;
#endif
#if
TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
#if
def HAVE_AVFOUNDATION
case
CV_CAP_AVFOUNDATION
:
capture
=
cvCreateCameraCapture_AVFoundation
(
index
);
if
(
capture
)
...
...
@@ -321,7 +321,7 @@ CV_IMPL CvCapture * cvCreateFileCapture (const char * filename)
result
=
cvCreateFileCapture_QT
(
filename
);
#endif
#if
TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
#if
def HAVE_AVFOUNDATION
if
(
!
result
)
result
=
cvCreateFileCapture_AVFoundation
(
filename
);
#endif
...
...
@@ -354,7 +354,7 @@ CV_IMPL CvVideoWriter* cvCreateVideoWriter( const char* filename, int fourcc,
result = cvCreateVideoWriter_XINE(filename, fourcc, fps, frameSize, is_color);
#endif
*/
#if
TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
#if
def HAVE_AVFOUNDATION
if
(
!
result
)
result
=
cvCreateVideoWriter_AVFoundation
(
filename
,
fourcc
,
fps
,
frameSize
,
is_color
);
#endif
...
...
modules/highgui/src/precomp.hpp
View file @
3a3bc183
...
...
@@ -134,6 +134,8 @@ CvCapture* cvCreateCameraCapture_DShow( int index );
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
);
...
...
@@ -143,6 +145,9 @@ CvVideoWriter* cvCreateVideoWriter_Images(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
...
...
@@ -161,6 +166,11 @@ CvCapture * cvCreateCameraCapture_QT (const int index);
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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment