Commit 7fdb0d58 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Clean up deprecated sources assignment filter in //media

Remove deprecated_default_sources_assignment_filter and replace
it with explicit is_win, is_mac, etc. sections.

Bug: 1018739
Change-Id: Ic3cd9d922dc12131243bc5ab34aad96ee18cb00e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440844Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
Reviewed-by: default avatarTakashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813112}
parent 7d9183ce
......@@ -2,13 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file depends on the legacy global sources assignment filter. It should
# be converted to check target platform before assigning source files to the
# sources variable. Remove this import and set_sources_assignment_filter call
# when the file has been converted. See https://crbug.com/1018739 for details.
import("//build/config/deprecated_default_sources_assignment_filter.gni")
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
assert(is_apple)
source_set("mac") {
......@@ -18,7 +11,6 @@ source_set("mac") {
# run-time.
visibility = [ "//media" ]
set_sources_assignment_filter([])
sources = [
"video_frame_mac.cc",
"video_frame_mac.h",
......@@ -33,7 +25,6 @@ source_set("mac") {
"VideoToolbox.framework",
]
}
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
configs += [ "//media:subcomponent_config" ]
deps = [
......
......@@ -2,13 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file depends on the legacy global sources assignment filter. It should
# be converted to check target platform before assigning source files to the
# sources variable. Remove this import and set_sources_assignment_filter call
# when the file has been converted. See https://crbug.com/1018739 for details.
import("//build/config/deprecated_default_sources_assignment_filter.gni")
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
assert(is_win)
config("delay_load_mf") {
......@@ -21,7 +14,6 @@ config("delay_load_mf") {
component("media_foundation_util") {
defines = [ "MF_INITIALIZER_IMPLEMENTATION" ]
set_sources_assignment_filter([])
sources = [
"mf_helpers.cc",
"mf_helpers.h",
......@@ -29,7 +21,6 @@ component("media_foundation_util") {
"mf_initializer.h",
"mf_initializer_export.h",
]
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
configs += [
# TODO(crbug.com/167187): Fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning",
......
......@@ -7,13 +7,6 @@ import("//build/config/ui.gni")
import("//media/media_options.gni")
import("//testing/test.gni")
# This file depends on the legacy global sources assignment filter. It should
# be converted to check target platform before assigning source files to the
# sources variable. Remove this import and set_sources_assignment_filter call
# when the file has been converted. See https://crbug.com/1018739 for details.
import("//build/config/deprecated_default_sources_assignment_filter.gni")
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
group("capture") {
public_deps = [
":capture_lib",
......@@ -251,8 +244,6 @@ component("capture_lib") {
# these sources into linux, chromeos, and common.
if (is_linux || is_chromeos) {
sources += [
"video/linux/camera_config_chromeos.cc",
"video/linux/camera_config_chromeos.h",
"video/linux/scoped_v4l2_device_fd.cc",
"video/linux/scoped_v4l2_device_fd.h",
"video/linux/v4l2_capture_delegate.cc",
......@@ -260,8 +251,6 @@ component("capture_lib") {
"video/linux/v4l2_capture_device.h",
"video/linux/v4l2_capture_device_impl.cc",
"video/linux/v4l2_capture_device_impl.h",
"video/linux/video_capture_device_chromeos.cc",
"video/linux/video_capture_device_chromeos.h",
"video/linux/video_capture_device_factory_linux.cc",
"video/linux/video_capture_device_factory_linux.h",
"video/linux/video_capture_device_linux.cc",
......@@ -317,6 +306,10 @@ component("capture_lib") {
"video/chromeos/video_capture_jpeg_decoder.h",
"video/chromeos/video_capture_jpeg_decoder_impl.cc",
"video/chromeos/video_capture_jpeg_decoder_impl.h",
"video/linux/camera_config_chromeos.cc",
"video/linux/camera_config_chromeos.h",
"video/linux/video_capture_device_chromeos.cc",
"video/linux/video_capture_device_chromeos.h",
]
public_deps += [ "//media/capture/video/chromeos/public" ]
deps += [
......@@ -350,10 +343,6 @@ source_set("test_support") {
testonly = true
sources = [
"video/linux/fake_device_provider.cc",
"video/linux/fake_device_provider.h",
"video/linux/fake_v4l2_impl.cc",
"video/linux/fake_v4l2_impl.h",
"video/mock_device.cc",
"video/mock_device.h",
"video/mock_device_factory.cc",
......@@ -378,6 +367,15 @@ source_set("test_support") {
"//ui/gfx:test_support",
]
if (is_linux || is_chromeos) {
sources += [
"video/linux/fake_device_provider.cc",
"video/linux/fake_device_provider.h",
"video/linux/fake_v4l2_impl.cc",
"video/linux/fake_v4l2_impl.h",
]
}
if (is_chromeos) {
sources += [
"video/chromeos/mock_camera_module.cc",
......@@ -407,17 +405,6 @@ test("capture_unittests") {
"run_all_unittests.cc",
"video/fake_video_capture_device_unittest.cc",
"video/file_video_capture_device_unittest.cc",
"video/linux/camera_config_chromeos_unittest.cc",
"video/linux/v4l2_capture_delegate_unittest.cc",
"video/linux/video_capture_device_factory_linux_unittest.cc",
"video/mac/pixel_buffer_pool_mac_unittest.mm",
"video/mac/test/mock_video_capture_device_avfoundation_frame_receiver_mac.h",
"video/mac/test/mock_video_capture_device_avfoundation_frame_receiver_mac.mm",
"video/mac/test/video_capture_test_utils_mac.h",
"video/mac/test/video_capture_test_utils_mac.mm",
"video/mac/video_capture_device_avfoundation_mac_unittest.mm",
"video/mac/video_capture_device_factory_mac_unittest.mm",
"video/mac/video_capture_device_mac_unittest.mm",
"video/video_capture_device_client_unittest.cc",
"video/video_capture_device_unittest.cc",
"video_capture_types_unittest.cc",
......@@ -439,6 +426,17 @@ test("capture_unittests") {
"//ui/gfx:test_support",
]
if (is_linux || is_chromeos) {
sources += [
"video/linux/v4l2_capture_delegate_unittest.cc",
"video/linux/video_capture_device_factory_linux_unittest.cc",
]
}
if (is_chromeos) {
sources += [ "video/linux/camera_config_chromeos_unittest.cc" ]
}
if (is_android) {
deps += [
"//media/capture/video/android",
......@@ -460,6 +458,16 @@ test("capture_unittests") {
}
if (is_mac) {
sources += [
"video/mac/pixel_buffer_pool_mac_unittest.mm",
"video/mac/test/mock_video_capture_device_avfoundation_frame_receiver_mac.h",
"video/mac/test/mock_video_capture_device_avfoundation_frame_receiver_mac.mm",
"video/mac/test/video_capture_test_utils_mac.h",
"video/mac/test/video_capture_test_utils_mac.mm",
"video/mac/video_capture_device_avfoundation_mac_unittest.mm",
"video/mac/video_capture_device_factory_mac_unittest.mm",
"video/mac/video_capture_device_mac_unittest.mm",
]
frameworks = [
"AVFoundation.framework",
"CoreMedia.framework",
......
......@@ -4,25 +4,13 @@
import("//media/media_options.gni")
# This file depends on the legacy global sources assignment filter. It should
# be converted to check target platform before assigning source files to the
# sources variable. Remove this import and set_sources_assignment_filter call
# when the file has been converted. See https://crbug.com/1018739 for details.
import("//build/config/deprecated_default_sources_assignment_filter.gni")
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
source_set("device_monitors") {
# Do not expand the visibility here without double-checking with OWNERS, this
# is a roll-up target which is part of the //media component. Most other DEPs
# should be using //media and not directly DEP this roll-up target.
visibility = [ "//media" ]
sources = [
"device_monitor_mac.h",
"device_monitor_mac.mm",
"system_message_window_win.cc",
"system_message_window_win.h",
]
sources = []
configs += [ "//media:subcomponent_config" ]
......@@ -41,13 +29,24 @@ source_set("device_monitors") {
}
if (is_mac) {
sources += [
"device_monitor_mac.h",
"device_monitor_mac.mm",
]
frameworks = [ "Foundation.framework" ]
}
if (is_win) {
sources += [
"system_message_window_win.cc",
"system_message_window_win.h",
]
}
}
source_set("unit_tests") {
testonly = true
sources = [ "system_message_window_win_unittest.cc" ]
sources = []
deps = [
"//base",
......@@ -56,4 +55,8 @@ source_set("unit_tests") {
"//testing/gmock",
"//testing/gtest",
]
if (is_win) {
sources += [ "system_message_window_win_unittest.cc" ]
}
}
......@@ -15,13 +15,6 @@ if (is_android) {
import("//build/config/android/rules.gni")
}
# This file depends on the legacy global sources assignment filter. It should
# be converted to check target platform before assigning source files to the
# sources variable. Remove this import and set_sources_assignment_filter call
# when the file has been converted. See https://crbug.com/1018739 for details.
import("//build/config/deprecated_default_sources_assignment_filter.gni")
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
# Common configuration for targets in the media/midi directory.
config("midi_config") {
if (use_alsa && use_udev) {
......@@ -89,8 +82,6 @@ component("midi") {
"midi_export.h",
"midi_manager.cc",
"midi_manager.h",
"midi_manager_mac.cc",
"midi_manager_mac.h",
"midi_message_queue.cc",
"midi_message_queue.h",
"midi_service.cc",
......@@ -137,6 +128,10 @@ component("midi") {
}
if (is_mac) {
sources += [
"midi_manager_mac.cc",
"midi_manager_mac.h",
]
frameworks = [
"CoreAudio.framework",
"CoreFoundation.framework",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment