blob: f29e5b6c67978ebf7499efc2a674cf18e41e21dd [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 = [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000030 "../..:webrtc_common",
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000031 "../../common_video",
32 "../../system_wrappers",
33 "../utility",
34 ]
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000035
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000036 configs += [ "../..:common_config" ]
37 public_configs = [ "../..:common_inherited_config" ]
38
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000039 if (is_clang) {
40 # Suppress warnings from Chrome's Clang plugins.
41 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
42 configs -= [ "//build/config/clang:find_bad_constructs" ]
43 }
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000044}
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000045
kjellander@webrtc.orgf58fe0a2015-02-11 07:47:00 +000046source_set("video_capture") {
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000047 sources = [
48 "external/device_info_external.cc",
49 "external/video_capture_external.cc",
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000050 ]
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000051
52 deps = [
kjellander@webrtc.orgf58fe0a2015-02-11 07:47:00 +000053 ":video_capture_module",
andresp@webrtc.orgc7134f82014-09-18 10:06:54 +000054 "../../system_wrappers",
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000055 ]
56
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000057 configs += [ "../..:common_config" ]
58 public_configs = [ "../..:common_inherited_config" ]
59
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000060 if (is_clang) {
61 # Suppress warnings from Chrome's Clang plugins.
62 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
63 configs -= [ "//build/config/clang:find_bad_constructs" ]
64 }
65}
66
kjellander@webrtc.org853049f2015-01-20 11:40:45 +000067if (!build_with_chromium) {
68 config("video_capture_internal_impl_config") {
69 if (is_ios) {
70 libs = [
71 "AVFoundation.framework",
72 "CoreMedia.framework",
73 "CoreVideo.framework",
74 ]
75 }
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000076 }
77
kjellander@webrtc.org853049f2015-01-20 11:40:45 +000078 source_set("video_capture_internal_impl") {
79 deps = [
kjellander@webrtc.orgf58fe0a2015-02-11 07:47:00 +000080 ":video_capture_module",
kjellander@webrtc.org853049f2015-01-20 11:40:45 +000081 "../../system_wrappers",
82 ]
andresp@webrtc.orga74eda12014-09-17 11:50:19 +000083
kjellander@webrtc.org853049f2015-01-20 11:40:45 +000084 if (is_linux) {
85 sources = [
86 "linux/device_info_linux.cc",
87 "linux/device_info_linux.h",
88 "linux/video_capture_linux.cc",
89 "linux/video_capture_linux.h",
90 ]
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000091 deps += [ "../..:webrtc_common" ]
kjellander@webrtc.org853049f2015-01-20 11:40:45 +000092 }
93 if (is_mac) {
94 sources = [
95 "mac/qtkit/video_capture_qtkit.h",
96 "mac/qtkit/video_capture_qtkit.mm",
97 "mac/qtkit/video_capture_qtkit_info.h",
98 "mac/qtkit/video_capture_qtkit_info.mm",
99 "mac/qtkit/video_capture_qtkit_info_objc.h",
100 "mac/qtkit/video_capture_qtkit_info_objc.mm",
101 "mac/qtkit/video_capture_qtkit_objc.h",
102 "mac/qtkit/video_capture_qtkit_objc.mm",
103 "mac/qtkit/video_capture_qtkit_utility.h",
104 "mac/video_capture_mac.mm",
105 ]
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000106
kjellander@webrtc.org853049f2015-01-20 11:40:45 +0000107 libs = [
108 "CoreVideo.framework",
109 "QTKit.framework",
110 ]
111 }
112 if (is_win) {
113 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
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200131 deps += [ "//third_party/winsdk_samples" ]
kjellander@webrtc.org853049f2015-01-20 11:40:45 +0000132 }
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
Henrik Kjellandere6cefb62015-04-27 14:39:04 +0200141 if (rtc_build_json) {
142 deps += [ "//third_party/jsoncpp" ]
143 }
144 if (rtc_build_icu) {
145 deps += [ "//third_party/icu:icuuc" ]
146 }
kjellander@webrtc.org853049f2015-01-20 11:40:45 +0000147 }
148 if (is_ios) {
149 sources = [
150 "ios/device_info_ios.h",
151 "ios/device_info_ios.mm",
152 "ios/device_info_ios_objc.h",
153 "ios/device_info_ios_objc.mm",
154 "ios/rtc_video_capture_ios_objc.h",
155 "ios/rtc_video_capture_ios_objc.mm",
156 "ios/video_capture_ios.h",
157 "ios/video_capture_ios.mm",
158 ]
159
160 cflags = [
161 "-fobjc-arc", # CLANG_ENABLE_OBJC_ARC = YES.
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200162
kjellander@webrtc.org853049f2015-01-20 11:40:45 +0000163 # To avoid warnings for deprecated videoMinFrameDuration and
164 # videoMaxFrameDuration properties in iOS 7.0.
165 # See webrtc:3705 for more details.
166 "-Wno-deprecated-declarations",
167 ]
168 }
169
170 all_dependent_configs = [ ":video_capture_internal_impl_config" ]
171
172 configs += [ "../..:common_config" ]
173 public_configs = [ "../..:common_inherited_config" ]
174
175 if (is_clang) {
176 # Suppress warnings from Chrome's Clang plugins.
177 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
178 configs -= [ "//build/config/clang:find_bad_constructs" ]
179 }
andresp@webrtc.orga74eda12014-09-17 11:50:19 +0000180 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000181}