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 9import("../../build/webrtc.gni") 10 11# Note this target is missing an implementation for the video capture. 12# Targets must link with either 'video_capture' or 13# 'video_capture_internal_impl' depending on whether they want to 14# use the internal capturer. 15source_set("video_capture_module") { 16 sources = [ 17 "device_info_impl.cc", 18 "device_info_impl.h", 19 "video_capture.h", 20 "video_capture_config.h", 21 "video_capture_defines.h", 22 "video_capture_delay.h", 23 "video_capture_factory.h", 24 "video_capture_factory.cc", 25 "video_capture_impl.cc", 26 "video_capture_impl.h", 27 ] 28 29 deps = [ 30 "../..:webrtc_common", 31 "../../common_video", 32 "../../system_wrappers", 33 "../utility", 34 ] 35 36 configs += [ "../..:common_config" ] 37 public_configs = [ "../..:common_inherited_config" ] 38 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 } 44} 45 46source_set("video_capture") { 47 sources = [ 48 "external/device_info_external.cc", 49 "external/video_capture_external.cc", 50 ] 51 52 deps = [ 53 ":video_capture_module", 54 "../../system_wrappers", 55 ] 56 57 configs += [ "../..:common_config" ] 58 public_configs = [ "../..:common_inherited_config" ] 59 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 67if (!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 } 76 } 77 78 source_set("video_capture_internal_impl") { 79 deps = [ 80 ":video_capture_module", 81 "../../system_wrappers", 82 ] 83 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 ] 91 deps += [ "../..:webrtc_common" ] 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 ] 106 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 131 deps += [ "//third_party/winsdk_samples" ] 132 } 133 if (is_ios) { 134 sources = [ 135 "ios/device_info_ios.h", 136 "ios/device_info_ios.mm", 137 "ios/device_info_ios_objc.h", 138 "ios/device_info_ios_objc.mm", 139 "ios/rtc_video_capture_ios_objc.h", 140 "ios/rtc_video_capture_ios_objc.mm", 141 "ios/video_capture_ios.h", 142 "ios/video_capture_ios.mm", 143 ] 144 145 cflags = [ 146 "-fobjc-arc", # CLANG_ENABLE_OBJC_ARC = YES. 147 148 # To avoid warnings for deprecated videoMinFrameDuration and 149 # videoMaxFrameDuration properties in iOS 7.0. 150 # See webrtc:3705 for more details. 151 "-Wno-deprecated-declarations", 152 ] 153 } 154 155 all_dependent_configs = [ ":video_capture_internal_impl_config" ] 156 157 configs += [ "../..:common_config" ] 158 public_configs = [ "../..:common_inherited_config" ] 159 160 if (is_clang) { 161 # Suppress warnings from Chrome's Clang plugins. 162 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 163 configs -= [ "//build/config/clang:find_bad_constructs" ] 164 } 165 } 166} 167