1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree.
12 # Note this library is missing an implementation for the video capture.
13 # Targets must link with either 'video_capture_module_impl' or
14 # 'video_capture_module_internal_impl' depending on whether they want to
15 # use the internal capturer.
16 'target_name': 'video_capture_module',
17 'type': 'static_library',
20 '<(webrtc_root)/common_video/common_video.gyp:common_video',
21 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
24 'device_info_impl.cc',
26 'include/video_capture.h',
27 'include/video_capture_defines.h',
28 'include/video_capture_factory.h',
29 'video_capture_config.h',
30 'video_capture_delay.h',
31 'video_capture_factory.cc',
32 'video_capture_impl.cc',
33 'video_capture_impl.h',
37 # Default video capture module implementation that only supports external
39 'target_name': 'video_capture_module_impl',
40 'type': 'static_library',
42 'video_capture_module',
45 'external/device_info_external.cc',
46 'external/video_capture_external.cc',
50 'target_name': 'video_capture_module_internal_impl',
51 'type': 'static_library',
53 'video_capture_module',
58 'linux/device_info_linux.cc',
59 'linux/device_info_linux.h',
60 'linux/video_capture_linux.cc',
61 'linux/video_capture_linux.h',
66 'mac/qtkit/video_capture_qtkit.h',
67 'mac/qtkit/video_capture_qtkit.mm',
68 'mac/qtkit/video_capture_qtkit_info.h',
69 'mac/qtkit/video_capture_qtkit_info.mm',
70 'mac/qtkit/video_capture_qtkit_info_objc.h',
71 'mac/qtkit/video_capture_qtkit_info_objc.mm',
72 'mac/qtkit/video_capture_qtkit_objc.h',
73 'mac/qtkit/video_capture_qtkit_objc.mm',
74 'mac/qtkit/video_capture_qtkit_utility.h',
75 'mac/video_capture_mac.mm',
81 '-framework CoreVideo',
87 # Note that since winsdk_samples isn't pulled into chromium gyp will
88 # fail to parse this rule and try to resolve the dependencies. This
89 # is not a problem since the internal video capture implementation
90 # should not be used in chrome - issue 3831.
91 ['OS=="win" and build_with_chromium==0', {
93 '<(DEPTH)/third_party/winsdk_samples/winsdk_samples.gyp:directshow_baseclasses',
96 'windows/device_info_ds.cc',
97 'windows/device_info_ds.h',
98 'windows/device_info_mf.cc',
99 'windows/device_info_mf.h',
100 'windows/help_functions_ds.cc',
101 'windows/help_functions_ds.h',
102 'windows/sink_filter_ds.cc',
103 'windows/sink_filter_ds.h',
104 'windows/video_capture_ds.cc',
105 'windows/video_capture_ds.h',
106 'windows/video_capture_factory_windows.cc',
107 'windows/video_capture_mf.cc',
108 'windows/video_capture_mf.h',
118 '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
119 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
122 'android/device_info_android.cc',
123 'android/device_info_android.h',
124 'android/video_capture_android.cc',
125 'android/video_capture_android.h',
130 'ios/device_info_ios.h',
131 'ios/device_info_ios.mm',
132 'ios/device_info_ios_objc.h',
133 'ios/device_info_ios_objc.mm',
134 'ios/rtc_video_capture_ios_objc.h',
135 'ios/rtc_video_capture_ios_objc.mm',
136 'ios/video_capture_ios.h',
137 'ios/video_capture_ios.mm',
140 'CLANG_ENABLE_OBJC_ARC': 'YES',
142 'all_dependent_settings': {
145 '-framework AVFoundation',
146 '-framework CoreMedia',
147 '-framework CoreVideo',
157 ['include_tests==1', {
160 'target_name': 'video_capture_tests',
161 'type': '<(gtest_target_type)',
163 'video_capture_module',
164 'video_capture_module_internal_impl',
166 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
167 '<(DEPTH)/testing/gtest.gyp:gtest',
170 'ensure_initialized.cc',
171 'ensure_initialized.h',
172 'test/video_capture_unittest.cc',
173 'test/video_capture_main_mac.mm',
176 ['OS=="mac" or OS=="linux"', {
178 '-Wno-write-strings',
193 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
195 # Need to disable error due to the line in
196 # base/android/jni_android.h triggering it:
197 # const BASE_EXPORT jobject GetApplicationContext()
198 # error: type qualifiers ignored on function return type
200 '-Wno-ignored-qualifiers',
205 # Link with a special main for mac so we can use the webcam.
206 '<(webrtc_root)/test/test.gyp:test_support_main_threaded_mac',
209 # TODO(andrew): CoreAudio and AudioToolbox shouldn't be needed.
211 '-framework Foundation -framework AppKit -framework Cocoa -framework OpenGL -framework CoreVideo -framework CoreAudio -framework AudioToolbox',
217 # Otherwise, use the regular main.
218 '<(webrtc_root)/test/test.gyp:test_support_main',
228 'target_name': 'video_capture_tests_apk_target',
231 '<(apk_tests_path):video_capture_tests_apk',
236 ['test_isolation_mode != "noop"', {
239 'target_name': 'video_capture_tests_run',
242 'video_capture_tests',
245 '../../build/isolate.gypi',
248 'video_capture_tests.isolate',