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. |
| 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.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 15 | source_set("video_capture") { |
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 | |
| 35 | if (is_clang) { |
| 36 | # Suppress warnings from Chrome's Clang plugins. |
| 37 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 38 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 39 | } |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 40 | } |
kjellander@webrtc.org | 788f058 | 2014-08-28 13:51:08 +0000 | [diff] [blame] | 41 | |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 42 | source_set("video_capture_impl") { |
| 43 | sources = [ |
| 44 | "external/device_info_external.cc", |
| 45 | "external/video_capture_external.cc", |
kjellander@webrtc.org | 788f058 | 2014-08-28 13:51:08 +0000 | [diff] [blame] | 46 | ] |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 47 | |
| 48 | deps = [ |
| 49 | ":video_capture", |
andresp@webrtc.org | c7134f8 | 2014-09-18 10:06:54 +0000 | [diff] [blame] | 50 | "../../system_wrappers", |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 51 | ] |
| 52 | |
| 53 | if (is_clang) { |
| 54 | # Suppress warnings from Chrome's Clang plugins. |
| 55 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 56 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | config("video_capture_internal_impl_config") { |
| 61 | if (is_ios) { |
| 62 | libs = [ |
| 63 | "AVFoundation.framework", |
| 64 | "CoreMedia.framework", |
| 65 | "CoreVideo.framework", |
| 66 | ] |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | source_set("video_capture_internal_impl") { |
| 71 | deps = [ |
| 72 | ":video_capture", |
andresp@webrtc.org | c7134f8 | 2014-09-18 10:06:54 +0000 | [diff] [blame] | 73 | "../../system_wrappers", |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 74 | ] |
| 75 | |
| 76 | if (is_linux) { |
| 77 | sources = [ |
| 78 | "linux/device_info_linux.cc", |
| 79 | "linux/device_info_linux.h", |
| 80 | "linux/video_capture_linux.cc", |
| 81 | "linux/video_capture_linux.h", |
| 82 | ] |
| 83 | } |
| 84 | if (is_mac) { |
| 85 | sources = [ |
| 86 | "mac/qtkit/video_capture_qtkit.h", |
| 87 | "mac/qtkit/video_capture_qtkit.mm", |
| 88 | "mac/qtkit/video_capture_qtkit_info.h", |
| 89 | "mac/qtkit/video_capture_qtkit_info.mm", |
| 90 | "mac/qtkit/video_capture_qtkit_info_objc.h", |
| 91 | "mac/qtkit/video_capture_qtkit_info_objc.mm", |
| 92 | "mac/qtkit/video_capture_qtkit_objc.h", |
| 93 | "mac/qtkit/video_capture_qtkit_objc.mm", |
| 94 | "mac/qtkit/video_capture_qtkit_utility.h", |
| 95 | "mac/video_capture_mac.mm", |
| 96 | ] |
| 97 | |
| 98 | libs = [ |
| 99 | "CoreVideo.framework", |
| 100 | "QTKit.framework", |
| 101 | ] |
| 102 | } |
pbos@webrtc.org | faf2410 | 2014-09-23 12:37:06 +0000 | [diff] [blame] | 103 | # winsdk_samples isn't pulled into Chromium, so it is disabled for Chromium |
| 104 | # builds. This is not a problem since the internal video capture |
| 105 | # implementation should not be used in chrome - issue 3831. |
| 106 | if (is_win && !build_with_chromium) { |
andresp@webrtc.org | a74eda1 | 2014-09-17 11:50:19 +0000 | [diff] [blame] | 107 | sources = [ |
| 108 | "windows/device_info_ds.cc", |
| 109 | "windows/device_info_ds.h", |
| 110 | "windows/device_info_mf.cc", |
| 111 | "windows/device_info_mf.h", |
| 112 | "windows/help_functions_ds.cc", |
| 113 | "windows/help_functions_ds.h", |
| 114 | "windows/sink_filter_ds.cc", |
| 115 | "windows/sink_filter_ds.h", |
| 116 | "windows/video_capture_ds.cc", |
| 117 | "windows/video_capture_ds.h", |
| 118 | "windows/video_capture_factory_windows.cc", |
| 119 | "windows/video_capture_mf.cc", |
| 120 | "windows/video_capture_mf.h", |
| 121 | ] |
| 122 | |
| 123 | libs = [ "Strmiids.lib" ] |
| 124 | |
| 125 | deps += [ "//third_party/winsdk_samples"] |
| 126 | } |
| 127 | if (is_android) { |
| 128 | sources = [ |
| 129 | "android/device_info_android.cc", |
| 130 | "android/device_info_android.h", |
| 131 | "android/video_capture_android.cc", |
| 132 | "android/video_capture_android.h", |
| 133 | ] |
| 134 | |
| 135 | deps += [ |
| 136 | "//third_party/icu:icuuc", |
| 137 | "//third_party/jsoncpp", |
| 138 | ] |
| 139 | } |
| 140 | if (is_ios) { |
| 141 | sources = [ |
| 142 | "ios/device_info_ios.h", |
| 143 | "ios/device_info_ios.mm", |
| 144 | "ios/device_info_ios_objc.h", |
| 145 | "ios/device_info_ios_objc.mm", |
| 146 | "ios/rtc_video_capture_ios_objc.h", |
| 147 | "ios/rtc_video_capture_ios_objc.mm", |
| 148 | "ios/video_capture_ios.h", |
| 149 | "ios/video_capture_ios.mm", |
| 150 | ] |
| 151 | |
| 152 | cflags = [ |
| 153 | "-fobjc-arc", # CLANG_ENABLE_OBJC_ARC = YES. |
| 154 | # To avoid warnings for deprecated videoMinFrameDuration and |
| 155 | # videoMaxFrameDuration properties in iOS 7.0. |
| 156 | # See webrtc:3705 for more details. |
| 157 | "-Wno-deprecated-declarations", |
| 158 | ] |
| 159 | } |
| 160 | |
| 161 | all_dependent_configs = [ ":video_capture_internal_impl_config" ] |
| 162 | |
| 163 | if (is_clang) { |
| 164 | # Suppress warnings from Chrome's Clang plugins. |
| 165 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 166 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 167 | } |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 168 | } |