mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
Split Windows code from rtc_base_approved to smaller targets
Bug: webrtc:9838 Change-Id: Ic463284fd68715fd9b8eadd50e1d25841cb60020 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261241 Auto-Submit: Florent Castelli <orphis@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36768}
This commit is contained in:
parent
d852d9c536
commit
15a3c3fdca
5 changed files with 112 additions and 44 deletions
|
@ -120,6 +120,7 @@ rtc_source_set("windows_core_audio_utility") {
|
||||||
"../../rtc_base:platform_thread_types",
|
"../../rtc_base:platform_thread_types",
|
||||||
"../../rtc_base:rtc_base_approved",
|
"../../rtc_base:rtc_base_approved",
|
||||||
"../../rtc_base:stringutils",
|
"../../rtc_base:stringutils",
|
||||||
|
"../../rtc_base/win:windows_version",
|
||||||
]
|
]
|
||||||
|
|
||||||
libs = [ "oleaut32.lib" ]
|
libs = [ "oleaut32.lib" ]
|
||||||
|
@ -164,6 +165,8 @@ rtc_source_set("audio_device_module_from_input_and_output") {
|
||||||
"../../rtc_base:safe_conversions",
|
"../../rtc_base:safe_conversions",
|
||||||
"../../rtc_base:stringutils",
|
"../../rtc_base:stringutils",
|
||||||
"../../rtc_base:timeutils",
|
"../../rtc_base:timeutils",
|
||||||
|
"../../rtc_base/win:scoped_com_initializer",
|
||||||
|
"../../rtc_base/win:windows_version",
|
||||||
]
|
]
|
||||||
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
||||||
}
|
}
|
||||||
|
@ -344,7 +347,10 @@ rtc_library("audio_device_impl") {
|
||||||
"msdmo.lib",
|
"msdmo.lib",
|
||||||
"oleaut32.lib",
|
"oleaut32.lib",
|
||||||
]
|
]
|
||||||
deps += [ "../../rtc_base:win32" ]
|
deps += [
|
||||||
|
"../../rtc_base:win32",
|
||||||
|
"../../rtc_base/win:scoped_com_initializer",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
configs += [ ":audio_device_warnings_config" ]
|
configs += [ ":audio_device_warnings_config" ]
|
||||||
}
|
}
|
||||||
|
@ -438,6 +444,8 @@ if (rtc_include_tests && !build_with_chromium) {
|
||||||
deps += [
|
deps += [
|
||||||
":audio_device_module_from_input_and_output",
|
":audio_device_module_from_input_and_output",
|
||||||
":windows_core_audio_utility",
|
":windows_core_audio_utility",
|
||||||
|
"../../rtc_base/win:scoped_com_initializer",
|
||||||
|
"../../rtc_base/win:windows_version",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
if (is_android) {
|
if (is_android) {
|
||||||
|
|
|
@ -82,6 +82,10 @@ if (rtc_include_tests) {
|
||||||
"window_finder_unittest.cc",
|
"window_finder_unittest.cc",
|
||||||
]
|
]
|
||||||
public_configs = [ ":x11_config" ]
|
public_configs = [ ":x11_config" ]
|
||||||
|
|
||||||
|
if (is_win) {
|
||||||
|
deps += [ "../../rtc_base/win:windows_version" ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,18 +110,6 @@ if (rtc_include_tests) {
|
||||||
"test_utils.h",
|
"test_utils.h",
|
||||||
"test_utils_unittest.cc",
|
"test_utils_unittest.cc",
|
||||||
]
|
]
|
||||||
if (is_win) {
|
|
||||||
sources += [
|
|
||||||
"win/cursor_unittest.cc",
|
|
||||||
"win/cursor_unittest_resources.h",
|
|
||||||
"win/cursor_unittest_resources.rc",
|
|
||||||
"win/screen_capture_utils_unittest.cc",
|
|
||||||
"win/screen_capturer_win_directx_unittest.cc",
|
|
||||||
"win/test_support/test_window.cc",
|
|
||||||
"win/test_support/test_window.h",
|
|
||||||
"win/window_capture_utils_unittest.cc",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
deps = [
|
deps = [
|
||||||
":desktop_capture",
|
":desktop_capture",
|
||||||
":desktop_capture_mock",
|
":desktop_capture_mock",
|
||||||
|
@ -135,6 +127,24 @@ if (rtc_include_tests) {
|
||||||
"../../system_wrappers",
|
"../../system_wrappers",
|
||||||
"../../test:test_support",
|
"../../test:test_support",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if (is_win) {
|
||||||
|
sources += [
|
||||||
|
"win/cursor_unittest.cc",
|
||||||
|
"win/cursor_unittest_resources.h",
|
||||||
|
"win/cursor_unittest_resources.rc",
|
||||||
|
"win/screen_capture_utils_unittest.cc",
|
||||||
|
"win/screen_capturer_win_directx_unittest.cc",
|
||||||
|
"win/test_support/test_window.cc",
|
||||||
|
"win/test_support/test_window.h",
|
||||||
|
"win/window_capture_utils_unittest.cc",
|
||||||
|
]
|
||||||
|
deps += [
|
||||||
|
"../../rtc_base/win:scoped_com_initializer",
|
||||||
|
"../../rtc_base/win:windows_version",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
if (rtc_desktop_capture_supported) {
|
if (rtc_desktop_capture_supported) {
|
||||||
sources += [
|
sources += [
|
||||||
"screen_capturer_helper_unittest.cc",
|
"screen_capturer_helper_unittest.cc",
|
||||||
|
@ -561,6 +571,9 @@ rtc_library("desktop_capture_generic") {
|
||||||
]
|
]
|
||||||
deps += [
|
deps += [
|
||||||
"../../rtc_base:win32",
|
"../../rtc_base:win32",
|
||||||
|
"../../rtc_base/win:create_direct3d_device",
|
||||||
|
"../../rtc_base/win:get_activation_factory",
|
||||||
|
"../../rtc_base/win:windows_version",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -637,6 +650,8 @@ rtc_library("desktop_capture_generic") {
|
||||||
"win/wgc_desktop_frame.cc",
|
"win/wgc_desktop_frame.cc",
|
||||||
"win/wgc_desktop_frame.h",
|
"win/wgc_desktop_frame.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
deps += [ "../../rtc_base/win:hstring" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,33 +80,6 @@ rtc_source_set("callback_list") {
|
||||||
# the old concept of rtc_base and rtc_base_approved.
|
# the old concept of rtc_base and rtc_base_approved.
|
||||||
rtc_source_set("rtc_base_approved") {
|
rtc_source_set("rtc_base_approved") {
|
||||||
visibility = [ "*" ]
|
visibility = [ "*" ]
|
||||||
|
|
||||||
if (is_win) {
|
|
||||||
sources = [
|
|
||||||
"win/get_activation_factory.cc",
|
|
||||||
"win/get_activation_factory.h",
|
|
||||||
"win/hstring.cc",
|
|
||||||
"win/hstring.h",
|
|
||||||
"win/scoped_com_initializer.cc",
|
|
||||||
"win/scoped_com_initializer.h",
|
|
||||||
"win/windows_version.cc",
|
|
||||||
"win/windows_version.h",
|
|
||||||
]
|
|
||||||
deps = [
|
|
||||||
":checks",
|
|
||||||
":logging",
|
|
||||||
":stringutils",
|
|
||||||
]
|
|
||||||
data_deps = [ "//build/win:runtime_libs" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
# These files add a dependency on the Win10 SDK v10.0.10240.
|
|
||||||
if (rtc_enable_win_wgc) {
|
|
||||||
sources += [
|
|
||||||
"win/create_direct3d_device.cc",
|
|
||||||
"win/create_direct3d_device.h",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rtc_source_set("buffer") {
|
rtc_source_set("buffer") {
|
||||||
|
@ -851,8 +824,8 @@ rtc_library("net_helpers") {
|
||||||
}
|
}
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
deps += [
|
deps += [
|
||||||
":rtc_base_approved",
|
|
||||||
":win32",
|
":win32",
|
||||||
|
"win:windows_version",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
|
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
|
||||||
|
@ -1581,9 +1554,6 @@ if (rtc_include_tests) {
|
||||||
"virtual_socket_unittest.cc",
|
"virtual_socket_unittest.cc",
|
||||||
"zero_memory_unittest.cc",
|
"zero_memory_unittest.cc",
|
||||||
]
|
]
|
||||||
if (is_win) {
|
|
||||||
sources += [ "win/windows_version_unittest.cc" ]
|
|
||||||
}
|
|
||||||
deps = [
|
deps = [
|
||||||
":atomicops",
|
":atomicops",
|
||||||
":bit_buffer",
|
":bit_buffer",
|
||||||
|
@ -1658,6 +1628,10 @@ if (rtc_include_tests) {
|
||||||
"//third_party/abseil-cpp/absl/strings",
|
"//third_party/abseil-cpp/absl/strings",
|
||||||
"//third_party/abseil-cpp/absl/types:optional",
|
"//third_party/abseil-cpp/absl/types:optional",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if (is_win) {
|
||||||
|
deps += [ "win:windows_version_unittest" ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rtc_library("rtc_task_queue_unittests") {
|
rtc_library("rtc_task_queue_unittests") {
|
||||||
|
|
68
rtc_base/win/BUILD.gn
Normal file
68
rtc_base/win/BUILD.gn
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
# Copyright (c) 2021 The WebRTC project authors. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Use of this source code is governed by a BSD-style license
|
||||||
|
# that can be found in the LICENSE file in the root of the source
|
||||||
|
# tree. An additional intellectual property rights grant can be found
|
||||||
|
# in the file PATENTS. All contributing project authors may
|
||||||
|
# be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
|
import("../../webrtc.gni")
|
||||||
|
|
||||||
|
rtc_library("create_direct3d_device") {
|
||||||
|
sources = [
|
||||||
|
"create_direct3d_device.cc",
|
||||||
|
"create_direct3d_device.h",
|
||||||
|
]
|
||||||
|
data_deps = [ "//build/win:runtime_libs" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
rtc_library("get_activation_factory") {
|
||||||
|
sources = [
|
||||||
|
"get_activation_factory.cc",
|
||||||
|
"get_activation_factory.h",
|
||||||
|
]
|
||||||
|
data_deps = [ "//build/win:runtime_libs" ]
|
||||||
|
deps = [ ":hstring" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
rtc_library("hstring") {
|
||||||
|
sources = [
|
||||||
|
"hstring.cc",
|
||||||
|
"hstring.h",
|
||||||
|
]
|
||||||
|
data_deps = [ "//build/win:runtime_libs" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
rtc_library("scoped_com_initializer") {
|
||||||
|
sources = [
|
||||||
|
"scoped_com_initializer.cc",
|
||||||
|
"scoped_com_initializer.h",
|
||||||
|
]
|
||||||
|
data_deps = [ "//build/win:runtime_libs" ]
|
||||||
|
deps = [
|
||||||
|
"..:checks",
|
||||||
|
"..:logging",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
rtc_library("windows_version") {
|
||||||
|
sources = [
|
||||||
|
"windows_version.cc",
|
||||||
|
"windows_version.h",
|
||||||
|
]
|
||||||
|
data_deps = [ "//build/win:runtime_libs" ]
|
||||||
|
deps = [
|
||||||
|
"..:checks",
|
||||||
|
"..:stringutils",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
rtc_library("windows_version_unittest") {
|
||||||
|
testonly = true
|
||||||
|
sources = [ "windows_version_unittest.cc" ]
|
||||||
|
deps = [
|
||||||
|
":windows_version",
|
||||||
|
"..:gunit_helpers",
|
||||||
|
"..:logging",
|
||||||
|
]
|
||||||
|
}
|
|
@ -620,6 +620,9 @@ if (rtc_include_tests) {
|
||||||
if (is_mac || is_ios) {
|
if (is_mac || is_ios) {
|
||||||
deps += [ "../test:video_test_mac" ]
|
deps += [ "../test:video_test_mac" ]
|
||||||
}
|
}
|
||||||
|
if (is_win) {
|
||||||
|
deps += [ "../rtc_base/win:scoped_com_initializer" ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rtc_library("video_full_stack_tests") {
|
rtc_library("video_full_stack_tests") {
|
||||||
|
|
Loading…
Reference in a new issue