diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /third_party/libwebrtc/modules/desktop_capture | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/modules/desktop_capture')
5 files changed, 8 insertions, 29 deletions
diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc index 40764de7ae..81caa9bd2d 100644 --- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc +++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc @@ -112,6 +112,7 @@ void BaseCapturerPipeWire::OnScreenCastSessionClosed() { if (!capturer_failed_) { options_.screencast_stream()->StopScreenCastStream(); } + capturer_failed_ = true; } void BaseCapturerPipeWire::UpdateResolution(uint32_t width, uint32_t height) { diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc index 61c6957d27..473f913466 100644 --- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc @@ -14,7 +14,6 @@ #include <libdrm/drm_fourcc.h> #include <pipewire/pipewire.h> #include <spa/param/video/format-utils.h> -#include <sys/mman.h> #include <vector> @@ -49,33 +48,6 @@ constexpr int CursorMetaSize(int w, int h) { constexpr PipeWireVersion kDmaBufModifierMinVersion = {0, 3, 33}; constexpr PipeWireVersion kDropSingleModifierMinVersion = {0, 3, 40}; -class ScopedBuf { - public: - ScopedBuf() {} - ScopedBuf(uint8_t* map, int map_size, int fd) - : map_(map), map_size_(map_size), fd_(fd) {} - ~ScopedBuf() { - if (map_ != MAP_FAILED) { - munmap(map_, map_size_); - } - } - - explicit operator bool() { return map_ != MAP_FAILED; } - - void initialize(uint8_t* map, int map_size, int fd) { - map_ = map; - map_size_ = map_size; - fd_ = fd; - } - - uint8_t* get() { return map_; } - - protected: - uint8_t* map_ = static_cast<uint8_t*>(MAP_FAILED); - int map_size_; - int fd_; -}; - class SharedScreenCastStreamPrivate { public: SharedScreenCastStreamPrivate(); diff --git a/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_provider.h b/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_provider.h index aad28d2f30..64ef5750ec 100644 --- a/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_provider.h +++ b/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_provider.h @@ -46,6 +46,8 @@ class DesktopFrameProvider { // Expected to be called before stopping the CGDisplayStreamRef streams. void Release(); + bool allow_iosurface() const { return allow_iosurface_; } + private: SequenceChecker thread_checker_; const bool allow_iosurface_; diff --git a/third_party/libwebrtc/modules/desktop_capture/mac/screen_capturer_mac.mm b/third_party/libwebrtc/modules/desktop_capture/mac/screen_capturer_mac.mm index 1f4a62f7cd..785a15dfa4 100644 --- a/third_party/libwebrtc/modules/desktop_capture/mac/screen_capturer_mac.mm +++ b/third_party/libwebrtc/modules/desktop_capture/mac/screen_capturer_mac.mm @@ -442,6 +442,10 @@ void ScreenCapturerMac::ScreenConfigurationChanged() { bool ScreenCapturerMac::RegisterRefreshAndMoveHandlers() { RTC_DCHECK(thread_checker_.IsCurrent()); + if (!desktop_frame_provider_.allow_iosurface()) { + return true; + } + desktop_config_ = desktop_config_monitor_->desktop_configuration(); for (const auto& config : desktop_config_.displays) { size_t pixel_width = config.pixel_bounds.width(); diff --git a/third_party/libwebrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h b/third_party/libwebrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h index 2b1e0ab041..815986f680 100644 --- a/third_party/libwebrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h +++ b/third_party/libwebrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h @@ -132,7 +132,7 @@ class RTC_EXPORT DxgiDuplicatorController { // scoped_refptr<DxgiDuplicatorController> accesses private AddRef() and // Release() functions. - friend class rtc::scoped_refptr<DxgiDuplicatorController>; + friend class webrtc::scoped_refptr<DxgiDuplicatorController>; // A private constructor to ensure consumers to use // DxgiDuplicatorController::Instance(). |