blob: a924ecdc28d74d76d00593241c113a247728971d [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2#
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.
8
9import("../../build/webrtc.gni")
10
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000011# Note this target is missing an implementation for the video capture.
kjellander@webrtc.orgf58fe0a2015-02-11 07:47:00 +000012# Targets must link with either 'video_capture' or
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000013# 'video_capture_internal_impl' depending on whether they want to
14# use the internal capturer.
kjellander@webrtc.orgf58fe0a2015-02-11 07:47:00 +000015source_set("video_capture_module") {
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000016 sources = [
17 "device_info_impl.cc",
18 "device_info_impl.h",
19 "include/video_capture.h",
20 "include/video_capture_defines.h",
21 "include/video_capture_factory.h",
22 "video_capture_config.h",
23 "video_capture_delay.h",
24 "video_capture_factory.cc",
25 "video_capture_impl.cc",
26 "video_capture_impl.h",
27 ]
28
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000029 deps = [
30 "../../common_video",
31 "../../system_wrappers",
32 "../utility",
33 ]
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000034
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000035 configs += [ "../..:common_config" ]
36 public_configs = [ "../..:common_inherited_config" ]
37
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000038 if (is_clang) {
39 # Suppress warnings from Chrome's Clang plugins.
40 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
41 configs -= [ "//build/config/clang:find_bad_constructs" ]
42 }
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000043}
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000044
kjellander@webrtc.orgf58fe0a2015-02-11 07:47:00 +000045source_set("video_capture") {
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000046 sources = [
47 "external/device_info_external.cc",
48 "external/video_capture_external.cc",
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000049 ]
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000050
51 deps = [
kjellander@webrtc.orgf58fe0a2015-02-11 07:47:00 +000052 ":video_capture_module",
andresp@webrtc.orgc7134f82014-09-18 10:06:54 +000053 "../../system_wrappers",
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000054 ]
55
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000056 configs += [ "../..:common_config" ]
57 public_configs = [ "../..:common_inherited_config" ]
58
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000059 if (is_clang) {
60 # Suppress warnings from Chrome's Clang plugins.
61 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
62 configs -= [ "//build/config/clang:find_bad_constructs" ]
63 }
64}
65
kjellander@webrtc.org853049f2015-01-20 11:40:45 +000066if (!build_with_chromium) {
67 config("video_capture_internal_impl_config") {
68 if (is_ios) {
69 libs = [
70 "AVFoundation.framework",
71 "CoreMedia.framework",
72 "CoreVideo.framework",
73 ]
74 }
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000075 }
76
kjellander@webrtc.org853049f2015-01-20 11:40:45 +000077 source_set("video_capture_internal_impl") {
78 deps = [
kjellander@webrtc.orgf58fe0a2015-02-11 07:47:00 +000079 ":video_capture_module",
kjellander@webrtc.org853049f2015-01-20 11:40:45 +000080 "../../system_wrappers",
81 ]
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000082
kjellander@webrtc.org853049f2015-01-20 11:40:45 +000083 if (is_linux) {
84 sources = [
85 "linux/device_info_linux.cc",
86 "linux/device_info_linux.h",
87 "linux/video_capture_linux.cc",
88 "linux/video_capture_linux.h",
89 ]
90 }
91 if (is_mac) {
92 sources = [
93 "mac/qtkit/video_capture_qtkit.h",
94 "mac/qtkit/video_capture_qtkit.mm",
95 "mac/qtkit/video_capture_qtkit_info.h",
96 "mac/qtkit/video_capture_qtkit_info.mm",
97 "mac/qtkit/video_capture_qtkit_info_objc.h",
98 "mac/qtkit/video_capture_qtkit_info_objc.mm",
99 "mac/qtkit/video_capture_qtkit_objc.h",
100 "mac/qtkit/video_capture_qtkit_objc.mm",
101 "mac/qtkit/video_capture_qtkit_utility.h",
102 "mac/video_capture_mac.mm",
103 ]
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000104
kjellander@webrtc.org853049f2015-01-20 11:40:45 +0000105 libs = [
106 "CoreVideo.framework",
107 "QTKit.framework",
108 ]
109 }
110 if (is_win) {
111 sources = [
112 "windows/device_info_ds.cc",
113 "windows/device_info_ds.h",
114 "windows/device_info_mf.cc",
115 "windows/device_info_mf.h",
116 "windows/help_functions_ds.cc",
117 "windows/help_functions_ds.h",
118 "windows/sink_filter_ds.cc",
119 "windows/sink_filter_ds.h",
120 "windows/video_capture_ds.cc",
121 "windows/video_capture_ds.h",
122 "windows/video_capture_factory_windows.cc",
123 "windows/video_capture_mf.cc",
124 "windows/video_capture_mf.h",
125 ]
126
127 libs = [ "Strmiids.lib" ]
128
129 deps += [ "//third_party/winsdk_samples"]
130 }
131 if (is_android) {
132 sources = [
133 "android/device_info_android.cc",
134 "android/device_info_android.h",
135 "android/video_capture_android.cc",
136 "android/video_capture_android.h",
137 ]
138
139 deps += [
140 "//third_party/icu:icuuc",
141 "//third_party/jsoncpp",
142 ]
143 }
144 if (is_ios) {
145 sources = [
146 "ios/device_info_ios.h",
147 "ios/device_info_ios.mm",
148 "ios/device_info_ios_objc.h",
149 "ios/device_info_ios_objc.mm",
150 "ios/rtc_video_capture_ios_objc.h",
151 "ios/rtc_video_capture_ios_objc.mm",
152 "ios/video_capture_ios.h",
153 "ios/video_capture_ios.mm",
154 ]
155
156 cflags = [
157 "-fobjc-arc", # CLANG_ENABLE_OBJC_ARC = YES.
158 # To avoid warnings for deprecated videoMinFrameDuration and
159 # videoMaxFrameDuration properties in iOS 7.0.
160 # See webrtc:3705 for more details.
161 "-Wno-deprecated-declarations",
162 ]
163 }
164
165 all_dependent_configs = [ ":video_capture_internal_impl_config" ]
166
167 configs += [ "../..:common_config" ]
168 public_configs = [ "../..:common_inherited_config" ]
169
170 if (is_clang) {
171 # Suppress warnings from Chrome's Clang plugins.
172 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
173 configs -= [ "//build/config/clang:find_bad_constructs" ]
174 }
andresp@webrtc.orga74eda12014-09-17 11:50:19 +0000175 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000176}