diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn index 072fd55df2..787a5c83b0 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -249,14 +249,14 @@ if (is_linux || is_chromeos) { ":libdrm", ] deps = [ "../../rtc_base" ] - extra_header = "linux/wayland/pipewire_stub_header.fragment" + extra_header = "linux/pipewire_stub_header.fragment" logging_function = "RTC_LOG(LS_VERBOSE)" logging_include = "rtc_base/logging.h" - output_name = "linux/wayland/pipewire_stubs" + output_name = "linux/pipewire_stubs" path_from_source = "modules/desktop_capture/linux" sigs = [ - "linux/wayland/pipewire.sigs", - "linux/wayland/drm.sigs", + "linux/pipewire.sigs", + "linux/drm.sigs", ] } } @@ -406,37 +406,37 @@ rtc_library("desktop_capture_generic") { if (build_with_mozilla && (is_linux || is_chromeos)) { sources += [ "app_capturer_linux.cc", - "linux/x11/app_capturer_x11.cc", - "linux/x11/desktop_device_info_linux.cc", - "linux/x11/desktop_device_info_linux.h", - "linux/x11/shared_x_util.cc", - "linux/x11/shared_x_util.h", + "linux/app_capturer_x11.cc", + "linux/desktop_device_info_linux.cc", + "linux/desktop_device_info_linux.h", + "linux/shared_x_util.cc", + "linux/shared_x_util.h", ] } } if (rtc_use_x11_extensions) { sources += [ - "linux/x11/mouse_cursor_monitor_x11.cc", - "linux/x11/mouse_cursor_monitor_x11.h", - "linux/x11/screen_capturer_x11.cc", - "linux/x11/screen_capturer_x11.h", - "linux/x11/shared_x_display.cc", - "linux/x11/shared_x_display.h", - "linux/x11/window_capturer_x11.cc", - "linux/x11/window_capturer_x11.h", - "linux/x11/window_finder_x11.cc", - "linux/x11/window_finder_x11.h", - "linux/x11/window_list_utils.cc", - "linux/x11/window_list_utils.h", - "linux/x11/x_atom_cache.cc", - "linux/x11/x_atom_cache.h", - "linux/x11/x_error_trap.cc", - "linux/x11/x_error_trap.h", - "linux/x11/x_server_pixel_buffer.cc", - "linux/x11/x_server_pixel_buffer.h", - "linux/x11/x_window_property.cc", - "linux/x11/x_window_property.h", + "linux/mouse_cursor_monitor_x11.cc", + "linux/mouse_cursor_monitor_x11.h", + "linux/screen_capturer_x11.cc", + "linux/screen_capturer_x11.h", + "linux/shared_x_display.cc", + "linux/shared_x_display.h", + "linux/window_capturer_x11.cc", + "linux/window_capturer_x11.h", + "linux/window_finder_x11.cc", + "linux/window_finder_x11.h", + "linux/window_list_utils.cc", + "linux/window_list_utils.h", + "linux/x_atom_cache.cc", + "linux/x_atom_cache.h", + "linux/x_error_trap.cc", + "linux/x_error_trap.h", + "linux/x_server_pixel_buffer.cc", + "linux/x_server_pixel_buffer.h", + "linux/x_window_property.cc", + "linux/x_window_property.h", ] libs = [ "X11", @@ -561,10 +561,10 @@ rtc_library("desktop_capture_generic") { if (rtc_use_pipewire) { sources += [ - "linux/wayland/base_capturer_pipewire.cc", - "linux/wayland/base_capturer_pipewire.h", - "linux/wayland/egl_dmabuf.cc", - "linux/wayland/egl_dmabuf.h", + "linux/base_capturer_pipewire.cc", + "linux/base_capturer_pipewire.h", + "linux/egl_dmabuf.cc", + "linux/egl_dmabuf.h", ] configs += [ diff --git a/modules/desktop_capture/desktop_capture_options.h b/modules/desktop_capture/desktop_capture_options.h index 2044a5b881..19bea1f6d0 100644 --- a/modules/desktop_capture/desktop_capture_options.h +++ b/modules/desktop_capture/desktop_capture_options.h @@ -14,7 +14,7 @@ #include "rtc_base/system/rtc_export.h" #if defined(WEBRTC_USE_X11) -#include "modules/desktop_capture/linux/x11/shared_x_display.h" +#include "modules/desktop_capture/linux/shared_x_display.h" #endif #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) diff --git a/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc b/modules/desktop_capture/linux/base_capturer_pipewire.cc similarity index 96% rename from modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc rename to modules/desktop_capture/linux/base_capturer_pipewire.cc index f68af9116b..be8b5f3bf8 100644 --- a/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc +++ b/modules/desktop_capture/linux/base_capturer_pipewire.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h" +#include "modules/desktop_capture/linux/base_capturer_pipewire.h" #include #include @@ -19,9 +19,9 @@ #include #include +#include #include #include -#include #include "absl/memory/memory.h" #include "modules/desktop_capture/desktop_capture_options.h" @@ -31,7 +31,7 @@ #include "rtc_base/string_encode.h" #if defined(WEBRTC_DLOPEN_PIPEWIRE) -#include "modules/desktop_capture/linux/wayland/pipewire_stubs.h" +#include "modules/desktop_capture/linux/pipewire_stubs.h" using modules_desktop_capture_linux::InitializeStubs; using modules_desktop_capture_linux::kModuleDrm; using modules_desktop_capture_linux::kModulePipewire; @@ -420,8 +420,8 @@ void BaseCapturerPipeWire::InitPortal() { g_dbus_proxy_new_for_bus( G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, /*info=*/nullptr, kDesktopBusName, kDesktopObjectPath, kScreenCastInterfaceName, - cancellable_, reinterpret_cast(OnProxyRequested), - this); + cancellable_, + reinterpret_cast(OnProxyRequested), this); } void BaseCapturerPipeWire::Init() { @@ -569,8 +569,9 @@ void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) { plane_datas.push_back(data); } - src_unique_ptr = egl_dmabuf_->ImageFromDmaBuf( - desktop_size_, spa_video_format_.format, plane_datas, modifier_); + src_unique_ptr = + egl_dmabuf_->ImageFromDmaBuf(desktop_size_, spa_video_format_.format, + plane_datas, modifier_); src = src_unique_ptr.get(); } else if (spa_buffer->datas[0].type == SPA_DATA_MemPtr) { src = static_cast(spa_buffer->datas[0].data); @@ -727,14 +728,14 @@ void BaseCapturerPipeWire::SessionRequest() { portal_handle_, OnSessionRequestResponseSignal); RTC_LOG(LS_INFO) << "Screen cast session requested."; - g_dbus_proxy_call(proxy_, "CreateSession", g_variant_new("(a{sv})", &builder), - G_DBUS_CALL_FLAGS_NONE, /*timeout=*/-1, cancellable_, - reinterpret_cast(OnSessionRequested), - this); + g_dbus_proxy_call( + proxy_, "CreateSession", g_variant_new("(a{sv})", &builder), + G_DBUS_CALL_FLAGS_NONE, /*timeout=*/-1, cancellable_, + reinterpret_cast(OnSessionRequested), this); } // static -void BaseCapturerPipeWire::OnSessionRequested(GDBusProxy* proxy, +void BaseCapturerPipeWire::OnSessionRequested(GDBusProxy *proxy, GAsyncResult* result, gpointer user_data) { BaseCapturerPipeWire* that = static_cast(user_data); @@ -840,15 +841,15 @@ void BaseCapturerPipeWire::SourcesRequest() { sources_handle_, OnSourcesRequestResponseSignal); RTC_LOG(LS_INFO) << "Requesting sources from the screen cast session."; - g_dbus_proxy_call(proxy_, "SelectSources", - g_variant_new("(oa{sv})", session_handle_, &builder), - G_DBUS_CALL_FLAGS_NONE, /*timeout=*/-1, cancellable_, - reinterpret_cast(OnSourcesRequested), - this); + g_dbus_proxy_call( + proxy_, "SelectSources", + g_variant_new("(oa{sv})", session_handle_, &builder), + G_DBUS_CALL_FLAGS_NONE, /*timeout=*/-1, cancellable_, + reinterpret_cast(OnSourcesRequested), this); } // static -void BaseCapturerPipeWire::OnSourcesRequested(GDBusProxy* proxy, +void BaseCapturerPipeWire::OnSourcesRequested(GDBusProxy *proxy, GAsyncResult* result, gpointer user_data) { BaseCapturerPipeWire* that = static_cast(user_data); @@ -934,7 +935,7 @@ void BaseCapturerPipeWire::StartRequest() { } // static -void BaseCapturerPipeWire::OnStartRequested(GDBusProxy* proxy, +void BaseCapturerPipeWire::OnStartRequested(GDBusProxy *proxy, GAsyncResult* result, gpointer user_data) { BaseCapturerPipeWire* that = static_cast(user_data); @@ -1033,15 +1034,17 @@ void BaseCapturerPipeWire::OpenPipeWireRemote() { g_dbus_proxy_call_with_unix_fd_list( proxy_, "OpenPipeWireRemote", g_variant_new("(oa{sv})", session_handle_, &builder), - G_DBUS_CALL_FLAGS_NONE, /*timeout=*/-1, /*fd_list=*/nullptr, cancellable_, + G_DBUS_CALL_FLAGS_NONE, /*timeout=*/-1, /*fd_list=*/nullptr, + cancellable_, reinterpret_cast(OnOpenPipeWireRemoteRequested), this); } // static -void BaseCapturerPipeWire::OnOpenPipeWireRemoteRequested(GDBusProxy* proxy, - GAsyncResult* result, - gpointer user_data) { +void BaseCapturerPipeWire::OnOpenPipeWireRemoteRequested( + GDBusProxy *proxy, + GAsyncResult* result, + gpointer user_data) { BaseCapturerPipeWire* that = static_cast(user_data); RTC_DCHECK(that); diff --git a/modules/desktop_capture/linux/wayland/base_capturer_pipewire.h b/modules/desktop_capture/linux/base_capturer_pipewire.h similarity index 91% rename from modules/desktop_capture/linux/wayland/base_capturer_pipewire.h rename to modules/desktop_capture/linux/base_capturer_pipewire.h index 238439e672..a7f954d516 100644 --- a/modules/desktop_capture/linux/wayland/base_capturer_pipewire.h +++ b/modules/desktop_capture/linux/base_capturer_pipewire.h @@ -8,20 +8,18 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_BASE_CAPTURER_PIPEWIRE_H_ -#define MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_BASE_CAPTURER_PIPEWIRE_H_ +#ifndef MODULES_DESKTOP_CAPTURE_LINUX_BASE_CAPTURER_PIPEWIRE_H_ +#define MODULES_DESKTOP_CAPTURE_LINUX_BASE_CAPTURER_PIPEWIRE_H_ #include #define typeof __typeof__ #include #include #include -#include - #include "absl/types/optional.h" #include "modules/desktop_capture/desktop_capture_options.h" #include "modules/desktop_capture/desktop_capturer.h" -#include "modules/desktop_capture/linux/wayland/egl_dmabuf.h" +#include "modules/desktop_capture/linux/egl_dmabuf.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/synchronization/mutex.h" @@ -82,7 +80,7 @@ class BaseCapturerPipeWire : public DesktopCapturer { GDBusConnection* connection_ = nullptr; GDBusProxy* proxy_ = nullptr; - GCancellable* cancellable_ = nullptr; + GCancellable *cancellable_ = nullptr; gchar* portal_handle_ = nullptr; gchar* session_handle_ = nullptr; gchar* sources_handle_ = nullptr; @@ -140,7 +138,7 @@ class BaseCapturerPipeWire : public DesktopCapturer { const gchar* token); void SessionRequest(); - static void OnSessionRequested(GDBusProxy* proxy, + static void OnSessionRequested(GDBusProxy *proxy, GAsyncResult* result, gpointer user_data); static void OnSessionRequestResponseSignal(GDBusConnection* connection, @@ -152,7 +150,7 @@ class BaseCapturerPipeWire : public DesktopCapturer { gpointer user_data); void SourcesRequest(); - static void OnSourcesRequested(GDBusProxy* proxy, + static void OnSourcesRequested(GDBusProxy *proxy, GAsyncResult* result, gpointer user_data); static void OnSourcesRequestResponseSignal(GDBusConnection* connection, @@ -164,7 +162,7 @@ class BaseCapturerPipeWire : public DesktopCapturer { gpointer user_data); void StartRequest(); - static void OnStartRequested(GDBusProxy* proxy, + static void OnStartRequested(GDBusProxy *proxy, GAsyncResult* result, gpointer user_data); static void OnStartRequestResponseSignal(GDBusConnection* connection, @@ -176,7 +174,7 @@ class BaseCapturerPipeWire : public DesktopCapturer { gpointer user_data); void OpenPipeWireRemote(); - static void OnOpenPipeWireRemoteRequested(GDBusProxy* proxy, + static void OnOpenPipeWireRemoteRequested(GDBusProxy *proxy, GAsyncResult* result, gpointer user_data); @@ -185,4 +183,4 @@ class BaseCapturerPipeWire : public DesktopCapturer { } // namespace webrtc -#endif // MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_BASE_CAPTURER_PIPEWIRE_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_BASE_CAPTURER_PIPEWIRE_H_ diff --git a/modules/desktop_capture/linux/wayland/drm.sigs b/modules/desktop_capture/linux/drm.sigs similarity index 100% rename from modules/desktop_capture/linux/wayland/drm.sigs rename to modules/desktop_capture/linux/drm.sigs diff --git a/modules/desktop_capture/linux/wayland/egl_dmabuf.cc b/modules/desktop_capture/linux/egl_dmabuf.cc similarity index 99% rename from modules/desktop_capture/linux/wayland/egl_dmabuf.cc rename to modules/desktop_capture/linux/egl_dmabuf.cc index e872636d04..7e464a1e88 100644 --- a/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +++ b/modules/desktop_capture/linux/egl_dmabuf.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/linux/wayland/egl_dmabuf.h" +#include "modules/desktop_capture/linux/egl_dmabuf.h" #include #include diff --git a/modules/desktop_capture/linux/wayland/egl_dmabuf.h b/modules/desktop_capture/linux/egl_dmabuf.h similarity index 89% rename from modules/desktop_capture/linux/wayland/egl_dmabuf.h rename to modules/desktop_capture/linux/egl_dmabuf.h index bc512a3e66..9d7309f562 100644 --- a/modules/desktop_capture/linux/wayland/egl_dmabuf.h +++ b/modules/desktop_capture/linux/egl_dmabuf.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_EGL_DMABUF_H_ -#define MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_EGL_DMABUF_H_ +#ifndef MODULES_DESKTOP_CAPTURE_LINUX_EGL_DMABUF_H_ +#define MODULES_DESKTOP_CAPTURE_LINUX_EGL_DMABUF_H_ #include #include @@ -62,4 +62,4 @@ class EglDmaBuf { } // namespace webrtc -#endif // MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_EGL_DMABUF_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_EGL_DMABUF_H_ diff --git a/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc b/modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc similarity index 97% rename from modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc rename to modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc index 0f4be547e9..761d428f42 100644 --- a/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc +++ b/modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.h" +#include "modules/desktop_capture/linux/mouse_cursor_monitor_x11.h" #include #include @@ -23,7 +23,7 @@ #include "modules/desktop_capture/desktop_capture_types.h" #include "modules/desktop_capture/desktop_frame.h" #include "modules/desktop_capture/desktop_geometry.h" -#include "modules/desktop_capture/linux/x11/x_error_trap.h" +#include "modules/desktop_capture/linux/x_error_trap.h" #include "modules/desktop_capture/mouse_cursor.h" #include "modules/desktop_capture/mouse_cursor_monitor.h" #include "rtc_base/checks.h" @@ -208,7 +208,7 @@ void MouseCursorMonitorX11::CaptureCursor() { new BasicDesktopFrame(DesktopSize(img->width, img->height))); // Xlib stores 32-bit data in longs, even if longs are 64-bits long. - unsigned long* src = img->pixels; // NOLINT(runtime/int) + unsigned long* src = img->pixels; uint32_t* dst = reinterpret_cast(image->data()); uint32_t* dst_end = dst + (img->width * img->height); while (dst < dst_end) { diff --git a/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.h b/modules/desktop_capture/linux/mouse_cursor_monitor_x11.h similarity index 87% rename from modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.h rename to modules/desktop_capture/linux/mouse_cursor_monitor_x11.h index 980d254a0a..c34eaf468e 100644 --- a/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.h +++ b/modules/desktop_capture/linux/mouse_cursor_monitor_x11.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X11_MOUSE_CURSOR_MONITOR_X11_H_ -#define MODULES_DESKTOP_CAPTURE_LINUX_X11_MOUSE_CURSOR_MONITOR_X11_H_ +#ifndef MODULES_DESKTOP_CAPTURE_LINUX_MOUSE_CURSOR_MONITOR_X11_H_ +#define MODULES_DESKTOP_CAPTURE_LINUX_MOUSE_CURSOR_MONITOR_X11_H_ #include @@ -18,7 +18,7 @@ #include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_capture_options.h" #include "modules/desktop_capture/desktop_capture_types.h" -#include "modules/desktop_capture/linux/x11/shared_x_display.h" +#include "modules/desktop_capture/linux/shared_x_display.h" #include "modules/desktop_capture/mouse_cursor.h" #include "modules/desktop_capture/mouse_cursor_monitor.h" @@ -65,4 +65,4 @@ class MouseCursorMonitorX11 : public MouseCursorMonitor, } // namespace webrtc -#endif // MODULES_DESKTOP_CAPTURE_LINUX_X11_MOUSE_CURSOR_MONITOR_X11_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_MOUSE_CURSOR_MONITOR_X11_H_ diff --git a/modules/desktop_capture/linux/wayland/pipewire.sigs b/modules/desktop_capture/linux/pipewire.sigs similarity index 100% rename from modules/desktop_capture/linux/wayland/pipewire.sigs rename to modules/desktop_capture/linux/pipewire.sigs diff --git a/modules/desktop_capture/linux/wayland/pipewire_stub_header.fragment b/modules/desktop_capture/linux/pipewire_stub_header.fragment similarity index 100% rename from modules/desktop_capture/linux/wayland/pipewire_stub_header.fragment rename to modules/desktop_capture/linux/pipewire_stub_header.fragment diff --git a/modules/desktop_capture/linux/x11/screen_capturer_x11.cc b/modules/desktop_capture/linux/screen_capturer_x11.cc similarity index 99% rename from modules/desktop_capture/linux/x11/screen_capturer_x11.cc rename to modules/desktop_capture/linux/screen_capturer_x11.cc index 2de387578e..c601a2afb8 100644 --- a/modules/desktop_capture/linux/x11/screen_capturer_x11.cc +++ b/modules/desktop_capture/linux/screen_capturer_x11.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/linux/x11/screen_capturer_x11.h" +#include "modules/desktop_capture/linux/screen_capturer_x11.h" #include #include @@ -25,7 +25,7 @@ #include "modules/desktop_capture/desktop_capturer.h" #include "modules/desktop_capture/desktop_frame.h" #include "modules/desktop_capture/desktop_geometry.h" -#include "modules/desktop_capture/linux/x11/x_server_pixel_buffer.h" +#include "modules/desktop_capture/linux/x_server_pixel_buffer.h" #include "modules/desktop_capture/screen_capture_frame_queue.h" #include "modules/desktop_capture/screen_capturer_helper.h" #include "modules/desktop_capture/shared_desktop_frame.h" diff --git a/modules/desktop_capture/linux/x11/screen_capturer_x11.h b/modules/desktop_capture/linux/screen_capturer_x11.h similarity index 92% rename from modules/desktop_capture/linux/x11/screen_capturer_x11.h rename to modules/desktop_capture/linux/screen_capturer_x11.h index ebf18a451b..c98b9fbf97 100644 --- a/modules/desktop_capture/linux/x11/screen_capturer_x11.h +++ b/modules/desktop_capture/linux/screen_capturer_x11.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X11_SCREEN_CAPTURER_X11_H_ -#define MODULES_DESKTOP_CAPTURE_LINUX_X11_SCREEN_CAPTURER_X11_H_ +#ifndef MODULES_DESKTOP_CAPTURE_LINUX_SCREEN_CAPTURER_X11_H_ +#define MODULES_DESKTOP_CAPTURE_LINUX_SCREEN_CAPTURER_X11_H_ #include #include @@ -23,9 +23,9 @@ #include "modules/desktop_capture/desktop_capturer.h" #include "modules/desktop_capture/desktop_frame.h" #include "modules/desktop_capture/desktop_region.h" -#include "modules/desktop_capture/linux/x11/shared_x_display.h" -#include "modules/desktop_capture/linux/x11/x_atom_cache.h" -#include "modules/desktop_capture/linux/x11/x_server_pixel_buffer.h" +#include "modules/desktop_capture/linux/shared_x_display.h" +#include "modules/desktop_capture/linux/x_atom_cache.h" +#include "modules/desktop_capture/linux/x_server_pixel_buffer.h" #include "modules/desktop_capture/screen_capture_frame_queue.h" #include "modules/desktop_capture/screen_capturer_helper.h" #include "modules/desktop_capture/shared_desktop_frame.h" @@ -144,4 +144,4 @@ class ScreenCapturerX11 : public DesktopCapturer, } // namespace webrtc -#endif // MODULES_DESKTOP_CAPTURE_LINUX_X11_SCREEN_CAPTURER_X11_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_SCREEN_CAPTURER_X11_H_ diff --git a/modules/desktop_capture/linux/x11/shared_x_display.cc b/modules/desktop_capture/linux/shared_x_display.cc similarity index 97% rename from modules/desktop_capture/linux/x11/shared_x_display.cc rename to modules/desktop_capture/linux/shared_x_display.cc index ca084d4bf5..3133134a70 100644 --- a/modules/desktop_capture/linux/x11/shared_x_display.cc +++ b/modules/desktop_capture/linux/shared_x_display.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/linux/x11/shared_x_display.h" +#include "modules/desktop_capture/linux/shared_x_display.h" #include #include diff --git a/modules/desktop_capture/linux/x11/shared_x_display.h b/modules/desktop_capture/linux/shared_x_display.h similarity index 92% rename from modules/desktop_capture/linux/x11/shared_x_display.h rename to modules/desktop_capture/linux/shared_x_display.h index 13e1c8d2d5..da130b0072 100644 --- a/modules/desktop_capture/linux/x11/shared_x_display.h +++ b/modules/desktop_capture/linux/shared_x_display.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X11_SHARED_X_DISPLAY_H_ -#define MODULES_DESKTOP_CAPTURE_LINUX_X11_SHARED_X_DISPLAY_H_ +#ifndef MODULES_DESKTOP_CAPTURE_LINUX_SHARED_X_DISPLAY_H_ +#define MODULES_DESKTOP_CAPTURE_LINUX_SHARED_X_DISPLAY_H_ #include #include @@ -81,4 +81,4 @@ class RTC_EXPORT SharedXDisplay } // namespace webrtc -#endif // MODULES_DESKTOP_CAPTURE_LINUX_X11_SHARED_X_DISPLAY_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_SHARED_X_DISPLAY_H_ diff --git a/modules/desktop_capture/linux/x11/window_capturer_x11.cc b/modules/desktop_capture/linux/window_capturer_x11.cc similarity index 96% rename from modules/desktop_capture/linux/x11/window_capturer_x11.cc rename to modules/desktop_capture/linux/window_capturer_x11.cc index 5b87e8cbd3..94f9f92c81 100644 --- a/modules/desktop_capture/linux/x11/window_capturer_x11.cc +++ b/modules/desktop_capture/linux/window_capturer_x11.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/linux/x11/window_capturer_x11.h" +#include "modules/desktop_capture/linux/window_capturer_x11.h" #include #include @@ -23,9 +23,9 @@ #include "modules/desktop_capture/desktop_capture_types.h" #include "modules/desktop_capture/desktop_frame.h" #include "modules/desktop_capture/desktop_region.h" -#include "modules/desktop_capture/linux/x11/shared_x_display.h" -#include "modules/desktop_capture/linux/x11/window_finder_x11.h" -#include "modules/desktop_capture/linux/x11/window_list_utils.h" +#include "modules/desktop_capture/linux/shared_x_display.h" +#include "modules/desktop_capture/linux/window_finder_x11.h" +#include "modules/desktop_capture/linux/window_list_utils.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" #include "rtc_base/trace_event.h" diff --git a/modules/desktop_capture/linux/x11/window_capturer_x11.h b/modules/desktop_capture/linux/window_capturer_x11.h similarity index 81% rename from modules/desktop_capture/linux/x11/window_capturer_x11.h rename to modules/desktop_capture/linux/window_capturer_x11.h index f15b1474e0..d8a085f366 100644 --- a/modules/desktop_capture/linux/x11/window_capturer_x11.h +++ b/modules/desktop_capture/linux/window_capturer_x11.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X11_WINDOW_CAPTURER_X11_H_ -#define MODULES_DESKTOP_CAPTURE_LINUX_X11_WINDOW_CAPTURER_X11_H_ +#ifndef MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_CAPTURER_X11_H_ +#define MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_CAPTURER_X11_H_ #include #include @@ -21,10 +21,10 @@ #include "modules/desktop_capture/desktop_capture_options.h" #include "modules/desktop_capture/desktop_capturer.h" #include "modules/desktop_capture/desktop_geometry.h" -#include "modules/desktop_capture/linux/x11/shared_x_display.h" -#include "modules/desktop_capture/linux/x11/window_finder_x11.h" -#include "modules/desktop_capture/linux/x11/x_atom_cache.h" -#include "modules/desktop_capture/linux/x11/x_server_pixel_buffer.h" +#include "modules/desktop_capture/linux/shared_x_display.h" +#include "modules/desktop_capture/linux/window_finder_x11.h" +#include "modules/desktop_capture/linux/x_atom_cache.h" +#include "modules/desktop_capture/linux/x_server_pixel_buffer.h" #include "rtc_base/constructor_magic.h" namespace webrtc { @@ -71,4 +71,4 @@ class WindowCapturerX11 : public DesktopCapturer, } // namespace webrtc -#endif // MODULES_DESKTOP_CAPTURE_LINUX_X11_WINDOW_CAPTURER_X11_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_CAPTURER_X11_H_ diff --git a/modules/desktop_capture/linux/x11/window_finder_x11.cc b/modules/desktop_capture/linux/window_finder_x11.cc similarity index 90% rename from modules/desktop_capture/linux/x11/window_finder_x11.cc rename to modules/desktop_capture/linux/window_finder_x11.cc index dec17ab51f..16fb3252ad 100644 --- a/modules/desktop_capture/linux/x11/window_finder_x11.cc +++ b/modules/desktop_capture/linux/window_finder_x11.cc @@ -8,13 +8,13 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/linux/x11/window_finder_x11.h" +#include "modules/desktop_capture/linux/window_finder_x11.h" #include #include -#include "modules/desktop_capture/linux/x11/window_list_utils.h" +#include "modules/desktop_capture/linux/window_list_utils.h" #include "rtc_base/checks.h" namespace webrtc { diff --git a/modules/desktop_capture/linux/x11/window_finder_x11.h b/modules/desktop_capture/linux/window_finder_x11.h similarity index 81% rename from modules/desktop_capture/linux/x11/window_finder_x11.h rename to modules/desktop_capture/linux/window_finder_x11.h index 91de876417..d0bba8697b 100644 --- a/modules/desktop_capture/linux/x11/window_finder_x11.h +++ b/modules/desktop_capture/linux/window_finder_x11.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X11_WINDOW_FINDER_X11_H_ -#define MODULES_DESKTOP_CAPTURE_LINUX_X11_WINDOW_FINDER_X11_H_ +#ifndef MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_FINDER_X11_H_ +#define MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_FINDER_X11_H_ #include "modules/desktop_capture/window_finder.h" @@ -32,4 +32,4 @@ class WindowFinderX11 final : public WindowFinder { } // namespace webrtc -#endif // MODULES_DESKTOP_CAPTURE_LINUX_X11_WINDOW_FINDER_X11_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_FINDER_X11_H_ diff --git a/modules/desktop_capture/linux/x11/window_list_utils.cc b/modules/desktop_capture/linux/window_list_utils.cc similarity index 96% rename from modules/desktop_capture/linux/x11/window_list_utils.cc rename to modules/desktop_capture/linux/window_list_utils.cc index a366f9e061..ade92d2be8 100644 --- a/modules/desktop_capture/linux/x11/window_list_utils.cc +++ b/modules/desktop_capture/linux/window_list_utils.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/linux/x11/window_list_utils.h" +#include "modules/desktop_capture/linux/window_list_utils.h" #include #include @@ -16,8 +16,8 @@ #include -#include "modules/desktop_capture/linux/x11/x_error_trap.h" -#include "modules/desktop_capture/linux/x11/x_window_property.h" +#include "modules/desktop_capture/linux/x_error_trap.h" +#include "modules/desktop_capture/linux/x_window_property.h" #include "rtc_base/checks.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/logging.h" diff --git a/modules/desktop_capture/linux/x11/window_list_utils.h b/modules/desktop_capture/linux/window_list_utils.h similarity index 89% rename from modules/desktop_capture/linux/x11/window_list_utils.h rename to modules/desktop_capture/linux/window_list_utils.h index 923842df14..3ffd336705 100644 --- a/modules/desktop_capture/linux/x11/window_list_utils.h +++ b/modules/desktop_capture/linux/window_list_utils.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X11_WINDOW_LIST_UTILS_H_ -#define MODULES_DESKTOP_CAPTURE_LINUX_X11_WINDOW_LIST_UTILS_H_ +#ifndef MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_LIST_UTILS_H_ +#define MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_LIST_UTILS_H_ #include #include @@ -17,7 +17,7 @@ #include "api/function_view.h" #include "modules/desktop_capture/desktop_geometry.h" -#include "modules/desktop_capture/linux/x11/x_atom_cache.h" +#include "modules/desktop_capture/linux/x_atom_cache.h" namespace webrtc { @@ -53,4 +53,4 @@ DesktopRect DesktopRectFromXAttributes(const T& attributes) { } // namespace webrtc -#endif // MODULES_DESKTOP_CAPTURE_LINUX_X11_WINDOW_LIST_UTILS_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_LIST_UTILS_H_ diff --git a/modules/desktop_capture/linux/x11/x_atom_cache.cc b/modules/desktop_capture/linux/x_atom_cache.cc similarity index 95% rename from modules/desktop_capture/linux/x11/x_atom_cache.cc rename to modules/desktop_capture/linux/x_atom_cache.cc index 157ba8b8fd..4ea024938e 100644 --- a/modules/desktop_capture/linux/x11/x_atom_cache.cc +++ b/modules/desktop_capture/linux/x_atom_cache.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/linux/x11/x_atom_cache.h" +#include "modules/desktop_capture/linux/x_atom_cache.h" #include "rtc_base/checks.h" diff --git a/modules/desktop_capture/linux/x11/x_atom_cache.h b/modules/desktop_capture/linux/x_atom_cache.h similarity index 85% rename from modules/desktop_capture/linux/x11/x_atom_cache.h rename to modules/desktop_capture/linux/x_atom_cache.h index 39d957e98b..0249c15978 100644 --- a/modules/desktop_capture/linux/x11/x_atom_cache.h +++ b/modules/desktop_capture/linux/x_atom_cache.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X11_X_ATOM_CACHE_H_ -#define MODULES_DESKTOP_CAPTURE_LINUX_X11_X_ATOM_CACHE_H_ +#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X_ATOM_CACHE_H_ +#define MODULES_DESKTOP_CAPTURE_LINUX_X_ATOM_CACHE_H_ #include #include @@ -42,4 +42,4 @@ class XAtomCache final { } // namespace webrtc -#endif // MODULES_DESKTOP_CAPTURE_LINUX_X11_X_ATOM_CACHE_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_X_ATOM_CACHE_H_ diff --git a/modules/desktop_capture/linux/x11/x_error_trap.cc b/modules/desktop_capture/linux/x_error_trap.cc similarity index 96% rename from modules/desktop_capture/linux/x11/x_error_trap.cc rename to modules/desktop_capture/linux/x_error_trap.cc index f31565e24b..13233d8274 100644 --- a/modules/desktop_capture/linux/x11/x_error_trap.cc +++ b/modules/desktop_capture/linux/x_error_trap.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/linux/x11/x_error_trap.h" +#include "modules/desktop_capture/linux/x_error_trap.h" #include diff --git a/modules/desktop_capture/linux/x11/x_error_trap.h b/modules/desktop_capture/linux/x_error_trap.h similarity index 84% rename from modules/desktop_capture/linux/x11/x_error_trap.h rename to modules/desktop_capture/linux/x_error_trap.h index ceb660ccbd..1fb0fdcc92 100644 --- a/modules/desktop_capture/linux/x11/x_error_trap.h +++ b/modules/desktop_capture/linux/x_error_trap.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X11_X_ERROR_TRAP_H_ -#define MODULES_DESKTOP_CAPTURE_LINUX_X11_X_ERROR_TRAP_H_ +#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X_ERROR_TRAP_H_ +#define MODULES_DESKTOP_CAPTURE_LINUX_X_ERROR_TRAP_H_ #include @@ -36,4 +36,4 @@ class XErrorTrap { } // namespace webrtc -#endif // MODULES_DESKTOP_CAPTURE_LINUX_X11_X_ERROR_TRAP_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_X_ERROR_TRAP_H_ diff --git a/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc b/modules/desktop_capture/linux/x_server_pixel_buffer.cc similarity index 97% rename from modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc rename to modules/desktop_capture/linux/x_server_pixel_buffer.cc index fd6fc7daf4..84b57f1eb7 100644 --- a/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc +++ b/modules/desktop_capture/linux/x_server_pixel_buffer.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/linux/x11/x_server_pixel_buffer.h" +#include "modules/desktop_capture/linux/x_server_pixel_buffer.h" #include #include @@ -17,9 +17,9 @@ #include #include "modules/desktop_capture/desktop_frame.h" -#include "modules/desktop_capture/linux/x11/window_list_utils.h" -#include "modules/desktop_capture/linux/x11/x_error_trap.h" -#include "modules/desktop_capture/linux/x11/x_window_property.h" +#include "modules/desktop_capture/linux/window_list_utils.h" +#include "modules/desktop_capture/linux/x_error_trap.h" +#include "modules/desktop_capture/linux/x_window_property.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" diff --git a/modules/desktop_capture/linux/x11/x_server_pixel_buffer.h b/modules/desktop_capture/linux/x_server_pixel_buffer.h similarity index 93% rename from modules/desktop_capture/linux/x11/x_server_pixel_buffer.h rename to modules/desktop_capture/linux/x_server_pixel_buffer.h index 84e1de35e5..aa3f903e0a 100644 --- a/modules/desktop_capture/linux/x11/x_server_pixel_buffer.h +++ b/modules/desktop_capture/linux/x_server_pixel_buffer.h @@ -10,8 +10,8 @@ // Don't include this file in any .h files because it pulls in some X headers. -#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X11_X_SERVER_PIXEL_BUFFER_H_ -#define MODULES_DESKTOP_CAPTURE_LINUX_X11_X_SERVER_PIXEL_BUFFER_H_ +#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X_SERVER_PIXEL_BUFFER_H_ +#define MODULES_DESKTOP_CAPTURE_LINUX_X_SERVER_PIXEL_BUFFER_H_ #include #include @@ -86,4 +86,4 @@ class XServerPixelBuffer { } // namespace webrtc -#endif // MODULES_DESKTOP_CAPTURE_LINUX_X11_X_SERVER_PIXEL_BUFFER_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_X_SERVER_PIXEL_BUFFER_H_ diff --git a/modules/desktop_capture/linux/x11/x_window_property.cc b/modules/desktop_capture/linux/x_window_property.cc similarity index 95% rename from modules/desktop_capture/linux/x11/x_window_property.cc rename to modules/desktop_capture/linux/x_window_property.cc index 5e16dac404..ba25deec3d 100644 --- a/modules/desktop_capture/linux/x11/x_window_property.cc +++ b/modules/desktop_capture/linux/x_window_property.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/linux/x11/x_window_property.h" +#include "modules/desktop_capture/linux/x_window_property.h" namespace webrtc { diff --git a/modules/desktop_capture/linux/x11/x_window_property.h b/modules/desktop_capture/linux/x_window_property.h similarity index 90% rename from modules/desktop_capture/linux/x11/x_window_property.h rename to modules/desktop_capture/linux/x_window_property.h index 71cbf06eb3..ef643b6a8f 100644 --- a/modules/desktop_capture/linux/x11/x_window_property.h +++ b/modules/desktop_capture/linux/x_window_property.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X11_X_WINDOW_PROPERTY_H_ -#define MODULES_DESKTOP_CAPTURE_LINUX_X11_X_WINDOW_PROPERTY_H_ +#ifndef MODULES_DESKTOP_CAPTURE_LINUX_X_WINDOW_PROPERTY_H_ +#define MODULES_DESKTOP_CAPTURE_LINUX_X_WINDOW_PROPERTY_H_ #include #include @@ -60,4 +60,4 @@ class XWindowProperty : public XWindowPropertyBase { } // namespace webrtc -#endif // MODULES_DESKTOP_CAPTURE_LINUX_X11_X_WINDOW_PROPERTY_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_X_WINDOW_PROPERTY_H_ diff --git a/modules/desktop_capture/mouse_cursor_monitor_linux.cc b/modules/desktop_capture/mouse_cursor_monitor_linux.cc index 87edb40373..e569f6ef35 100644 --- a/modules/desktop_capture/mouse_cursor_monitor_linux.cc +++ b/modules/desktop_capture/mouse_cursor_monitor_linux.cc @@ -14,7 +14,7 @@ #include "modules/desktop_capture/mouse_cursor_monitor.h" #if defined(WEBRTC_USE_X11) -#include "modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.h" +#include "modules/desktop_capture/linux/mouse_cursor_monitor_x11.h" #endif // defined(WEBRTC_USE_X11) namespace webrtc { diff --git a/modules/desktop_capture/screen_capturer_linux.cc b/modules/desktop_capture/screen_capturer_linux.cc index 267491aaf9..6cad2acd64 100644 --- a/modules/desktop_capture/screen_capturer_linux.cc +++ b/modules/desktop_capture/screen_capturer_linux.cc @@ -14,11 +14,11 @@ #include "modules/desktop_capture/desktop_capturer.h" #if defined(WEBRTC_USE_PIPEWIRE) -#include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h" +#include "modules/desktop_capture/linux/base_capturer_pipewire.h" #endif // defined(WEBRTC_USE_PIPEWIRE) #if defined(WEBRTC_USE_X11) -#include "modules/desktop_capture/linux/x11/screen_capturer_x11.h" +#include "modules/desktop_capture/linux/screen_capturer_x11.h" #endif // defined(WEBRTC_USE_X11) namespace webrtc { diff --git a/modules/desktop_capture/screen_drawer_linux.cc b/modules/desktop_capture/screen_drawer_linux.cc index fce036b4aa..823126548c 100644 --- a/modules/desktop_capture/screen_drawer_linux.cc +++ b/modules/desktop_capture/screen_drawer_linux.cc @@ -17,7 +17,7 @@ #include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_capture_types.h" #include "modules/desktop_capture/desktop_geometry.h" -#include "modules/desktop_capture/linux/x11/shared_x_display.h" +#include "modules/desktop_capture/linux/shared_x_display.h" #include "modules/desktop_capture/rgba_color.h" #include "modules/desktop_capture/screen_drawer.h" #include "modules/desktop_capture/screen_drawer_lock_posix.h" diff --git a/modules/desktop_capture/window_capturer_linux.cc b/modules/desktop_capture/window_capturer_linux.cc index 9c0e2bf81a..89ba90d80e 100644 --- a/modules/desktop_capture/window_capturer_linux.cc +++ b/modules/desktop_capture/window_capturer_linux.cc @@ -14,11 +14,11 @@ #include "modules/desktop_capture/desktop_capturer.h" #if defined(WEBRTC_USE_PIPEWIRE) -#include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h" +#include "modules/desktop_capture/linux/base_capturer_pipewire.h" #endif // defined(WEBRTC_USE_PIPEWIRE) #if defined(WEBRTC_USE_X11) -#include "modules/desktop_capture/linux/x11/window_capturer_x11.h" +#include "modules/desktop_capture/linux/window_capturer_x11.h" #endif // defined(WEBRTC_USE_X11) namespace webrtc { diff --git a/modules/desktop_capture/window_finder_unittest.cc b/modules/desktop_capture/window_finder_unittest.cc index ac13f124d3..7a586c7361 100644 --- a/modules/desktop_capture/window_finder_unittest.cc +++ b/modules/desktop_capture/window_finder_unittest.cc @@ -21,8 +21,8 @@ #include "test/gtest.h" #if defined(WEBRTC_USE_X11) -#include "modules/desktop_capture/linux/x11/shared_x_display.h" -#include "modules/desktop_capture/linux/x11/x_atom_cache.h" +#include "modules/desktop_capture/linux/shared_x_display.h" +#include "modules/desktop_capture/linux/x_atom_cache.h" #endif #if defined(WEBRTC_WIN)