Reason for revert:
I suspect that this CL breaks Chromium WebRTC FYI bots. (Thanks kjellander@ for spotting.) The added dep in BUILD.gn would be the problem.
Example:
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.webrtc.fyi%2FLinux_Builder%2F15058%2F%2B%2Frecipes%2Fsteps%2Fcompile%2F0%2Fstdout
FAILED: newlib_pnacl/obj/third_party/webrtc/api/libjingle_peerconnection_api/mediaconstraintsinterface.o
/b/c/goma_client/gomacc ../../native_client/toolchain/linux_x86/pnacl_newlib/bin/pnacl-clang++ -MMD -MF newlib_pnacl/obj/third_party/webrtc/api/libjingle_peerconnection_api/mediaconstraintsinterface.o.d -DNACL_TC_REV=5dfe030a71ca66e72c5719ef5034c2ed24706c43 -DV8_DEPRECATION_WARNINGS -DUSE_OPENSSL_CERTS=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DWEBRTC_RESTRICT_LOGGING -DEXPAT_RELATIVE_PATH -DHAVE_SCTP -DENABLE_EXTERNAL_AUTH -DHAVE_WEBRTC_VIDEO -DHAVE_WEBRTC_VOICE -DLOGGING_INSIDE_WEBRTC -DUSE_WEBRTC_DEV_BRANCH -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -I../.. -Inewlib_pnacl/gen -I../../third_party/webrtc_overrides -I../../third_party -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../third_party/webrtc/api/mediaconstraintsinterface.cc -o newlib_pnacl/obj/third_party/webrtc/api/libjingle_peerconnection_api/mediaconstraintsinterface.o
In file included from ../../third_party/webrtc/api/mediaconstraintsinterface.cc:11:
In file included from ../../third_party/webrtc/api/mediaconstraintsinterface.h:27:
In file included from ../../third_party/webrtc/api/peerconnectioninterface.h:77:
In file included from ../../third_party/webrtc/api/dtmfsenderinterface.h:16:
In file included from ../../third_party/webrtc/api/mediastreaminterface.h:33:
In file included from ../../third_party/webrtc/media/base/mediachannel.h:28:
../../third_party/webrtc/base/socket.h:18:10: fatal error: 'sys/socket.h' file not found
#include <sys/socket.h>
^
1 error generated.
Original issue's description:
> Add DesktopCapturerId and attach it to DesktopFrame
>
> This change adds a DesktopCapturerId namespace, and attaches an int to each
> DesktopFrame. ScreenCapturerWinGdi and ScreenCapturerWinDirectx now actively set
> this field to differentiate themselves.
>
> BUG=679523, 650926
>
> Review-Url: https://codereview.webrtc.org/2759493002
> Cr-Commit-Position: refs/heads/master@{#17329}
> Committed: 41e3d9ff3b
TBR=sergeyu@chromium.org,zijiehe@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=679523, 650926
Review-Url: https://codereview.webrtc.org/2767003002
Cr-Commit-Position: refs/heads/master@{#17336}
299 lines
7.9 KiB
Plaintext
299 lines
7.9 KiB
Plaintext
# Copyright (c) 2014 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("//build/config/ui.gni")
|
|
import("../../webrtc.gni")
|
|
|
|
use_desktop_capture_differ_sse2 = current_cpu == "x86" || current_cpu == "x64"
|
|
|
|
rtc_static_library("primitives") {
|
|
sources = [
|
|
"desktop_capture_types.h",
|
|
"desktop_frame.cc",
|
|
"desktop_frame.h",
|
|
"desktop_geometry.cc",
|
|
"desktop_geometry.h",
|
|
"desktop_region.cc",
|
|
"desktop_region.h",
|
|
"shared_desktop_frame.cc",
|
|
"shared_desktop_frame.h",
|
|
"shared_memory.cc",
|
|
"shared_memory.h",
|
|
]
|
|
|
|
deps = [
|
|
"../..:webrtc_common",
|
|
"../../base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806.
|
|
]
|
|
}
|
|
|
|
if (rtc_include_tests) {
|
|
rtc_source_set("desktop_capture_modules_tests") {
|
|
testonly = true
|
|
sources = []
|
|
deps = []
|
|
if (rtc_desktop_capture_supported) {
|
|
deps += [
|
|
":desktop_capture_mock",
|
|
":primitives",
|
|
":screen_drawer",
|
|
"../../base:rtc_base",
|
|
"../../base:rtc_base_approved",
|
|
"../../system_wrappers",
|
|
"../../test:test_support",
|
|
"../../test:video_test_support",
|
|
]
|
|
sources += [
|
|
"screen_capturer_integration_test.cc",
|
|
"screen_drawer_unittest.cc",
|
|
]
|
|
}
|
|
}
|
|
|
|
rtc_source_set("desktop_capture_unittests") {
|
|
testonly = true
|
|
sources = [
|
|
"blank_detector_desktop_capturer_wrapper_unittest.cc",
|
|
"desktop_and_cursor_composer_unittest.cc",
|
|
"desktop_capturer_differ_wrapper_unittest.cc",
|
|
"desktop_frame_rotation_unittest.cc",
|
|
"desktop_region_unittest.cc",
|
|
"differ_block_unittest.cc",
|
|
"fallback_desktop_capturer_wrapper_unittest.cc",
|
|
"mouse_cursor_monitor_unittest.cc",
|
|
"rgba_color_unittest.cc",
|
|
"test_utils.cc",
|
|
"test_utils.h",
|
|
"test_utils_unittest.cc",
|
|
"win/cursor_unittest.cc",
|
|
"win/cursor_unittest_resources.h",
|
|
"win/cursor_unittest_resources.rc",
|
|
]
|
|
deps = [
|
|
":desktop_capture",
|
|
":desktop_capture_mock",
|
|
":primitives",
|
|
"../..:webrtc_common",
|
|
"../../base:rtc_base_approved",
|
|
"../../system_wrappers",
|
|
"../../test:test_support",
|
|
"//testing/gmock",
|
|
]
|
|
if (rtc_desktop_capture_supported) {
|
|
sources += [
|
|
"screen_capturer_helper_unittest.cc",
|
|
"screen_capturer_mac_unittest.cc",
|
|
"screen_capturer_unittest.cc",
|
|
"window_capturer_unittest.cc",
|
|
]
|
|
deps += [ ":desktop_capture_mock" ]
|
|
}
|
|
if (!build_with_chromium && is_clang) {
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
}
|
|
|
|
source_set("screen_drawer") {
|
|
testonly = true
|
|
|
|
public_deps = [
|
|
":desktop_capture",
|
|
]
|
|
|
|
sources = [
|
|
"screen_drawer.cc",
|
|
"screen_drawer.h",
|
|
"screen_drawer_linux.cc",
|
|
"screen_drawer_mac.cc",
|
|
"screen_drawer_win.cc",
|
|
]
|
|
|
|
deps = [
|
|
":primitives",
|
|
"../../base:rtc_base_approved",
|
|
"../../system_wrappers",
|
|
]
|
|
}
|
|
|
|
source_set("desktop_capture_mock") {
|
|
testonly = true
|
|
|
|
public_deps = [
|
|
":desktop_capture",
|
|
"//testing/gmock",
|
|
]
|
|
|
|
sources = [
|
|
"desktop_frame_generator.cc",
|
|
"desktop_frame_generator.h",
|
|
"fake_desktop_capturer.cc",
|
|
"fake_desktop_capturer.h",
|
|
"mock_desktop_capturer_callback.cc",
|
|
"mock_desktop_capturer_callback.h",
|
|
]
|
|
|
|
deps = [
|
|
":primitives",
|
|
"../../base:rtc_base_approved",
|
|
"../../test:test_support",
|
|
]
|
|
}
|
|
}
|
|
|
|
rtc_static_library("desktop_capture") {
|
|
sources = [
|
|
"blank_detector_desktop_capturer_wrapper.cc",
|
|
"blank_detector_desktop_capturer_wrapper.h",
|
|
"cropped_desktop_frame.cc",
|
|
"cropped_desktop_frame.h",
|
|
"cropping_window_capturer.cc",
|
|
"cropping_window_capturer.h",
|
|
"cropping_window_capturer_win.cc",
|
|
"desktop_and_cursor_composer.cc",
|
|
"desktop_and_cursor_composer.h",
|
|
"desktop_capture_options.cc",
|
|
"desktop_capture_options.h",
|
|
"desktop_capturer.cc",
|
|
"desktop_capturer.h",
|
|
"desktop_capturer_differ_wrapper.cc",
|
|
"desktop_capturer_differ_wrapper.h",
|
|
"desktop_frame_rotation.cc",
|
|
"desktop_frame_rotation.h",
|
|
"desktop_frame_win.cc",
|
|
"desktop_frame_win.h",
|
|
"differ_block.cc",
|
|
"differ_block.h",
|
|
"fallback_desktop_capturer_wrapper.cc",
|
|
"fallback_desktop_capturer_wrapper.h",
|
|
"mac/desktop_configuration.h",
|
|
"mac/desktop_configuration.mm",
|
|
"mac/desktop_configuration_monitor.cc",
|
|
"mac/desktop_configuration_monitor.h",
|
|
"mac/full_screen_chrome_window_detector.cc",
|
|
"mac/full_screen_chrome_window_detector.h",
|
|
"mac/scoped_pixel_buffer_object.cc",
|
|
"mac/scoped_pixel_buffer_object.h",
|
|
"mac/window_list_utils.cc",
|
|
"mac/window_list_utils.h",
|
|
"mouse_cursor.cc",
|
|
"mouse_cursor.h",
|
|
"mouse_cursor_monitor.h",
|
|
"mouse_cursor_monitor_mac.mm",
|
|
"mouse_cursor_monitor_win.cc",
|
|
"resolution_change_detector.cc",
|
|
"resolution_change_detector.h",
|
|
"rgba_color.cc",
|
|
"rgba_color.h",
|
|
"screen_capture_frame_queue.h",
|
|
"screen_capturer_helper.cc",
|
|
"screen_capturer_helper.h",
|
|
"screen_capturer_mac.mm",
|
|
"screen_capturer_win.cc",
|
|
"win/cursor.cc",
|
|
"win/cursor.h",
|
|
"win/d3d_device.cc",
|
|
"win/d3d_device.h",
|
|
"win/desktop.cc",
|
|
"win/desktop.h",
|
|
"win/dxgi_adapter_duplicator.cc",
|
|
"win/dxgi_adapter_duplicator.h",
|
|
"win/dxgi_duplicator_controller.cc",
|
|
"win/dxgi_duplicator_controller.h",
|
|
"win/dxgi_output_duplicator.cc",
|
|
"win/dxgi_output_duplicator.h",
|
|
"win/dxgi_texture.cc",
|
|
"win/dxgi_texture.h",
|
|
"win/dxgi_texture_mapping.cc",
|
|
"win/dxgi_texture_mapping.h",
|
|
"win/dxgi_texture_staging.cc",
|
|
"win/dxgi_texture_staging.h",
|
|
"win/scoped_gdi_object.h",
|
|
"win/scoped_thread_desktop.cc",
|
|
"win/scoped_thread_desktop.h",
|
|
"win/screen_capture_utils.cc",
|
|
"win/screen_capture_utils.h",
|
|
"win/screen_capturer_win_directx.cc",
|
|
"win/screen_capturer_win_directx.h",
|
|
"win/screen_capturer_win_gdi.cc",
|
|
"win/screen_capturer_win_gdi.h",
|
|
"win/screen_capturer_win_magnifier.cc",
|
|
"win/screen_capturer_win_magnifier.h",
|
|
"win/window_capture_utils.cc",
|
|
"win/window_capture_utils.h",
|
|
"window_capturer_mac.mm",
|
|
"window_capturer_win.cc",
|
|
]
|
|
|
|
if (use_x11) {
|
|
sources += [
|
|
"mouse_cursor_monitor_x11.cc",
|
|
"screen_capturer_x11.cc",
|
|
"window_capturer_x11.cc",
|
|
"x11/shared_x_display.cc",
|
|
"x11/shared_x_display.h",
|
|
"x11/x_error_trap.cc",
|
|
"x11/x_error_trap.h",
|
|
"x11/x_server_pixel_buffer.cc",
|
|
"x11/x_server_pixel_buffer.h",
|
|
]
|
|
configs += [ "//build/config/linux:x11" ]
|
|
}
|
|
|
|
if (!is_win && !is_mac && !use_x11) {
|
|
sources += [
|
|
"mouse_cursor_monitor_null.cc",
|
|
"screen_capturer_null.cc",
|
|
"window_capturer_null.cc",
|
|
]
|
|
}
|
|
|
|
if (is_mac) {
|
|
libs = [
|
|
"AppKit.framework",
|
|
"IOKit.framework",
|
|
"OpenGL.framework",
|
|
]
|
|
}
|
|
|
|
if (is_win) {
|
|
libs = [
|
|
"d3d11.lib",
|
|
"dxgi.lib",
|
|
]
|
|
}
|
|
|
|
deps = [
|
|
":primitives",
|
|
"../..:webrtc_common",
|
|
"../../base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806.
|
|
"../../system_wrappers",
|
|
"//third_party/libyuv",
|
|
]
|
|
|
|
if (use_desktop_capture_differ_sse2) {
|
|
deps += [ ":desktop_capture_differ_sse2" ]
|
|
}
|
|
}
|
|
|
|
if (use_desktop_capture_differ_sse2) {
|
|
# Have to be compiled as a separate target because it needs to be compiled
|
|
# with SSE2 enabled.
|
|
rtc_static_library("desktop_capture_differ_sse2") {
|
|
visibility = [ ":*" ]
|
|
sources = [
|
|
"differ_vector_sse2.cc",
|
|
"differ_vector_sse2.h",
|
|
]
|
|
|
|
if (is_posix) {
|
|
cflags = [ "-msse2" ]
|
|
}
|
|
}
|
|
}
|