blob: 48b8fc09691735e2abdfb747158cdd2b59cc37ed [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.
12# Targets must link with either 'video_capture_impl' or
13# 'video_capture_internal_impl' depending on whether they want to
14# use the internal capturer.
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000015source_set("video_capture") {
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
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000045source_set("video_capture_impl") {
46 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 = [
52 ":video_capture",
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
66config("video_capture_internal_impl_config") {
67 if (is_ios) {
68 libs = [
69 "AVFoundation.framework",
70 "CoreMedia.framework",
71 "CoreVideo.framework",
72 ]
73 }
74}
75
76source_set("video_capture_internal_impl") {
77 deps = [
78 ":video_capture",
andresp@webrtc.orgc7134f82014-09-18 10:06:54 +000079 "../../system_wrappers",
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000080 ]
81
82 if (is_linux) {
83 sources = [
84 "linux/device_info_linux.cc",
85 "linux/device_info_linux.h",
86 "linux/video_capture_linux.cc",
87 "linux/video_capture_linux.h",
88 ]
89 }
90 if (is_mac) {
91 sources = [
92 "mac/qtkit/video_capture_qtkit.h",
93 "mac/qtkit/video_capture_qtkit.mm",
94 "mac/qtkit/video_capture_qtkit_info.h",
95 "mac/qtkit/video_capture_qtkit_info.mm",
96 "mac/qtkit/video_capture_qtkit_info_objc.h",
97 "mac/qtkit/video_capture_qtkit_info_objc.mm",
98 "mac/qtkit/video_capture_qtkit_objc.h",
99 "mac/qtkit/video_capture_qtkit_objc.mm",
100 "mac/qtkit/video_capture_qtkit_utility.h",
101 "mac/video_capture_mac.mm",
102 ]
103
104 libs = [
105 "CoreVideo.framework",
106 "QTKit.framework",
107 ]
108 }
pbos@webrtc.orgfaf24102014-09-23 12:37:06 +0000109 # winsdk_samples isn't pulled into Chromium, so it is disabled for Chromium
110 # builds. This is not a problem since the internal video capture
111 # implementation should not be used in chrome - issue 3831.
112 if (is_win && !build_with_chromium) {
andresp@webrtc.orga74eda12014-09-17 11:50:19 +0000113 sources = [
114 "windows/device_info_ds.cc",
115 "windows/device_info_ds.h",
116 "windows/device_info_mf.cc",
117 "windows/device_info_mf.h",
118 "windows/help_functions_ds.cc",
119 "windows/help_functions_ds.h",
120 "windows/sink_filter_ds.cc",
121 "windows/sink_filter_ds.h",
122 "windows/video_capture_ds.cc",
123 "windows/video_capture_ds.h",
124 "windows/video_capture_factory_windows.cc",
125 "windows/video_capture_mf.cc",
126 "windows/video_capture_mf.h",
127 ]
128
129 libs = [ "Strmiids.lib" ]
130
131 deps += [ "//third_party/winsdk_samples"]
132 }
133 if (is_android) {
134 sources = [
135 "android/device_info_android.cc",
136 "android/device_info_android.h",
137 "android/video_capture_android.cc",
138 "android/video_capture_android.h",
139 ]
140
141 deps += [
142 "//third_party/icu:icuuc",
143 "//third_party/jsoncpp",
144 ]
145 }
146 if (is_ios) {
147 sources = [
148 "ios/device_info_ios.h",
149 "ios/device_info_ios.mm",
150 "ios/device_info_ios_objc.h",
151 "ios/device_info_ios_objc.mm",
152 "ios/rtc_video_capture_ios_objc.h",
153 "ios/rtc_video_capture_ios_objc.mm",
154 "ios/video_capture_ios.h",
155 "ios/video_capture_ios.mm",
156 ]
157
158 cflags = [
159 "-fobjc-arc", # CLANG_ENABLE_OBJC_ARC = YES.
160 # To avoid warnings for deprecated videoMinFrameDuration and
161 # videoMaxFrameDuration properties in iOS 7.0.
162 # See webrtc:3705 for more details.
163 "-Wno-deprecated-declarations",
164 ]
165 }
166
167 all_dependent_configs = [ ":video_capture_internal_impl_config" ]
168
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000169 configs += [ "../..:common_config" ]
170 public_configs = [ "../..:common_inherited_config" ]
171
andresp@webrtc.orga74eda12014-09-17 11:50:19 +0000172 if (is_clang) {
173 # Suppress warnings from Chrome's Clang plugins.
174 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
175 configs -= [ "//build/config/clang:find_bad_constructs" ]
176 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000177}