OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//media/media_options.gni") | 6 import("//media/media_options.gni") |
7 import("//testing/test.gni") | 7 import("//testing/test.gni") |
8 | 8 |
9 source_set("capture") { | 9 component("capture") { |
| 10 defines = [ "CAPTURE_IMPLEMENTATION" ] |
10 sources = [ | 11 sources = [ |
| 12 "capture_export.h", |
11 "content/animated_content_sampler.cc", | 13 "content/animated_content_sampler.cc", |
12 "content/animated_content_sampler.h", | 14 "content/animated_content_sampler.h", |
13 "content/capture_resolution_chooser.cc", | 15 "content/capture_resolution_chooser.cc", |
14 "content/capture_resolution_chooser.h", | 16 "content/capture_resolution_chooser.h", |
15 "content/feedback_signal_accumulator.h", | 17 "content/feedback_signal_accumulator.h", |
16 "content/screen_capture_device_core.cc", | 18 "content/screen_capture_device_core.cc", |
17 "content/screen_capture_device_core.h", | 19 "content/screen_capture_device_core.h", |
18 "content/smooth_event_sampler.cc", | 20 "content/smooth_event_sampler.cc", |
19 "content/smooth_event_sampler.h", | 21 "content/smooth_event_sampler.h", |
20 "content/thread_safe_capture_oracle.cc", | 22 "content/thread_safe_capture_oracle.cc", |
21 "content/thread_safe_capture_oracle.h", | 23 "content/thread_safe_capture_oracle.h", |
22 "content/video_capture_oracle.cc", | 24 "content/video_capture_oracle.cc", |
23 "content/video_capture_oracle.h", | 25 "content/video_capture_oracle.h", |
24 "device_monitor_mac.h", | 26 "device_monitor_mac.h", |
25 "device_monitor_mac.mm", | 27 "device_monitor_mac.mm", |
26 "system_message_window_win.cc", | 28 "system_message_window_win.cc", |
27 "system_message_window_win.h", | 29 "system_message_window_win.h", |
28 "video/android/photo_capabilities.cc", | |
29 "video/android/photo_capabilities.h", | |
30 "video/android/video_capture_device_android.cc", | |
31 "video/android/video_capture_device_android.h", | |
32 "video/android/video_capture_device_factory_android.cc", | |
33 "video/android/video_capture_device_factory_android.h", | |
34 "video/fake_video_capture_device.cc", | 30 "video/fake_video_capture_device.cc", |
35 "video/fake_video_capture_device.h", | 31 "video/fake_video_capture_device.h", |
36 "video/fake_video_capture_device_factory.cc", | 32 "video/fake_video_capture_device_factory.cc", |
37 "video/fake_video_capture_device_factory.h", | 33 "video/fake_video_capture_device_factory.h", |
38 "video/file_video_capture_device.cc", | 34 "video/file_video_capture_device.cc", |
39 "video/file_video_capture_device.h", | 35 "video/file_video_capture_device.h", |
40 "video/file_video_capture_device_factory.cc", | 36 "video/file_video_capture_device_factory.cc", |
41 "video/file_video_capture_device_factory.h", | 37 "video/file_video_capture_device_factory.h", |
42 "video/linux/v4l2_capture_delegate.cc", | 38 "video/linux/v4l2_capture_delegate.cc", |
43 "video/linux/video_capture_device_chromeos.cc", | 39 "video/linux/video_capture_device_chromeos.cc", |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 "video/win/video_capture_device_factory_win.h", | 72 "video/win/video_capture_device_factory_win.h", |
77 "video/win/video_capture_device_mf_win.cc", | 73 "video/win/video_capture_device_mf_win.cc", |
78 "video/win/video_capture_device_mf_win.h", | 74 "video/win/video_capture_device_mf_win.h", |
79 "video/win/video_capture_device_win.cc", | 75 "video/win/video_capture_device_win.cc", |
80 "video/win/video_capture_device_win.h", | 76 "video/win/video_capture_device_win.h", |
81 ] | 77 ] |
82 | 78 |
83 public_deps = [] | 79 public_deps = [] |
84 deps = [ | 80 deps = [ |
85 "//base", | 81 "//base", |
86 "//media/base", | 82 "//base:i18n", |
| 83 "//media", |
87 "//skia", | 84 "//skia", |
88 "//ui/display", | 85 "//ui/display", |
| 86 "//ui/gfx", |
89 ] | 87 ] |
90 | 88 |
91 configs += [ | 89 configs += [ |
| 90 # TODO(mcasas): media/base should be a component and not a source_set, but |
| 91 # it depends on parts of media/filters, media/ffmpeg etc. Until then, we |
| 92 # pretend to be inside media.dll and duplicate the few symbols needed, see |
| 93 # https://crbug.com/590017. |
92 "//media:media_implementation", | 94 "//media:media_implementation", |
93 | |
94 # TODO(mcasas): Fix size_t to int truncation warning-treated-as-errors. | |
95 "//build/config/compiler:no_size_t_to_int_warning", | |
96 ] | 95 ] |
97 | 96 |
98 if (is_android) { | 97 if (is_android) { |
99 public_deps += [ "video/android" ] | 98 public_deps += [ |
| 99 "video/android", |
| 100 "video/android:capture_java", |
| 101 ] |
100 deps += [ "video/android:capture_jni_headers" ] | 102 deps += [ "video/android:capture_jni_headers" ] |
101 } | 103 } |
102 | 104 |
103 if (is_mac) { | 105 if (is_mac) { |
104 deps += [ "//third_party/decklink" ] | 106 deps += [ "//third_party/decklink" ] |
105 libs = [ | 107 libs = [ |
106 "CoreFoundation.framework", | 108 "CoreFoundation.framework", |
107 "CoreGraphics.framework", | 109 "CoreGraphics.framework", |
| 110 "CoreVideo.framework", |
108 "Foundation.framework", | 111 "Foundation.framework", |
109 ] | 112 ] |
110 } | 113 } |
111 | 114 |
112 if (use_udev) { | 115 if (use_udev) { |
113 deps += [ "//device/udev_linux" ] | 116 deps += [ "//device/udev_linux" ] |
114 sources += [ | 117 sources += [ |
115 "device_monitor_udev.cc", | 118 "device_monitor_udev.cc", |
116 "device_monitor_udev.h", | 119 "device_monitor_udev.h", |
117 ] | 120 ] |
118 } | 121 } |
119 | 122 |
120 if (is_win) { | 123 if (is_win) { |
121 public_deps += [ "//media/base/win" ] | 124 deps += [ |
| 125 "//media/base", # For media_switches. |
| 126 "//media/base/win", |
| 127 ] |
122 libs = [ | 128 libs = [ |
123 "mf.lib", | 129 "mf.lib", |
124 "mfplat.lib", | 130 "mfplat.lib", |
125 "mfreadwrite.lib", | 131 "mfreadwrite.lib", |
126 "mfuuid.lib", | 132 "mfuuid.lib", |
127 ] | 133 ] |
128 | |
129 ldflags = [ | 134 ldflags = [ |
130 "/DELAYLOAD:mf.dll", | 135 "/DELAYLOAD:mf.dll", |
131 "/DELAYLOAD:mfplat.dll", | 136 "/DELAYLOAD:mfplat.dll", |
132 "/DELAYLOAD:mfreadwrite.dll", | 137 "/DELAYLOAD:mfreadwrite.dll", |
133 ] | 138 ] |
| 139 |
| 140 # TODO(jschuh): https://crbug.com/167187 fix size_t to int truncations. |
| 141 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
134 } | 142 } |
135 } | 143 } |
136 | 144 |
| 145 # TODO(mcasas): Make this a test target, https://crbug.com/618718. |
137 source_set("unittests") { | 146 source_set("unittests") { |
138 testonly = true | 147 testonly = true |
139 | 148 |
140 sources = [ | 149 sources = [ |
141 "content/animated_content_sampler_unittest.cc", | 150 "content/animated_content_sampler_unittest.cc", |
142 "content/capture_resolution_chooser_unittest.cc", | 151 "content/capture_resolution_chooser_unittest.cc", |
143 "content/feedback_signal_accumulator_unittest.cc", | 152 "content/feedback_signal_accumulator_unittest.cc", |
144 "content/smooth_event_sampler_unittest.cc", | 153 "content/smooth_event_sampler_unittest.cc", |
145 "content/video_capture_oracle_unittest.cc", | 154 "content/video_capture_oracle_unittest.cc", |
146 "system_message_window_win_unittest.cc", | 155 "system_message_window_win_unittest.cc", |
147 "video/fake_video_capture_device_unittest.cc", | 156 "video/fake_video_capture_device_unittest.cc", |
148 "video/mac/video_capture_device_factory_mac_unittest.mm", | 157 "video/mac/video_capture_device_factory_mac_unittest.mm", |
149 "video/video_capture_device_unittest.cc", | 158 "video/video_capture_device_unittest.cc", |
150 ] | 159 ] |
151 | 160 |
152 deps = [ | 161 deps = [ |
153 "//media/base:unittests", | 162 ":capture", |
154 "//testing/gmock", | 163 "//testing/gmock", |
155 "//testing/gtest", | 164 "//testing/gtest", |
156 ] | 165 ] |
157 | 166 |
158 # TODO(mcasas): Fix size_t to int truncation warning-treated-as-errors. | 167 if (is_win) { |
159 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 168 # TODO(jschuh): https://crbug.com/167187 fix size_t to int truncations. |
| 169 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 170 } |
160 } | 171 } |
OLD | NEW |