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 = [ |
| 30 | "../../common_video", |
| 31 | "../../system_wrappers", |
| 32 | "../utility", |
| 33 | ] |
kjellander@webrtc.org | 788f058 | 2014-08-28 13:51:08 +0000 | [diff] [blame] | 34 | |
kjellander@webrtc.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 35 | configs += [ "../..:common_config" ] |
| 36 | public_configs = [ "../..:common_inherited_config" ] |
| 37 | |
kjellander@webrtc.org | 788f058 | 2014-08-28 13:51:08 +0000 | [diff] [blame] | 38 | 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.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 43 | } |
kjellander@webrtc.org | 788f058 | 2014-08-28 13:51:08 +0000 | [diff] [blame] | 44 | |
kjellander@webrtc.org | f58fe0a | 2015-02-11 07:47:00 +0000 | [diff] [blame^] | 45 | source_set("video_capture") { |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 46 | sources = [ |
| 47 | "external/device_info_external.cc", |
| 48 | "external/video_capture_external.cc", |
kjellander@webrtc.org | 788f058 | 2014-08-28 13:51:08 +0000 | [diff] [blame] | 49 | ] |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 50 | |
| 51 | deps = [ |
kjellander@webrtc.org | f58fe0a | 2015-02-11 07:47:00 +0000 | [diff] [blame^] | 52 | ":video_capture_module", |
andresp@webrtc.org | c7134f8 | 2014-09-18 10:06:54 +0000 | [diff] [blame] | 53 | "../../system_wrappers", |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 54 | ] |
| 55 | |
kjellander@webrtc.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 56 | configs += [ "../..:common_config" ] |
| 57 | public_configs = [ "../..:common_inherited_config" ] |
| 58 | |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 59 | 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.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 66 | if (!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.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 75 | } |
| 76 | |
kjellander@webrtc.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 77 | source_set("video_capture_internal_impl") { |
| 78 | deps = [ |
kjellander@webrtc.org | f58fe0a | 2015-02-11 07:47:00 +0000 | [diff] [blame^] | 79 | ":video_capture_module", |
kjellander@webrtc.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 80 | "../../system_wrappers", |
| 81 | ] |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 82 | |
kjellander@webrtc.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 83 | 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.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 104 | |
kjellander@webrtc.org | 853049f | 2015-01-20 11:40:45 +0000 | [diff] [blame] | 105 | 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.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 175 | } |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 176 | } |