| OLD | NEW |
| (Empty) |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import("//build/config/features.gni") | |
| 6 import("//media/media_options.gni") | |
| 7 import("//testing/test.gni") | |
| 8 | |
| 9 component("capture") { | |
| 10 defines = [ "CAPTURE_IMPLEMENTATION" ] | |
| 11 sources = [ | |
| 12 "capture_export.h", | |
| 13 "content/animated_content_sampler.cc", | |
| 14 "content/animated_content_sampler.h", | |
| 15 "content/capture_resolution_chooser.cc", | |
| 16 "content/capture_resolution_chooser.h", | |
| 17 "content/feedback_signal_accumulator.h", | |
| 18 "content/screen_capture_device_core.cc", | |
| 19 "content/screen_capture_device_core.h", | |
| 20 "content/smooth_event_sampler.cc", | |
| 21 "content/smooth_event_sampler.h", | |
| 22 "content/thread_safe_capture_oracle.cc", | |
| 23 "content/thread_safe_capture_oracle.h", | |
| 24 "content/video_capture_oracle.cc", | |
| 25 "content/video_capture_oracle.h", | |
| 26 "device_monitor_mac.h", | |
| 27 "device_monitor_mac.mm", | |
| 28 "system_message_window_win.cc", | |
| 29 "system_message_window_win.h", | |
| 30 "video/fake_video_capture_device.cc", | |
| 31 "video/fake_video_capture_device.h", | |
| 32 "video/fake_video_capture_device_factory.cc", | |
| 33 "video/fake_video_capture_device_factory.h", | |
| 34 "video/file_video_capture_device.cc", | |
| 35 "video/file_video_capture_device.h", | |
| 36 "video/file_video_capture_device_factory.cc", | |
| 37 "video/file_video_capture_device_factory.h", | |
| 38 "video/linux/v4l2_capture_delegate.cc", | |
| 39 "video/linux/video_capture_device_chromeos.cc", | |
| 40 "video/linux/video_capture_device_chromeos.h", | |
| 41 "video/linux/video_capture_device_factory_linux.cc", | |
| 42 "video/linux/video_capture_device_factory_linux.h", | |
| 43 "video/linux/video_capture_device_linux.cc", | |
| 44 "video/linux/video_capture_device_linux.h", | |
| 45 "video/mac/video_capture_device_avfoundation_mac.h", | |
| 46 "video/mac/video_capture_device_avfoundation_mac.mm", | |
| 47 "video/mac/video_capture_device_decklink_mac.h", | |
| 48 "video/mac/video_capture_device_decklink_mac.mm", | |
| 49 "video/mac/video_capture_device_factory_mac.h", | |
| 50 "video/mac/video_capture_device_factory_mac.mm", | |
| 51 "video/mac/video_capture_device_mac.h", | |
| 52 "video/mac/video_capture_device_mac.mm", | |
| 53 "video/scoped_result_callback.h", | |
| 54 "video/video_capture_device.cc", | |
| 55 "video/video_capture_device.h", | |
| 56 "video/video_capture_device_factory.cc", | |
| 57 "video/video_capture_device_factory.h", | |
| 58 "video/video_capture_device_info.cc", | |
| 59 "video/video_capture_device_info.h", | |
| 60 "video/win/capability_list_win.cc", | |
| 61 "video/win/capability_list_win.h", | |
| 62 "video/win/filter_base_win.cc", | |
| 63 "video/win/filter_base_win.h", | |
| 64 "video/win/pin_base_win.cc", | |
| 65 "video/win/pin_base_win.h", | |
| 66 "video/win/sink_filter_observer_win.h", | |
| 67 "video/win/sink_filter_win.cc", | |
| 68 "video/win/sink_filter_win.h", | |
| 69 "video/win/sink_input_pin_win.cc", | |
| 70 "video/win/sink_input_pin_win.h", | |
| 71 "video/win/video_capture_device_factory_win.cc", | |
| 72 "video/win/video_capture_device_factory_win.h", | |
| 73 "video/win/video_capture_device_mf_win.cc", | |
| 74 "video/win/video_capture_device_mf_win.h", | |
| 75 "video/win/video_capture_device_win.cc", | |
| 76 "video/win/video_capture_device_win.h", | |
| 77 ] | |
| 78 | |
| 79 public_deps = [] | |
| 80 deps = [ | |
| 81 "//base", | |
| 82 "//base:i18n", | |
| 83 "//media", | |
| 84 "//media/mojo/interfaces:image_capture", | |
| 85 "//skia", | |
| 86 "//ui/display", | |
| 87 "//ui/gfx", | |
| 88 ] | |
| 89 | |
| 90 configs += [ | |
| 91 # TODO(mcasas): media/base should be a component and not a source_set, but | |
| 92 # it depends on parts of media/filters, media/ffmpeg etc. Until then, we | |
| 93 # pretend to be inside media.dll and duplicate the few symbols needed, see | |
| 94 # https://crbug.com/590017. | |
| 95 "//media:media_implementation", | |
| 96 ] | |
| 97 | |
| 98 if (is_android) { | |
| 99 public_deps += [ | |
| 100 "content/android", | |
| 101 "content/android:screen_capture_java", | |
| 102 "video/android", | |
| 103 "video/android:capture_java", | |
| 104 ] | |
| 105 deps += [ | |
| 106 "content/android:screen_capture_jni_headers", | |
| 107 "video/android:capture_jni_headers", | |
| 108 ] | |
| 109 } | |
| 110 | |
| 111 if (is_mac) { | |
| 112 deps += [ "//third_party/decklink" ] | |
| 113 libs = [ | |
| 114 "CoreFoundation.framework", | |
| 115 "CoreGraphics.framework", | |
| 116 "CoreVideo.framework", | |
| 117 "Foundation.framework", | |
| 118 ] | |
| 119 } | |
| 120 | |
| 121 if (use_udev) { | |
| 122 deps += [ "//device/udev_linux" ] | |
| 123 sources += [ | |
| 124 "device_monitor_udev.cc", | |
| 125 "device_monitor_udev.h", | |
| 126 ] | |
| 127 } | |
| 128 | |
| 129 if (is_win) { | |
| 130 deps += [ | |
| 131 "//media/base", # For media_switches. | |
| 132 "//media/base/win", | |
| 133 ] | |
| 134 libs = [ | |
| 135 "mf.lib", | |
| 136 "mfplat.lib", | |
| 137 "mfreadwrite.lib", | |
| 138 "mfuuid.lib", | |
| 139 ] | |
| 140 ldflags = [ | |
| 141 "/DELAYLOAD:mf.dll", | |
| 142 "/DELAYLOAD:mfplat.dll", | |
| 143 "/DELAYLOAD:mfreadwrite.dll", | |
| 144 ] | |
| 145 | |
| 146 # TODO(jschuh): https://crbug.com/167187 fix size_t to int truncations. | |
| 147 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | |
| 148 } | |
| 149 } | |
| 150 | |
| 151 test("capture_unittests") { | |
| 152 sources = [ | |
| 153 "content/animated_content_sampler_unittest.cc", | |
| 154 "content/capture_resolution_chooser_unittest.cc", | |
| 155 "content/feedback_signal_accumulator_unittest.cc", | |
| 156 "content/smooth_event_sampler_unittest.cc", | |
| 157 "content/video_capture_oracle_unittest.cc", | |
| 158 "system_message_window_win_unittest.cc", | |
| 159 "video/fake_video_capture_device_unittest.cc", | |
| 160 "video/mac/video_capture_device_factory_mac_unittest.mm", | |
| 161 "video/video_capture_device_unittest.cc", | |
| 162 ] | |
| 163 | |
| 164 deps = [ | |
| 165 ":capture", | |
| 166 "//base/test:run_all_unittests", | |
| 167 "//base/test:test_support", | |
| 168 "//media/base:test_support", | |
| 169 "//media/mojo/interfaces:image_capture", | |
| 170 "//testing/gmock", | |
| 171 "//testing/gtest", | |
| 172 "//ui/gfx:test_support", | |
| 173 ] | |
| 174 | |
| 175 if (is_android) { | |
| 176 deps += [ "//media/capture/video/android:capture_java" ] | |
| 177 } | |
| 178 | |
| 179 if (is_win) { | |
| 180 # TODO(jschuh): https://crbug.com/167187 fix size_t to int truncations. | |
| 181 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | |
| 182 } | |
| 183 } | |
| OLD | NEW |