blob: 9c314aec15320a40a6210394ef0da3a817d85bc0 [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
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000011config("video_capture_config") {
12 if (is_ios) {
13 libs = [
14 "AVFoundation.framework",
15 "CoreMedia.framework",
16 "CoreVideo.framework",
17 ]
18 }
19}
20
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000021source_set("video_capture") {
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000022 sources = [
23 "device_info_impl.cc",
24 "device_info_impl.h",
25 "include/video_capture.h",
26 "include/video_capture_defines.h",
27 "include/video_capture_factory.h",
28 "video_capture_config.h",
29 "video_capture_delay.h",
30 "video_capture_factory.cc",
31 "video_capture_impl.cc",
32 "video_capture_impl.h",
33 ]
34
35 libs = []
36 deps = []
37
38 if (include_internal_video_capture) {
39 if (is_linux) {
40 sources += [
41 "linux/device_info_linux.cc",
42 "linux/device_info_linux.h",
43 "linux/video_capture_linux.cc",
44 "linux/video_capture_linux.h",
45 ]
46 }
47 if (is_mac) {
48 sources += [
49 "mac/qtkit/video_capture_qtkit.h",
50 "mac/qtkit/video_capture_qtkit.mm",
51 "mac/qtkit/video_capture_qtkit_info.h",
52 "mac/qtkit/video_capture_qtkit_info.mm",
53 "mac/qtkit/video_capture_qtkit_info_objc.h",
54 "mac/qtkit/video_capture_qtkit_info_objc.mm",
55 "mac/qtkit/video_capture_qtkit_objc.h",
56 "mac/qtkit/video_capture_qtkit_objc.mm",
57 "mac/qtkit/video_capture_qtkit_utility.h",
58 "mac/video_capture_mac.mm",
59 ]
60
61 libs += [
62 "CoreVideo.framework",
63 "QTKit.framework",
64 ]
65 }
66 if (is_win) {
67 sources += [
68 "windows/device_info_ds.cc",
69 "windows/device_info_ds.h",
70 "windows/device_info_mf.cc",
71 "windows/device_info_mf.h",
72 "windows/help_functions_ds.cc",
73 "windows/help_functions_ds.h",
74 "windows/sink_filter_ds.cc",
75 "windows/sink_filter_ds.h",
76 "windows/video_capture_ds.cc",
77 "windows/video_capture_ds.h",
78 "windows/video_capture_factory_windows.cc",
79 "windows/video_capture_mf.cc",
80 "windows/video_capture_mf.h",
81 ]
82
83 libs += [ "Strmiids.lib" ]
84 deps += [ "//third_party/winsdk_samples"]
85 }
86 if (is_android) {
87 sources += [
88 "android/device_info_android.cc",
89 "android/device_info_android.h",
90 "android/video_capture_android.cc",
91 "android/video_capture_android.h",
92 ]
93
94 deps += [
95 "//third_party/icu:icuuc",
96 "//third_party/jsoncpp",
97 ]
98 }
99 if (is_ios) {
100 sources += [
101 "ios/device_info_ios.h",
102 "ios/device_info_ios.mm",
103 "ios/device_info_ios_objc.h",
104 "ios/device_info_ios_objc.mm",
105 "ios/rtc_video_capture_ios_objc.h",
106 "ios/rtc_video_capture_ios_objc.mm",
107 "ios/video_capture_ios.h",
108 "ios/video_capture_ios.mm",
109 ]
110
111 cflags += [
112 "-fobjc-arc", # CLANG_ENABLE_OBJC_ARC = YES.
113 # To avoid warnings for deprecated videoMinFrameDuration and
114 # videoMaxFrameDuration properties in iOS 7.0.
115 # See webrtc:3705 for more details.
116 "-Wno-deprecated-declarations",
117 ]
118 }
119 } else {
120 sources += [
121 "external/device_info_external.cc",
122 "external/video_capture_external.cc",
123 ]
124 }
125
126 all_dependent_configs = [ ":video_capture_config"]
127
128 if (is_clang) {
129 # Suppress warnings from Chrome's Clang plugins.
130 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
131 configs -= [ "//build/config/clang:find_bad_constructs" ]
132 }
133
134 deps += [
135 "../../common_video",
136 "../../system_wrappers",
137 "../utility",
138 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000139}