kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 1 | # 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 | |
| 9 | import("../../build/webrtc.gni") |
| 10 | |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 11 | # Note this target is missing an implementation for the video capture. |
kjellander@webrtc.org | f58fe0a | 2015-02-11 07:47:00 +0000 | [diff] [blame] | 12 | # Targets must link with either 'video_capture' or |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 13 | # 'video_capture_internal_impl' depending on whether they want to |
| 14 | # use the internal capturer. |
kjellander@webrtc.org | f58fe0a | 2015-02-11 07:47:00 +0000 | [diff] [blame] | 15 | source_set("video_capture_module") { |
kjellander@webrtc.org | 788f058 | 2014-08-28 13:51:08 +0000 | [diff] [blame] | 16 | 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.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 29 | deps = [ |
kwiberg@webrtc.org | ac2d27d | 2015-02-26 13:59:22 +0000 | [diff] [blame] | 30 | "../..:webrtc_common", |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 31 | "../../common_video", |
| 32 | "../../system_wrappers", |
| 33 | "../utility", |
| 34 | ] |
kjellander@webrtc.org | 788f058 | 2014-08-28 13:51:08 +0000 | [diff] [blame] | 35 | |
kjellander@webrtc.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 36 | configs += [ "../..:common_config" ] |
| 37 | public_configs = [ "../..:common_inherited_config" ] |
| 38 | |
kjellander@webrtc.org | 788f058 | 2014-08-28 13:51:08 +0000 | [diff] [blame] | 39 | 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.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 44 | } |
kjellander@webrtc.org | 788f058 | 2014-08-28 13:51:08 +0000 | [diff] [blame] | 45 | |
kjellander@webrtc.org | f58fe0a | 2015-02-11 07:47:00 +0000 | [diff] [blame] | 46 | source_set("video_capture") { |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 47 | sources = [ |
| 48 | "external/device_info_external.cc", |
| 49 | "external/video_capture_external.cc", |
kjellander@webrtc.org | 788f058 | 2014-08-28 13:51:08 +0000 | [diff] [blame] | 50 | ] |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 51 | |
| 52 | deps = [ |
kjellander@webrtc.org | f58fe0a | 2015-02-11 07:47:00 +0000 | [diff] [blame] | 53 | ":video_capture_module", |
andresp@webrtc.org | c7134f8 | 2014-09-18 10:06:54 +0000 | [diff] [blame] | 54 | "../../system_wrappers", |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 55 | ] |
| 56 | |
kjellander@webrtc.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 57 | configs += [ "../..:common_config" ] |
| 58 | public_configs = [ "../..:common_inherited_config" ] |
| 59 | |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 60 | 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.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 67 | if (!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.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 76 | } |
| 77 | |
kjellander@webrtc.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 78 | source_set("video_capture_internal_impl") { |
| 79 | deps = [ |
kjellander@webrtc.org | f58fe0a | 2015-02-11 07:47:00 +0000 | [diff] [blame] | 80 | ":video_capture_module", |
kjellander@webrtc.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 81 | "../../system_wrappers", |
| 82 | ] |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 83 | |
kjellander@webrtc.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 84 | 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.org | ac2d27d | 2015-02-26 13:59:22 +0000 | [diff] [blame] | 91 | deps += [ "../..:webrtc_common" ] |
kjellander@webrtc.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 92 | } |
| 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.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 106 | |
kjellander@webrtc.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 107 | 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 Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame^] | 131 | deps += [ "//third_party/winsdk_samples" ] |
kjellander@webrtc.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 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 | |
Henrik Kjellander | e6cefb6 | 2015-04-27 14:39:04 +0200 | [diff] [blame] | 141 | if (rtc_build_json) { |
| 142 | deps += [ "//third_party/jsoncpp" ] |
| 143 | } |
| 144 | if (rtc_build_icu) { |
| 145 | deps += [ "//third_party/icu:icuuc" ] |
| 146 | } |
kjellander@webrtc.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 147 | } |
| 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 Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame^] | 162 | |
kjellander@webrtc.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 163 | # 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.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 180 | } |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 181 | } |