commit f67ab3649110c6b3b4a6d7b6fe358060c21545f2
parent 4e7b688fbed26ad55ab72311434b38bd07f69f62
Author: Dan Baker <dbaker@mozilla.com>
Date: Mon, 1 Dec 2025 23:49:22 -0700
Bug 2000941 - Vendor libwebrtc from fa7d10eb73
We already cherry-picked this when we vendored 797bd0afe3.
Upstream commit: https://webrtc.googlesource.com/src/+/fa7d10eb73d13dc518e594af480601bf70245689
Revert "Define a movable variant of SequenceChecker"
This reverts commit 797bd0afe38685b635179f0870fbc4b019d049b5.
Reason for revert: A lock detector downstream didn't like it.
Original change's description:
> Define a movable variant of SequenceChecker
>
> and use it to instrument the (movable/copyable) IceCandidateCollection
>
> Bug: None
> Change-Id: I055b13d3c8c94eff5e045df691df5c0c523886ed
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/409546
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#45716}
Bug: None
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ic29d440e65c34c7034d87c8da7f39126376cb306
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/411781
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45720}
Diffstat:
5 files changed, 422 insertions(+), 1092 deletions(-)
diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor
@@ -1,4 +1,4 @@
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
-libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T06:46:46.911426+00:00.
+libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T06:49:10.035274+00:00.
# base of lastest vendoring
-70965bc749
+fa7d10eb73
diff --git a/third_party/libwebrtc/moz-patch-stack/fa7d10eb73.no-op-cherry-pick-msg b/third_party/libwebrtc/moz-patch-stack/fa7d10eb73.no-op-cherry-pick-msg
@@ -1 +0,0 @@
-We already cherry-picked this when we vendored 797bd0afe3.
diff --git a/third_party/libwebrtc/moz-patch-stack/p0001.patch b/third_party/libwebrtc/moz-patch-stack/p0001.patch
@@ -1,669 +1,118 @@
From: Daniel Baker <dbaker@mozilla.com>
-Date: Mon, 1 Dec 2025 23:38:54 -0700
-Subject: (tmp-cherry-pick) Revert "Define a movable variant of
- SequenceChecker" (fa7d10eb73)
+Date: Mon, 1 Dec 2025 19:31:22 -0700
+Subject: (tmp-cherry-pick) [M142] Revert "Add instructions for removing a
+ Trampoline-wrapped Signal" (29d6eabaf0)
-This reverts commit 797bd0afe38685b635179f0870fbc4b019d049b5.
+This reverts commit bb6b3aab159ebcd825526cf831f54170ccb2584d.
-Reason for revert: A lock detector downstream didn't like it.
+Reason for revert: Need to fix downstream Chromium issues.
Original change's description:
-> Define a movable variant of SequenceChecker
+> Add instructions for removing a Trampoline-wrapped Signal
>
-> and use it to instrument the (movable/copyable) IceCandidateCollection
+> Also apply the instructions to one Signal.
>
-> Bug: None
-> Change-Id: I055b13d3c8c94eff5e045df691df5c0c523886ed
-> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/409546
+> Bug: webrtc:42222066
+> Change-Id: I63409d968d27a843b0ac7c61a122a1b685cb7a6f
+> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/408883
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
-> Cr-Commit-Position: refs/heads/main@{#45716}
+> Cr-Commit-Position: refs/heads/main@{#45624}
-Bug: None
-No-Presubmit: true
-No-Tree-Checks: true
-No-Try: true
-Change-Id: Ic29d440e65c34c7034d87c8da7f39126376cb306
-Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/411781
-Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
-Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
+(cherry picked from commit 716c8eb942a74ad641bbace8c1db521b4857c636)
+
+Bug: webrtc:42222066, chromium:449225599, chromium:450516559
+No-IWYU: Revert
+Change-Id: I7fdf1694664b11ffcfd91916f1e98ef88254059d
+Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/413923
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
-Cr-Commit-Position: refs/heads/main@{#45720}
+Commit-Queue: Harald Alvestrand <hta@webrtc.org>
+Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
+Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
+Cr-Original-Commit-Position: refs/heads/main@{#45840}
+Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/415743
+Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
+Reviewed-by: Harald Alvestrand <hta@webrtc.org>
+Cr-Commit-Position: refs/branch-heads/7444@{#2}
+Cr-Branched-From: f70dc714a073397356f6ed866481da73f90f0b96-refs/heads/main@{#45766}
---
- api/DEPS | 1 -
- api/jsep.h | 43 +++----
- api/jsep_ice_candidate.cc | 15 +--
- api/sequence_checker.h | 49 --------
- api/sequence_checker_unittest.cc | 119 ------------------
- pc/BUILD.gn | 1 -
- pc/jsep_ice_candidate.cc | 4 +-
- pc/jsep_session_description.cc | 13 +-
- .../sequence_checker_internal.cc | 28 -----
- .../sequence_checker_internal.h | 62 ---------
- 10 files changed, 21 insertions(+), 314 deletions(-)
+ p2p/base/ice_transport_internal.cc | 5 +++--
+ p2p/base/ice_transport_internal.h | 9 ++++++---
+ rtc_base/sigslot_trampoline.h | 12 ------------
+ 3 files changed, 9 insertions(+), 17 deletions(-)
-diff --git a/api/DEPS b/api/DEPS
-index 3a5554e188..51421a4e23 100644
---- a/api/DEPS
-+++ b/api/DEPS
-@@ -115,7 +115,6 @@ specific_include_rules = {
- "+absl/strings/has_absl_stringify.h",
- "+absl/strings/str_format.h",
- "+rtc_base/system/no_unique_address.h",
-- "+rtc_base/thread_annotations.h"
- ],
-
- "local_network_access_permission\.h": [
-diff --git a/api/jsep.h b/api/jsep.h
-index 9befa94cf3..408a92982b 100644
---- a/api/jsep.h
-+++ b/api/jsep.h
-@@ -37,7 +37,6 @@
- #include "api/sequence_checker.h"
- #include "rtc_base/system/no_unique_address.h"
- #include "rtc_base/system/rtc_export.h"
--#include "rtc_base/thread_annotations.h"
-
- namespace webrtc {
-
-@@ -147,14 +146,8 @@ class IceCandidateCollection final {
- IceCandidateCollection(const IceCandidateCollection&) = delete;
- IceCandidateCollection& operator=(const IceCandidateCollection&) = delete;
-
-- size_t count() const {
-- RTC_DCHECK_RUN_ON(&sequence_checker_);
-- return candidates_.size();
-- }
-- bool empty() const {
-- RTC_DCHECK_RUN_ON(&sequence_checker_);
-- return candidates_.empty();
-- }
-+ size_t count() const { return candidates_.size(); }
-+ bool empty() const { return candidates_.empty(); }
- const IceCandidate* at(size_t index) const;
-
- // Adds and takes ownership of the IceCandidate.
-@@ -178,12 +171,9 @@ class IceCandidateCollection final {
- bool HasCandidate(const IceCandidate* candidate) const;
-
- IceCandidateCollection Clone() const;
-- void RelinquishThreadOwnership();
-
- private:
-- RTC_NO_UNIQUE_ADDRESS AutoDetachingSequenceChecker sequence_checker_;
-- std::vector<std::unique_ptr<IceCandidate>> candidates_
-- RTC_GUARDED_BY(sequence_checker_);
-+ std::vector<std::unique_ptr<IceCandidate>> candidates_;
- };
-
- // TODO: webrtc:406795492 - Deprecate.
-@@ -240,6 +230,12 @@ class SessionDescriptionInternal {
-
- ~SessionDescriptionInternal();
-
-+ // Resets the internal sequence_checker_ to not be attached to a particular
-+ // thread. Used when transfering object ownership between threads. Must be
-+ // called by the thread that currently owns the object before transferring the
-+ // ownership.
-+ void RelinquishThreadOwnership();
-+
- protected:
- // Only meant for the SessionDescriptionInterface implementation.
- SdpType sdp_type() const { return sdp_type_; }
-@@ -249,8 +245,15 @@ class SessionDescriptionInternal {
- SessionDescription* description() { return description_.get(); }
- size_t mediasection_count() const;
-
-+ protected:
-+ // This method is necessarily `protected`, and not private, while
-+ // the SessionDescriptionInterface implementation is being consolidated
-+ // into a single class.
-+ const SequenceChecker* sequence_checker() const { return &sequence_checker_; }
-
- private:
-+ RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_{
-+ SequenceChecker::kDetached};
- const SdpType sdp_type_;
- const std::string id_;
- const std::string version_;
-@@ -353,12 +356,6 @@ class RTC_EXPORT SessionDescriptionInterface
- sink.Append("--- END SDP ---\n");
- }
-
-- // Resets the internal sequence_checker_ to not be attached to a particular
-- // thread. Used when transfering object ownership between threads. Must be
-- // called by the thread that currently owns the object before transferring the
-- // ownership.
-- void RelinquishThreadOwnership();
--
- protected:
- explicit SessionDescriptionInterface(
- SdpType type,
-@@ -367,19 +364,11 @@ class RTC_EXPORT SessionDescriptionInterface
- absl::string_view version,
- std::vector<IceCandidateCollection> candidates = {});
-
-- protected:
-- // This method is necessarily `protected`, and not private, while
-- // the SessionDescriptionInterface implementation is being consolidated
-- // into a single class.
-- const SequenceChecker* sequence_checker() const { return &sequence_checker_; }
--
- private:
- bool IsValidMLineIndex(int index) const;
- bool GetMediasectionIndex(const IceCandidate* candidate, size_t* index) const;
- int GetMediasectionIndex(absl::string_view mid) const;
-
-- RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_{
-- SequenceChecker::kDetached};
- std::vector<IceCandidateCollection> candidate_collection_
- RTC_GUARDED_BY(sequence_checker());
- };
-diff --git a/api/jsep_ice_candidate.cc b/api/jsep_ice_candidate.cc
-index 9cc8b93b23..ce0304f599 100644
---- a/api/jsep_ice_candidate.cc
-+++ b/api/jsep_ice_candidate.cc
-@@ -12,7 +12,6 @@
-
- #include <cstddef>
- #include <cstdint>
--#include <iterator>
- #include <limits>
- #include <memory>
- #include <string>
-@@ -23,7 +22,6 @@
- #include "absl/strings/string_view.h"
- #include "api/candidate.h"
- #include "api/jsep.h"
--#include "api/sequence_checker.h"
- #include "rtc_base/checks.h"
- #include "rtc_base/logging.h"
-
-@@ -53,30 +51,24 @@ IceCandidate::IceCandidate(absl::string_view sdp_mid,
- }
-
- void IceCandidateCollection::add(std::unique_ptr<IceCandidate> candidate) {
-- RTC_DCHECK_RUN_ON(&sequence_checker_);
- candidates_.push_back(std::move(candidate));
- }
-
- void IceCandidateCollection::add(IceCandidate* candidate) {
-- RTC_DCHECK_RUN_ON(&sequence_checker_);
- candidates_.push_back(absl::WrapUnique(candidate));
- }
-
- void IceCandidateCollection::Append(IceCandidateCollection collection) {
-- RTC_DCHECK_RUN_ON(&sequence_checker_);
-- RTC_DCHECK_RUN_ON(&collection.sequence_checker_);
- candidates_.insert(candidates_.end(),
- std::make_move_iterator(collection.candidates_.begin()),
- std::make_move_iterator(collection.candidates_.end()));
- }
-
- const IceCandidate* IceCandidateCollection::at(size_t index) const {
-- RTC_DCHECK_RUN_ON(&sequence_checker_);
- return candidates_[index].get();
+diff --git a/p2p/base/ice_transport_internal.cc b/p2p/base/ice_transport_internal.cc
+index 7843a8b37d..a4b96db00b 100644
+--- a/p2p/base/ice_transport_internal.cc
++++ b/p2p/base/ice_transport_internal.cc
+@@ -236,7 +236,8 @@ RTCError IceConfig::IsValid() const {
}
- bool IceCandidateCollection::HasCandidate(const IceCandidate* candidate) const {
-- RTC_DCHECK_RUN_ON(&sequence_checker_);
- const auto sdp_mid = candidate->sdp_mid(); // avoid string copy per entry.
- return absl::c_any_of(
- candidates_, [&](const std::unique_ptr<IceCandidate>& entry) {
-@@ -92,8 +84,7 @@ bool IceCandidateCollection::HasCandidate(const IceCandidate* candidate) const {
- });
+ IceTransportInternal::IceTransportInternal()
+- : role_conflict_trampoline_(this),
++ : candidate_gathered_trampoline_(this),
++ role_conflict_trampoline_(this),
+ ice_transport_state_changed_trampoline_(this),
+ destroyed_trampoline_(this) {}
+
+@@ -265,7 +266,7 @@ void IceTransportInternal::RemoveGatheringStateCallback(
+ void IceTransportInternal::SubscribeCandidateGathered(
+ absl::AnyInvocable<void(IceTransportInternal*, const Candidate&)>
+ callback) {
+- candidate_gathered_callbacks_.AddReceiver(std::move(callback));
++ candidate_gathered_trampoline_.Subscribe(std::move(callback));
}
--size_t IceCandidateCollection::remove(const IceCandidate* candidate) {
-- RTC_DCHECK_RUN_ON(&sequence_checker_);
-+size_t JsepCandidateCollection::remove(const IceCandidate* candidate) {
- RTC_DCHECK(candidate);
- auto iter =
- absl::c_find_if(candidates_, [&](const std::unique_ptr<IceCandidate>& c) {
-@@ -106,8 +97,4 @@ size_t IceCandidateCollection::remove(const IceCandidate* candidate) {
- return 0u;
- }
-
--void IceCandidateCollection::RelinquishThreadOwnership() {
-- sequence_checker_.Detach();
--}
--
- } // namespace webrtc
-diff --git a/api/sequence_checker.h b/api/sequence_checker.h
-index d05bb2da5e..0d2d83806a 100644
---- a/api/sequence_checker.h
-+++ b/api/sequence_checker.h
-@@ -10,8 +10,6 @@
- #ifndef API_SEQUENCE_CHECKER_H_
- #define API_SEQUENCE_CHECKER_H_
-
--#include <utility>
--
- #include "api/task_queue/task_queue_base.h"
- #include "rtc_base/checks.h"
- #include "rtc_base/synchronization/sequence_checker_internal.h"
-@@ -74,53 +72,6 @@ class RTC_LOCKABLE SequenceChecker
- void Detach() { Impl::Detach(); }
- };
-
--// A variant of SequenceChecker where moving and copying is allowed,
--// and will automatically detach from the current thread.
--// This allows a SequenceChecker to be used in objects that are used
--// with standard classes such as std::vector.
--//
--// The behavior of AutoDetachingSequenceChecker is:
--// - When created on its own, it is detached.
--// - When created using the copy constructor, the new object is attached
--// to the same thread as the original (which may be different from
--// the thread that invokes the copy operator).
--// - When copied using the copy operator, the new object is attached
--// to the same thread as the original (which may be different from
--// the thread that invokes the copy operator).
--// - When created using the move constructor, it is detached.
--// - When moved using the move operator, both the original object and
--// the moved-into object will be detached.
--
--class RTC_LOCKABLE AutoDetachingSequenceChecker
--#if RTC_DCHECK_IS_ON
-- : public webrtc_sequence_checker_internal::
-- AutoDetachingSequenceCheckerImpl {
-- using Impl =
-- webrtc_sequence_checker_internal::AutoDetachingSequenceCheckerImpl;
--#else
-- : public webrtc_sequence_checker_internal::
-- AutoDetachingSequenceCheckerDoNothing {
-- using Impl =
-- webrtc_sequence_checker_internal::AutoDetachingSequenceCheckerDoNothing;
--#endif
-- public:
-- AutoDetachingSequenceChecker() : Impl() {}
-- AutoDetachingSequenceChecker(const AutoDetachingSequenceChecker& o)
-- : Impl(o) {}
-- AutoDetachingSequenceChecker& operator=(
-- const AutoDetachingSequenceChecker& o) {
-- Impl::operator=(o);
-- return *this;
-- }
--
-- AutoDetachingSequenceChecker(AutoDetachingSequenceChecker&& o)
-- : Impl(std::move(o)) {}
-- AutoDetachingSequenceChecker& operator=(AutoDetachingSequenceChecker&& o) {
-- Impl::operator=(std::move(o));
-- return *this;
-- }
--};
--
- } // namespace webrtc
-
- // RTC_RUN_ON/RTC_GUARDED_BY/RTC_DCHECK_RUN_ON macros allows to annotate
-diff --git a/api/sequence_checker_unittest.cc b/api/sequence_checker_unittest.cc
-index 77ea3cf145..b6e432c2d3 100644
---- a/api/sequence_checker_unittest.cc
-+++ b/api/sequence_checker_unittest.cc
-@@ -12,7 +12,6 @@
-
- #include <functional>
- #include <memory>
--#include <utility>
-
- #include "absl/functional/any_invocable.h"
- #include "api/function_view.h"
-@@ -26,7 +25,6 @@
- #include "test/gmock.h"
- #include "test/gtest.h"
-
--using testing::Eq;
- using testing::HasSubstr;
-
- namespace webrtc {
-@@ -234,121 +232,4 @@ TEST(SequenceCheckerTest, TestAnnotationsOnWrongQueueRelease) {
- }
- #endif
- #endif // GTEST_HAS_DEATH_TEST
--
--// This class is a helper for verifying that AutoDetachingSequenceChecker
--// can be made a member of a class with default copy and move operations.
--class MovableObject {
-- public:
-- MovableObject() = default;
-- // Copy operators
-- MovableObject(const MovableObject& o) = default;
-- MovableObject& operator=(const MovableObject& o) = default;
-- // Move operators
-- MovableObject(MovableObject&& o) = default;
-- MovableObject& operator=(MovableObject&& o) = default;
--
-- int any_member RTC_GUARDED_BY(sequence_checker_) = 4711;
-- AutoDetachingSequenceChecker sequence_checker_;
--};
--
--TEST(AutoDetachingSequenceCheckerTest, CanDeclareMovableObject) {
-- MovableObject foo;
-- RTC_DCHECK_RUN_ON(&foo.sequence_checker_);
-- EXPECT_THAT(foo.any_member, Eq(4711));
--}
--
--TEST(AutoDetachingSequenceCheckerTest, CanCopyMovableObject) {
-- MovableObject foo;
-- RTC_DCHECK_RUN_ON(&foo.sequence_checker_);
-- foo.any_member = 12;
-- MovableObject bar = foo;
-- RTC_DCHECK_RUN_ON(&bar.sequence_checker_);
-- EXPECT_THAT(bar.any_member, Eq(12));
--}
--
--#if RTC_DCHECK_IS_ON
--// The tests below use the helper functions IsAttachedForTesting and
--// HasSameAttachmentForTesting, which are only present on the
--// AutoDetachingSequenceChecker when compiled with DCHECK on.
--TEST(AutoDetachingSequenceCheckerTest, InitialStateIsDetached) {
-- AutoDetachingSequenceChecker foo;
-- EXPECT_FALSE(foo.IsAttachedForTesting());
--}
--
--TEST(AutoDetachingSequenceCheckerTest, CopyConstructorKeepsAttachment) {
-- AutoDetachingSequenceChecker foo;
-- EXPECT_FALSE(foo.IsAttachedForTesting());
-- AutoDetachingSequenceChecker bar(foo);
-- EXPECT_FALSE(bar.IsAttachedForTesting());
-- RTC_DCHECK_RUN_ON(&foo);
-- EXPECT_TRUE(foo.IsAttachedForTesting());
-- AutoDetachingSequenceChecker baz(foo);
-- EXPECT_TRUE(baz.IsAttachedForTesting());
-- EXPECT_TRUE(baz.HasSameAttachmentForTesting(foo));
--}
--
--TEST(AutoDetachingSequenceCheckerTest, MoveDetachesFromCurrentThread) {
-- TaskQueueForTest queue;
-- AutoDetachingSequenceChecker foo;
-- EXPECT_FALSE(foo.IsAttachedForTesting());
-- RTC_DCHECK_RUN_ON(&foo);
-- EXPECT_TRUE(foo.IsAttachedForTesting());
-- AutoDetachingSequenceChecker bar = std::move(foo);
-- EXPECT_FALSE(bar.IsAttachedForTesting());
-- EXPECT_FALSE(foo.IsAttachedForTesting());
--}
--
--TEST(AutoDetachingSequenceCheckerTest, MoveDetachesFromCurrentThreadInCapture) {
-- TaskQueueForTest queue;
-- AutoDetachingSequenceChecker foo;
-- RTC_DCHECK_RUN_ON(&foo);
-- queue.SendTask([bar = std::move(foo)]() {
-- EXPECT_FALSE(bar.IsAttachedForTesting());
-- RTC_DCHECK_RUN_ON(&bar);
-- EXPECT_TRUE(bar.IsAttachedForTesting());
-- });
-- EXPECT_FALSE(foo.IsAttachedForTesting());
--}
--
--TEST(AutoDetachingSequenceCheckerTest, CopyOperatorKeepsOldThread) {
-- TaskQueueForTest queue;
-- AutoDetachingSequenceChecker object1;
-- AutoDetachingSequenceChecker object2;
-- // Attach object1 to current thread.
-- RTC_DCHECK_RUN_ON(&object1);
-- queue.SendTask([&]() {
-- // Attach object2 to this task queue
-- RTC_DCHECK_RUN_ON(&object2);
-- // Overwriting will attach object2 to object1's bound thread.
-- object2 = object1;
-- });
-- EXPECT_TRUE(object1.HasSameAttachmentForTesting(object2));
--}
--#endif // RTC_DCHECK_IS_ON
--
--#if GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) && RTC_DCHECK_IS_ON
--TEST(AutoDetachingSequenceCheckerDeathTest, NotMovingCrashes) {
-- TaskQueueForTest queue;
-- AutoDetachingSequenceChecker unmoved_object;
-- // Attach `unmoved_object` to the queue, not the main thread
-- queue.SendTask([&unmoved_object]() { RTC_DCHECK_RUN_ON(&unmoved_object); });
-- ASSERT_DEATH({RTC_DCHECK_RUN_ON(&unmoved_object)}, "IsCurrent");
--}
--
--TEST(AutoDetachingSequenceCheckerDeathTest,
-- CopyOperatorKeepsOldThreadAndCrashes) {
-- TaskQueueForTest queue;
-- AutoDetachingSequenceChecker object1;
-- AutoDetachingSequenceChecker object2;
-- // Attach object2 to current thread.
-- RTC_DCHECK_RUN_ON(&object2);
-- queue.SendTask([&]() {
-- RTC_DCHECK_RUN_ON(&object1);
-- object2 = object1; // This assignment overwrites the attachment.
-- });
-- // object2 is now attached to the task queue.
-- ASSERT_DEATH({RTC_DCHECK_RUN_ON(&object2)}, "IsCurrent");
--}
--
--#endif
- } // namespace webrtc
-diff --git a/pc/BUILD.gn b/pc/BUILD.gn
-index 949b8ff106..139f78efe7 100644
---- a/pc/BUILD.gn
-+++ b/pc/BUILD.gn
-@@ -1434,7 +1434,6 @@ rtc_library("webrtc_sdp") {
- "../api:rtc_error",
- "../api:rtp_parameters",
- "../api:rtp_transceiver_direction",
-- "../api:sequence_checker",
- "../api/audio:audio_frame_api",
- "../media:codec",
- "../media:media_constants",
-diff --git a/pc/jsep_ice_candidate.cc b/pc/jsep_ice_candidate.cc
-index e236eb52ed..710587a3ff 100644
---- a/pc/jsep_ice_candidate.cc
-+++ b/pc/jsep_ice_candidate.cc
-@@ -10,6 +10,7 @@
-
- #include "api/jsep_ice_candidate.h"
-
-+#include <cstddef>
- #include <memory>
- #include <string>
-
-@@ -17,7 +18,6 @@
- #include "absl/strings/string_view.h"
- #include "api/candidate.h"
- #include "api/jsep.h"
--#include "api/sequence_checker.h"
- #include "pc/webrtc_sdp.h"
-
- // This file contains IceCandidate-related functions that are not
-@@ -60,8 +60,6 @@ std::unique_ptr<IceCandidate> IceCandidate::Create(absl::string_view mid,
-
- IceCandidateCollection IceCandidateCollection::Clone() const {
- IceCandidateCollection new_collection;
-- RTC_DCHECK_RUN_ON(&sequence_checker_);
-- RTC_DCHECK_RUN_ON(&new_collection.sequence_checker_);
- new_collection.candidates_.reserve(candidates_.size());
- for (const auto& candidate : candidates_) {
- new_collection.candidates_.push_back(std::make_unique<IceCandidate>(
-diff --git a/pc/jsep_session_description.cc b/pc/jsep_session_description.cc
-index fbd8bfacc0..d1f1dd006b 100644
---- a/pc/jsep_session_description.cc
-+++ b/pc/jsep_session_description.cc
-@@ -14,6 +14,7 @@
- #include <cstddef>
- #include <iterator>
- #include <memory>
-+#include <optional>
- #include <string>
- #include <utility>
- #include <vector>
-@@ -22,7 +23,6 @@
- #include "absl/strings/string_view.h"
- #include "api/candidate.h"
- #include "api/jsep.h"
--#include "api/sequence_checker.h"
- #include "p2p/base/p2p_constants.h"
- #include "p2p/base/transport_description.h"
- #include "p2p/base/transport_info.h"
-@@ -31,6 +31,7 @@
- #include "pc/webrtc_sdp.h"
- #include "rtc_base/checks.h"
- #include "rtc_base/ip_address.h"
-+#include "rtc_base/logging.h"
- #include "rtc_base/net_helper.h"
- #include "rtc_base/net_helpers.h"
- #include "rtc_base/socket_address.h"
-@@ -180,7 +181,7 @@ size_t SessionDescriptionInternal::mediasection_count() const {
- return description_ ? description_->contents().size() : 0u;
- }
-
--void SessionDescriptionInterface::RelinquishThreadOwnership() {
-+void SessionDescriptionInternal::RelinquishThreadOwnership() {
- // Ideally we should require that the method can only be called from the
- // thread that the sequence checker is currently attached to. However that's
- // not compatible with some cases outside of webrtc where initializations
-@@ -188,13 +189,6 @@ void SessionDescriptionInterface::RelinquishThreadOwnership() {
- // signaling) where a call is made into webrtc. At that point we'd hit a
- // dcheck like this in webrtc: RTC_DCHECK_RUN_ON(&sequence_checker_);
- sequence_checker_.Detach();
-- // Tie the checker to the current thread, which permits iterating
-- // `candidate_collection_`
-- RTC_DCHECK_RUN_ON(sequence_checker());
-- for (IceCandidateCollection& collection : candidate_collection_) {
-- collection.RelinquishThreadOwnership();
-- }
-- sequence_checker_.Detach(); // Unties the checker from the current thread.
- }
-
- SessionDescriptionInterface::SessionDescriptionInterface(
-@@ -341,5 +335,4 @@ int SessionDescriptionInterface::GetMediasectionIndex(
- [&](const auto& content) { return mid == content.mid(); });
- return it == contents.end() ? -1 : std::distance(contents.begin(), it);
- }
--
- } // namespace webrtc
-diff --git a/rtc_base/synchronization/sequence_checker_internal.cc b/rtc_base/synchronization/sequence_checker_internal.cc
-index a6f9adb53d..3b0a0b123d 100644
---- a/rtc_base/synchronization/sequence_checker_internal.cc
-+++ b/rtc_base/synchronization/sequence_checker_internal.cc
-@@ -54,14 +54,6 @@ void SequenceCheckerImpl::Detach() {
- }
-
- #if RTC_DCHECK_IS_ON
--void SequenceCheckerImpl::AssignStateFrom(const SequenceCheckerImpl& o) {
-- MutexLock this_lock(&lock_);
-- MutexLock that_lock(&o.lock_);
-- attached_ = o.attached_;
-- valid_thread_ = o.valid_thread_;
-- valid_queue_ = o.valid_queue_;
--}
--
- std::string SequenceCheckerImpl::ExpectationToString() const {
- const TaskQueueBase* const current_queue = TaskQueueBase::Current();
- const PlatformThreadRef current_thread = CurrentThreadRef();
-@@ -91,26 +83,6 @@ std::string SequenceCheckerImpl::ExpectationToString() const {
-
- return message.Release();
- }
--
--bool SequenceCheckerImpl::IsAttachedForTesting() const {
-- MutexLock scoped_lock(&lock_);
-- return attached_;
--}
--
--bool SequenceCheckerImpl::HasSameAttachmentForTesting(
-- const SequenceCheckerImpl& o) const {
-- MutexLock scoped_lock_1(&lock_);
-- MutexLock scoped_lock_2(&o.lock_);
-- if (attached_ != o.attached_) {
-- return false;
-- }
-- if (attached_ &&
-- (valid_queue_ != o.valid_queue_ || valid_thread_ != o.valid_thread_)) {
-- return false;
-- }
-- return true;
--}
--
- #endif // RTC_DCHECK_IS_ON
-
- } // namespace webrtc_sequence_checker_internal
-diff --git a/rtc_base/synchronization/sequence_checker_internal.h b/rtc_base/synchronization/sequence_checker_internal.h
-index 8094e4445b..19370706ff 100644
---- a/rtc_base/synchronization/sequence_checker_internal.h
-+++ b/rtc_base/synchronization/sequence_checker_internal.h
-@@ -41,24 +41,11 @@ class RTC_EXPORT SequenceCheckerImpl {
- // used exclusively on another thread.
- void Detach();
-
-- // Makes the task queue or thread that is checked for in `this`.IsCurrent()
-- // be the same as in `o`.IsCurrent().
-- void AssignStateFrom(const SequenceCheckerImpl& o);
--
- // Returns a string that is formatted to match with the error string printed
- // by RTC_CHECK() when a condition is not met.
- // This is used in conjunction with the RTC_DCHECK_RUN_ON() macro.
- std::string ExpectationToString() const;
+ void IceTransportInternal::SubscribeRoleConflict(
+diff --git a/p2p/base/ice_transport_internal.h b/p2p/base/ice_transport_internal.h
+index 9f6722c8ad..c83a7d70d7 100644
+--- a/p2p/base/ice_transport_internal.h
++++ b/p2p/base/ice_transport_internal.h
+@@ -352,9 +352,11 @@ class RTC_EXPORT IceTransportInternal : public PacketTransportInternal {
+ void RemoveGatheringStateCallback(const void* removal_tag);
+
+ // Handles sending and receiving of candidates.
++ sigslot::signal2<IceTransportInternal*, const Candidate&>
++ SignalCandidateGathered;
+ void NotifyCandidateGathered(IceTransportInternal* transport,
+ const Candidate& candidate) {
+- candidate_gathered_callbacks_.Send(transport, candidate);
++ SignalCandidateGathered(transport, candidate);
+ }
+ void SubscribeCandidateGathered(
+ absl::AnyInvocable<void(IceTransportInternal*, const Candidate&)>
+@@ -462,8 +464,9 @@ class RTC_EXPORT IceTransportInternal : public PacketTransportInternal {
+ candidate_pair_change_callback_;
-- // Returns whether or not the checker is attached.
-- // Exists only in the SequenceChecker that is used when RTC_DCHECK_IS_ON
-- // is set, so tests using it must check that flag.
-- bool IsAttachedForTesting() const;
--
-- // Returns true if the two sequence checkers are either both detached
-- // or attached to the same thread.
-- bool HasSameAttachmentForTesting(const SequenceCheckerImpl& o) const;
--
private:
- mutable Mutex lock_;
- // These are mutable so that IsCurrent can set them.
-@@ -98,55 +85,6 @@ ExpectationToString(const ThreadLikeObject*) {
- return std::string();
- }
-
--class AutoDetachingSequenceCheckerImpl : public SequenceCheckerImpl {
-- public:
-- enum InitialState : bool { kDetached = false, kAttached = true };
--
-- AutoDetachingSequenceCheckerImpl() : SequenceCheckerImpl(kDetached) {}
--
-- AutoDetachingSequenceCheckerImpl(const AutoDetachingSequenceCheckerImpl& o)
-- : SequenceCheckerImpl(kDetached) {
-- AssignStateFrom(o);
-- }
--
-- AutoDetachingSequenceCheckerImpl& operator=(
-- const AutoDetachingSequenceCheckerImpl& o) {
-- AssignStateFrom(o);
-- return *this;
-- }
--
-- AutoDetachingSequenceCheckerImpl(AutoDetachingSequenceCheckerImpl&& o)
-- : SequenceCheckerImpl(kDetached) {
-- o.Detach();
-- }
--
-- AutoDetachingSequenceCheckerImpl& operator=(
-- AutoDetachingSequenceCheckerImpl&& o) {
-- Detach();
-- o.Detach();
-- return *this;
-- }
--};
--
--class AutoDetachingSequenceCheckerDoNothing {
-- public:
-- AutoDetachingSequenceCheckerDoNothing() {}
-- AutoDetachingSequenceCheckerDoNothing(
-- const AutoDetachingSequenceCheckerDoNothing& o) {}
-- AutoDetachingSequenceCheckerDoNothing& operator=(
-- const AutoDetachingSequenceCheckerDoNothing& o) {
-- return *this;
-- }
-- AutoDetachingSequenceCheckerDoNothing(
-- AutoDetachingSequenceCheckerDoNothing&& o) {}
-- AutoDetachingSequenceCheckerDoNothing& operator=(
-- AutoDetachingSequenceCheckerDoNothing&& o) {
-- return *this;
-- }
-- bool IsCurrent() const { return true; }
-- void Detach() {}
--};
--
- } // namespace webrtc_sequence_checker_internal
- } // namespace webrtc
-
+- CallbackList<IceTransportInternal*, const Candidate&>
+- candidate_gathered_callbacks_;
++ SignalTrampoline<IceTransportInternal,
++ &IceTransportInternal::SignalCandidateGathered>
++ candidate_gathered_trampoline_;
+ SignalTrampoline<IceTransportInternal,
+ &IceTransportInternal::SignalRoleConflict>
+ role_conflict_trampoline_;
+diff --git a/rtc_base/sigslot_trampoline.h b/rtc_base/sigslot_trampoline.h
+index a399e4177f..590e73d97b 100644
+--- a/rtc_base/sigslot_trampoline.h
++++ b/rtc_base/sigslot_trampoline.h
+@@ -51,18 +51,6 @@ namespace webrtc {
+ // my_class_object.SubscibeMyNamedEvent(
+ // SafeInvocable(target.safety_flag_.flag(),
+ // [target] { target.function(); }
+-// WHEN REMOVING THE SIGNAL
+-// Make a CL that will:
+-// - Delete the SignalMyNamedEvent signal
+-// - Change my_named_event_trampoline_ to my_named_event_callbacks,
+-// of type CallbackList<function arguments>
+-// - Change SubscribeMyNamedEvent to call my_named_event_callbacks.AddReceiver
+-// - Change NotifyMyNamedEvent to call my_named_event_callbacks_.Send
+-// - If UnsubscribeMyNamedEvent exists, change that also.
+-// - Delete the initialization of my_named_event_trampoline_ from the
+-// relevant constructor.
+-// Sending this through the bots will flush out remaining references to
+-// SignalMyNamedEvent.
+ namespace internal {
+ template <typename MemberPtrT>
+ struct member_pointer_traits;
diff --git a/third_party/libwebrtc/moz-patch-stack/p0002.patch b/third_party/libwebrtc/moz-patch-stack/p0002.patch
@@ -1,118 +1,331 @@
-From: Daniel Baker <dbaker@mozilla.com>
-Date: Mon, 1 Dec 2025 19:31:22 -0700
-Subject: (tmp-cherry-pick) [M142] Revert "Add instructions for removing a
- Trampoline-wrapped Signal" (29d6eabaf0)
+From: Palak Agarwal <agpalak@google.com>
+Date: Tue, 7 Oct 2025 13:45:52 +0200
+Subject: (cherry-pick-branch-heads/7390) [M141] Add logging while creating
+ {Window|Screen}Capturer
-This reverts commit bb6b3aab159ebcd825526cf831f54170ccb2584d.
+(cherry picked from commit 6908505ae0eba5d530ad0bb4b37d4654a4f36c95)
-Reason for revert: Need to fix downstream Chromium issues.
-
-Original change's description:
-> Add instructions for removing a Trampoline-wrapped Signal
->
-> Also apply the instructions to one Signal.
->
-> Bug: webrtc:42222066
-> Change-Id: I63409d968d27a843b0ac7c61a122a1b685cb7a6f
-> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/408883
-> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
-> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
-> Cr-Commit-Position: refs/heads/main@{#45624}
-
-(cherry picked from commit 716c8eb942a74ad641bbace8c1db521b4857c636)
-
-Bug: webrtc:42222066, chromium:449225599, chromium:450516559
-No-IWYU: Revert
-Change-Id: I7fdf1694664b11ffcfd91916f1e98ef88254059d
-Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/413923
-Auto-Submit: Harald Alvestrand <hta@webrtc.org>
-Commit-Queue: Harald Alvestrand <hta@webrtc.org>
-Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
-Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
-Cr-Original-Commit-Position: refs/heads/main@{#45840}
-Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/415743
-Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
+Fixed: chromium:450184498
+Bug: chromium:448881311
+Change-Id: I0f043f58bf831e6822451cac99a8972a054ffdf7
+Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/414800
+Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
-Cr-Commit-Position: refs/branch-heads/7444@{#2}
-Cr-Branched-From: f70dc714a073397356f6ed866481da73f90f0b96-refs/heads/main@{#45766}
+Commit-Queue: Palak Agarwal <agpalak@google.com>
+Cr-Original-Commit-Position: refs/heads/main@{#45856}
+Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/415420
+Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
+Cr-Commit-Position: refs/branch-heads/7390@{#3}
+Cr-Branched-From: 2f553bf8d573c90176d51559b76dfc836996c8f5-refs/heads/main@{#45520}
---
- p2p/base/ice_transport_internal.cc | 5 +++--
- p2p/base/ice_transport_internal.h | 9 ++++++---
- rtc_base/sigslot_trampoline.h | 12 ------------
- 3 files changed, 9 insertions(+), 17 deletions(-)
+ modules/desktop_capture/desktop_capturer.cc | 15 +++++++++++++++
+ .../linux/x11/screen_capturer_x11.cc | 6 ++++++
+ .../linux/x11/window_capturer_x11.cc | 4 ++++
+ modules/desktop_capture/screen_capturer_darwin.mm | 7 +++++++
+ .../desktop_capture/screen_capturer_fuchsia.cc | 3 +++
+ modules/desktop_capture/screen_capturer_linux.cc | 4 ++++
+ modules/desktop_capture/screen_capturer_null.cc | 4 ++++
+ modules/desktop_capture/screen_capturer_win.cc | 6 ++++++
+ modules/desktop_capture/window_capturer_linux.cc | 4 ++++
+ modules/desktop_capture/window_capturer_mac.mm | 2 ++
+ modules/desktop_capture/window_capturer_null.cc | 3 +++
+ modules/desktop_capture/window_capturer_win.cc | 7 +++++++
+ 12 files changed, 65 insertions(+)
-diff --git a/p2p/base/ice_transport_internal.cc b/p2p/base/ice_transport_internal.cc
-index 7843a8b37d..a4b96db00b 100644
---- a/p2p/base/ice_transport_internal.cc
-+++ b/p2p/base/ice_transport_internal.cc
-@@ -236,7 +236,8 @@ RTCError IceConfig::IsValid() const {
+diff --git a/modules/desktop_capture/desktop_capturer.cc b/modules/desktop_capture/desktop_capturer.cc
+index ae9aba26ee..bf63f73178 100644
+--- a/modules/desktop_capture/desktop_capturer.cc
++++ b/modules/desktop_capture/desktop_capturer.cc
+@@ -21,6 +21,7 @@
+ #include "modules/desktop_capture/desktop_capturer_differ_wrapper.h"
+ #include "modules/desktop_capture/desktop_geometry.h"
+ #include "modules/desktop_capture/shared_memory.h"
++#include "rtc_base/logging.h"
+ #include "system_wrappers/include/metrics.h"
+
+ #if defined(WEBRTC_WIN)
+@@ -81,18 +82,26 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateWindowCapturer(
+ #if defined(RTC_ENABLE_WIN_WGC)
+ if (options.allow_wgc_window_capturer() &&
+ IsWgcSupported(CaptureType::kWindow)) {
++ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateWindowCapturer "
++ "creates DesktopCapturer of type WgcCapturerWin";
+ return WgcCapturerWin::CreateRawWindowCapturer(options);
+ }
+ #endif // defined(RTC_ENABLE_WIN_WGC)
+
+ #if defined(WEBRTC_WIN)
+ if (options.allow_cropping_window_capturer()) {
++ RTC_LOG(LS_INFO)
++ << "video capture: DesktopCapturer::CreateWindowCapturer "
++ "creates DesktopCapturer of type CroppingWindowCapturerWin";
+ return CroppingWindowCapturer::CreateCapturer(options);
+ }
+ #endif // defined(WEBRTC_WIN)
+
+ std::unique_ptr<DesktopCapturer> capturer = CreateRawWindowCapturer(options);
+ if (capturer && options.detect_updated_region()) {
++ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateWindowCapturer "
++ "creates DesktopCapturer of type "
++ "DesktopCapturerDifferWrapper over a base capturer";
+ capturer.reset(new DesktopCapturerDifferWrapper(std::move(capturer)));
+ }
+
+@@ -105,12 +114,18 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateScreenCapturer(
+ #if defined(RTC_ENABLE_WIN_WGC)
+ if (options.allow_wgc_screen_capturer() &&
+ IsWgcSupported(CaptureType::kScreen)) {
++ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateScreenCapturer "
++ "creates DesktopCapturer of type WgcCapturerWin";
+ return WgcCapturerWin::CreateRawScreenCapturer(options);
+ }
+ #endif // defined(RTC_ENABLE_WIN_WGC)
+
+ std::unique_ptr<DesktopCapturer> capturer = CreateRawScreenCapturer(options);
+ if (capturer && options.detect_updated_region()) {
++ RTC_LOG(LS_INFO)
++ << "video capture: DesktopCapturer::CreateScreenCapturer creates "
++ "DesktopCapturer of type DesktopCapturerDifferWrapper over a base "
++ "capturer";
+ capturer.reset(new DesktopCapturerDifferWrapper(std::move(capturer)));
+ }
+
+diff --git a/modules/desktop_capture/linux/x11/screen_capturer_x11.cc b/modules/desktop_capture/linux/x11/screen_capturer_x11.cc
+index 90dd797cb3..f10dcabc7e 100644
+--- a/modules/desktop_capture/linux/x11/screen_capturer_x11.cc
++++ b/modules/desktop_capture/linux/x11/screen_capturer_x11.cc
+@@ -511,8 +511,14 @@ std::unique_ptr<DesktopCapturer> ScreenCapturerX11::CreateRawScreenCapturer(
+ if (!options.x_display())
+ return nullptr;
+
++ RTC_LOG(LS_INFO)
++ << "video capture: ScreenCapturerX11::CreateRawScreenCapturer creates "
++ "DesktopCapturer of type ScreenCapturerX11";
+ std::unique_ptr<ScreenCapturerX11> capturer(new ScreenCapturerX11());
+ if (!capturer->Init(options)) {
++ RTC_LOG(LS_INFO)
++ << "video capture: ScreenCapturerX11::CreateRawScreenCapturer "
++ "DesktopCapturer is null because it can not be initiated";
+ return nullptr;
+ }
+
+diff --git a/modules/desktop_capture/linux/x11/window_capturer_x11.cc b/modules/desktop_capture/linux/x11/window_capturer_x11.cc
+index 8e592ff2d9..9505205b76 100644
+--- a/modules/desktop_capture/linux/x11/window_capturer_x11.cc
++++ b/modules/desktop_capture/linux/x11/window_capturer_x11.cc
+@@ -247,6 +247,10 @@ std::unique_ptr<DesktopCapturer> WindowCapturerX11::CreateRawWindowCapturer(
+ const DesktopCaptureOptions& options) {
+ if (!options.x_display())
+ return nullptr;
++
++ RTC_LOG(LS_INFO)
++ << "video capture: WindowCapturerX11::CreateRawWindowCapturer creates "
++ "DesktopCapturer of type WindowCapturerX11";
+ return std::unique_ptr<DesktopCapturer>(new WindowCapturerX11(options));
}
- IceTransportInternal::IceTransportInternal()
-- : role_conflict_trampoline_(this),
-+ : candidate_gathered_trampoline_(this),
-+ role_conflict_trampoline_(this),
- ice_transport_state_changed_trampoline_(this),
- destroyed_trampoline_(this) {}
-
-@@ -265,7 +266,7 @@ void IceTransportInternal::RemoveGatheringStateCallback(
- void IceTransportInternal::SubscribeCandidateGathered(
- absl::AnyInvocable<void(IceTransportInternal*, const Candidate&)>
- callback) {
-- candidate_gathered_callbacks_.AddReceiver(std::move(callback));
-+ candidate_gathered_trampoline_.Subscribe(std::move(callback));
+diff --git a/modules/desktop_capture/screen_capturer_darwin.mm b/modules/desktop_capture/screen_capturer_darwin.mm
+index 95a877c45d..3f14ddfe58 100644
+--- a/modules/desktop_capture/screen_capturer_darwin.mm
++++ b/modules/desktop_capture/screen_capturer_darwin.mm
+@@ -12,6 +12,7 @@
+
+ #include "modules/desktop_capture/mac/screen_capturer_mac.h"
+ #include "modules/desktop_capture/mac/screen_capturer_sck.h"
++#include "rtc_base/logging.h"
+
+ namespace webrtc {
+
+@@ -27,10 +28,16 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
+ std::unique_ptr<DesktopCapturer> sck_capturer =
+ CreateScreenCapturerSck(options);
+ if (sck_capturer) {
++ RTC_LOG(LS_INFO)
++ << "video capture: DesktopCapturer::CreateRawScreenCapturer creates "
++ "DesktopCapturer of type ScreenCapturerSck";
+ return sck_capturer;
+ }
+ }
+
++ RTC_LOG(LS_INFO)
++ << "video capture: DesktopCapturer::CreateRawScreenCapturer creates "
++ "DesktopCapturer of type ScreenCapturerMac";
+ auto capturer =
+ std::make_unique<ScreenCapturerMac>(options.configuration_monitor(),
+ options.detect_updated_region(),
+diff --git a/modules/desktop_capture/screen_capturer_fuchsia.cc b/modules/desktop_capture/screen_capturer_fuchsia.cc
+index c3f51ef0fc..2a6c5e753d 100644
+--- a/modules/desktop_capture/screen_capturer_fuchsia.cc
++++ b/modules/desktop_capture/screen_capturer_fuchsia.cc
+@@ -56,6 +56,9 @@ size_t RoundUpToMultiple(size_t value, size_t multiple) {
+
+ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
+ const DesktopCaptureOptions& options) {
++ RTC_LOG(LS_INFO)
++ << "video capture: DesktopCapturer::CreateRawScreenCapturer creates "
++ "DesktopCapturer of type ScreenCapturerFuchsia";
+ std::unique_ptr<ScreenCapturerFuchsia> capturer(new ScreenCapturerFuchsia());
+ return capturer;
+ }
+diff --git a/modules/desktop_capture/screen_capturer_linux.cc b/modules/desktop_capture/screen_capturer_linux.cc
+index 94726750c5..f25e08fb59 100644
+--- a/modules/desktop_capture/screen_capturer_linux.cc
++++ b/modules/desktop_capture/screen_capturer_linux.cc
+@@ -13,6 +13,7 @@
+ #include "modules/desktop_capture/desktop_capture_options.h"
+ #include "modules/desktop_capture/desktop_capture_types.h"
+ #include "modules/desktop_capture/desktop_capturer.h"
++#include "rtc_base/logging.h"
+
+ #if defined(WEBRTC_USE_PIPEWIRE)
+ #include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h"
+@@ -29,6 +30,9 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
+ const DesktopCaptureOptions& options) {
+ #if defined(WEBRTC_USE_PIPEWIRE)
+ if (options.allow_pipewire() && BaseCapturerPipeWire::IsSupported()) {
++ RTC_LOG(LS_INFO)
++ << "video capture: DesktopCapturer::CreateRawScreenCapturer creates "
++ "DesktopCapturer of type BaseCapturerPipeWire";
+ return std::make_unique<BaseCapturerPipeWire>(options,
+ CaptureType::kScreen);
+ }
+diff --git a/modules/desktop_capture/screen_capturer_null.cc b/modules/desktop_capture/screen_capturer_null.cc
+index aa6d4991a0..21b2f46c4d 100644
+--- a/modules/desktop_capture/screen_capturer_null.cc
++++ b/modules/desktop_capture/screen_capturer_null.cc
+@@ -11,12 +11,16 @@
+ #include <memory>
+
+ #include "modules/desktop_capture/desktop_capturer.h"
++#include "rtc_base/logging.h"
+
+ namespace webrtc {
+
+ // static
+ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
+ const DesktopCaptureOptions& options) {
++ RTC_LOG(LS_INFO)
++ << "video capture: DesktopCapturer::CreateRawScreenCapturer creates null "
++ "DesktopCapturer";
+ return nullptr;
}
- void IceTransportInternal::SubscribeRoleConflict(
-diff --git a/p2p/base/ice_transport_internal.h b/p2p/base/ice_transport_internal.h
-index 9f6722c8ad..c83a7d70d7 100644
---- a/p2p/base/ice_transport_internal.h
-+++ b/p2p/base/ice_transport_internal.h
-@@ -352,9 +352,11 @@ class RTC_EXPORT IceTransportInternal : public PacketTransportInternal {
- void RemoveGatheringStateCallback(const void* removal_tag);
-
- // Handles sending and receiving of candidates.
-+ sigslot::signal2<IceTransportInternal*, const Candidate&>
-+ SignalCandidateGathered;
- void NotifyCandidateGathered(IceTransportInternal* transport,
- const Candidate& candidate) {
-- candidate_gathered_callbacks_.Send(transport, candidate);
-+ SignalCandidateGathered(transport, candidate);
+diff --git a/modules/desktop_capture/screen_capturer_win.cc b/modules/desktop_capture/screen_capturer_win.cc
+index a5f2052979..6620888f18 100644
+--- a/modules/desktop_capture/screen_capturer_win.cc
++++ b/modules/desktop_capture/screen_capturer_win.cc
+@@ -19,6 +19,7 @@
+ #include "modules/desktop_capture/win/dxgi_duplicator_controller.h"
+ #include "modules/desktop_capture/win/screen_capturer_win_directx.h"
+ #include "modules/desktop_capture/win/screen_capturer_win_gdi.h"
++#include "rtc_base/logging.h"
+
+ namespace webrtc {
+
+@@ -26,6 +27,9 @@ namespace {
+
+ std::unique_ptr<DesktopCapturer> CreateScreenCapturerWinDirectx(
+ const DesktopCaptureOptions& options) {
++ RTC_LOG(LS_INFO)
++ << "video capture: DesktopCapturer::CreateRawScreenCapturer creates "
++ "DesktopCapturer of type ScreenCapturerWinDirectx";
+ std::unique_ptr<DesktopCapturer> capturer(
+ new ScreenCapturerWinDirectx(options));
+ capturer.reset(new BlankDetectorDesktopCapturerWrapper(
+@@ -39,6 +43,8 @@ std::unique_ptr<DesktopCapturer> CreateScreenCapturerWinDirectx(
+ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
+ const DesktopCaptureOptions& options) {
+ // Default capturer if no options are enabled is GDI.
++ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateRawScreenCapturer "
++ "creates DesktopCapturer of type ScreenCapturerWinGdi";
+ std::unique_ptr<DesktopCapturer> capturer(new ScreenCapturerWinGdi(options));
+
+ // If DirectX is enabled use it as main capturer with GDI as fallback.
+diff --git a/modules/desktop_capture/window_capturer_linux.cc b/modules/desktop_capture/window_capturer_linux.cc
+index f621a63e72..87ea3d5721 100644
+--- a/modules/desktop_capture/window_capturer_linux.cc
++++ b/modules/desktop_capture/window_capturer_linux.cc
+@@ -13,6 +13,7 @@
+ #include "modules/desktop_capture/desktop_capture_options.h"
+ #include "modules/desktop_capture/desktop_capture_types.h"
+ #include "modules/desktop_capture/desktop_capturer.h"
++#include "rtc_base/logging.h"
+
+ #if defined(WEBRTC_USE_PIPEWIRE)
+ #include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h"
+@@ -29,6 +30,9 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
+ const DesktopCaptureOptions& options) {
+ #if defined(WEBRTC_USE_PIPEWIRE)
+ if (options.allow_pipewire() && BaseCapturerPipeWire::IsSupported()) {
++ RTC_LOG(LS_INFO)
++ << "video capture: DesktopCapturer::CreateRawWindowCapturer creates "
++ "DesktopCapturer of type BaseCapturerPipeWire";
+ return std::make_unique<BaseCapturerPipeWire>(options,
+ CaptureType::kWindow);
}
- void SubscribeCandidateGathered(
- absl::AnyInvocable<void(IceTransportInternal*, const Candidate&)>
-@@ -462,8 +464,9 @@ class RTC_EXPORT IceTransportInternal : public PacketTransportInternal {
- candidate_pair_change_callback_;
-
- private:
-- CallbackList<IceTransportInternal*, const Candidate&>
-- candidate_gathered_callbacks_;
-+ SignalTrampoline<IceTransportInternal,
-+ &IceTransportInternal::SignalCandidateGathered>
-+ candidate_gathered_trampoline_;
- SignalTrampoline<IceTransportInternal,
- &IceTransportInternal::SignalRoleConflict>
- role_conflict_trampoline_;
-diff --git a/rtc_base/sigslot_trampoline.h b/rtc_base/sigslot_trampoline.h
-index a399e4177f..590e73d97b 100644
---- a/rtc_base/sigslot_trampoline.h
-+++ b/rtc_base/sigslot_trampoline.h
-@@ -51,18 +51,6 @@ namespace webrtc {
- // my_class_object.SubscibeMyNamedEvent(
- // SafeInvocable(target.safety_flag_.flag(),
- // [target] { target.function(); }
--// WHEN REMOVING THE SIGNAL
--// Make a CL that will:
--// - Delete the SignalMyNamedEvent signal
--// - Change my_named_event_trampoline_ to my_named_event_callbacks,
--// of type CallbackList<function arguments>
--// - Change SubscribeMyNamedEvent to call my_named_event_callbacks.AddReceiver
--// - Change NotifyMyNamedEvent to call my_named_event_callbacks_.Send
--// - If UnsubscribeMyNamedEvent exists, change that also.
--// - Delete the initialization of my_named_event_trampoline_ from the
--// relevant constructor.
--// Sending this through the bots will flush out remaining references to
--// SignalMyNamedEvent.
- namespace internal {
- template <typename MemberPtrT>
- struct member_pointer_traits;
+diff --git a/modules/desktop_capture/window_capturer_mac.mm b/modules/desktop_capture/window_capturer_mac.mm
+index a1e6157b87..731090d3fb 100644
+--- a/modules/desktop_capture/window_capturer_mac.mm
++++ b/modules/desktop_capture/window_capturer_mac.mm
+@@ -217,6 +217,8 @@ void WindowCapturerMac::CaptureFrame() {
+ // static
+ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
+ const DesktopCaptureOptions& options) {
++ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateRawWindowCapturer "
++ "creates DesktopCapturer of type WindowCapturerMac";
+ return std::unique_ptr<DesktopCapturer>(new WindowCapturerMac(
+ options.full_screen_window_detector(), options.configuration_monitor()));
+ }
+diff --git a/modules/desktop_capture/window_capturer_null.cc b/modules/desktop_capture/window_capturer_null.cc
+index 2061dc5248..384e186d20 100644
+--- a/modules/desktop_capture/window_capturer_null.cc
++++ b/modules/desktop_capture/window_capturer_null.cc
+@@ -12,6 +12,7 @@
+
+ #include "modules/desktop_capture/desktop_capturer.h"
+ #include "rtc_base/checks.h"
++#include "rtc_base/logging.h"
+
+ namespace webrtc {
+
+@@ -65,6 +66,8 @@ void WindowCapturerNull::CaptureFrame() {
+ // static
+ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
+ const DesktopCaptureOptions& options) {
++ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateRawWindowCapturer "
++ "creates DesktopCapturer of type WindowCapturerNull";
+ return std::unique_ptr<DesktopCapturer>(new WindowCapturerNull());
+ }
+
+diff --git a/modules/desktop_capture/window_capturer_win.cc b/modules/desktop_capture/window_capturer_win.cc
+index 115bc7d9b0..15ed7f5121 100644
+--- a/modules/desktop_capture/window_capturer_win.cc
++++ b/modules/desktop_capture/window_capturer_win.cc
+@@ -15,6 +15,7 @@
+ #include "modules/desktop_capture/desktop_capturer.h"
+ #include "modules/desktop_capture/rgba_color.h"
+ #include "modules/desktop_capture/win/window_capturer_win_gdi.h"
++#include "rtc_base/logging.h"
+
+ #if defined(RTC_ENABLE_WIN_WGC)
+ #include "modules/desktop_capture/blank_detector_desktop_capturer_wrapper.h"
+@@ -28,6 +29,8 @@ namespace webrtc {
+ // static
+ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
+ const DesktopCaptureOptions& options) {
++ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateRawWindowCapturer "
++ "creates DesktopCapturer of type WindowCapturerWinGdi";
+ std::unique_ptr<DesktopCapturer> capturer(
+ WindowCapturerWinGdi::CreateRawWindowCapturer(options));
+ #if defined(RTC_ENABLE_WIN_WGC)
+@@ -36,6 +39,10 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
+ // BlankDectector capturer will send an error when it detects a failed
+ // GDI rendering, then Fallback capturer will try to capture it again with
+ // WGC.
++ RTC_LOG(LS_INFO)
++ << "video capture: DesktopCapturer::CreateRawWindowCapturer creates "
++ "DesktopCapturer of type FallbackDesktopCapturerWrapper which has a "
++ "fallback capturer of type WgcCapturerWin";
+ capturer = std::make_unique<BlankDetectorDesktopCapturerWrapper>(
+ std::move(capturer), RgbaColor(0, 0, 0, 0),
+ /*check_per_capture*/ true);
diff --git a/third_party/libwebrtc/moz-patch-stack/p0003.patch b/third_party/libwebrtc/moz-patch-stack/p0003.patch
@@ -1,331 +0,0 @@
-From: Palak Agarwal <agpalak@google.com>
-Date: Tue, 7 Oct 2025 13:45:52 +0200
-Subject: (cherry-pick-branch-heads/7390) [M141] Add logging while creating
- {Window|Screen}Capturer
-
-(cherry picked from commit 6908505ae0eba5d530ad0bb4b37d4654a4f36c95)
-
-Fixed: chromium:450184498
-Bug: chromium:448881311
-Change-Id: I0f043f58bf831e6822451cac99a8972a054ffdf7
-Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/414800
-Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
-Reviewed-by: Harald Alvestrand <hta@webrtc.org>
-Commit-Queue: Palak Agarwal <agpalak@google.com>
-Cr-Original-Commit-Position: refs/heads/main@{#45856}
-Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/415420
-Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
-Cr-Commit-Position: refs/branch-heads/7390@{#3}
-Cr-Branched-From: 2f553bf8d573c90176d51559b76dfc836996c8f5-refs/heads/main@{#45520}
----
- modules/desktop_capture/desktop_capturer.cc | 15 +++++++++++++++
- .../linux/x11/screen_capturer_x11.cc | 6 ++++++
- .../linux/x11/window_capturer_x11.cc | 4 ++++
- modules/desktop_capture/screen_capturer_darwin.mm | 7 +++++++
- .../desktop_capture/screen_capturer_fuchsia.cc | 3 +++
- modules/desktop_capture/screen_capturer_linux.cc | 4 ++++
- modules/desktop_capture/screen_capturer_null.cc | 4 ++++
- modules/desktop_capture/screen_capturer_win.cc | 6 ++++++
- modules/desktop_capture/window_capturer_linux.cc | 4 ++++
- modules/desktop_capture/window_capturer_mac.mm | 2 ++
- modules/desktop_capture/window_capturer_null.cc | 3 +++
- modules/desktop_capture/window_capturer_win.cc | 7 +++++++
- 12 files changed, 65 insertions(+)
-
-diff --git a/modules/desktop_capture/desktop_capturer.cc b/modules/desktop_capture/desktop_capturer.cc
-index ae9aba26ee..bf63f73178 100644
---- a/modules/desktop_capture/desktop_capturer.cc
-+++ b/modules/desktop_capture/desktop_capturer.cc
-@@ -21,6 +21,7 @@
- #include "modules/desktop_capture/desktop_capturer_differ_wrapper.h"
- #include "modules/desktop_capture/desktop_geometry.h"
- #include "modules/desktop_capture/shared_memory.h"
-+#include "rtc_base/logging.h"
- #include "system_wrappers/include/metrics.h"
-
- #if defined(WEBRTC_WIN)
-@@ -81,18 +82,26 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateWindowCapturer(
- #if defined(RTC_ENABLE_WIN_WGC)
- if (options.allow_wgc_window_capturer() &&
- IsWgcSupported(CaptureType::kWindow)) {
-+ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateWindowCapturer "
-+ "creates DesktopCapturer of type WgcCapturerWin";
- return WgcCapturerWin::CreateRawWindowCapturer(options);
- }
- #endif // defined(RTC_ENABLE_WIN_WGC)
-
- #if defined(WEBRTC_WIN)
- if (options.allow_cropping_window_capturer()) {
-+ RTC_LOG(LS_INFO)
-+ << "video capture: DesktopCapturer::CreateWindowCapturer "
-+ "creates DesktopCapturer of type CroppingWindowCapturerWin";
- return CroppingWindowCapturer::CreateCapturer(options);
- }
- #endif // defined(WEBRTC_WIN)
-
- std::unique_ptr<DesktopCapturer> capturer = CreateRawWindowCapturer(options);
- if (capturer && options.detect_updated_region()) {
-+ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateWindowCapturer "
-+ "creates DesktopCapturer of type "
-+ "DesktopCapturerDifferWrapper over a base capturer";
- capturer.reset(new DesktopCapturerDifferWrapper(std::move(capturer)));
- }
-
-@@ -105,12 +114,18 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateScreenCapturer(
- #if defined(RTC_ENABLE_WIN_WGC)
- if (options.allow_wgc_screen_capturer() &&
- IsWgcSupported(CaptureType::kScreen)) {
-+ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateScreenCapturer "
-+ "creates DesktopCapturer of type WgcCapturerWin";
- return WgcCapturerWin::CreateRawScreenCapturer(options);
- }
- #endif // defined(RTC_ENABLE_WIN_WGC)
-
- std::unique_ptr<DesktopCapturer> capturer = CreateRawScreenCapturer(options);
- if (capturer && options.detect_updated_region()) {
-+ RTC_LOG(LS_INFO)
-+ << "video capture: DesktopCapturer::CreateScreenCapturer creates "
-+ "DesktopCapturer of type DesktopCapturerDifferWrapper over a base "
-+ "capturer";
- capturer.reset(new DesktopCapturerDifferWrapper(std::move(capturer)));
- }
-
-diff --git a/modules/desktop_capture/linux/x11/screen_capturer_x11.cc b/modules/desktop_capture/linux/x11/screen_capturer_x11.cc
-index 90dd797cb3..f10dcabc7e 100644
---- a/modules/desktop_capture/linux/x11/screen_capturer_x11.cc
-+++ b/modules/desktop_capture/linux/x11/screen_capturer_x11.cc
-@@ -511,8 +511,14 @@ std::unique_ptr<DesktopCapturer> ScreenCapturerX11::CreateRawScreenCapturer(
- if (!options.x_display())
- return nullptr;
-
-+ RTC_LOG(LS_INFO)
-+ << "video capture: ScreenCapturerX11::CreateRawScreenCapturer creates "
-+ "DesktopCapturer of type ScreenCapturerX11";
- std::unique_ptr<ScreenCapturerX11> capturer(new ScreenCapturerX11());
- if (!capturer->Init(options)) {
-+ RTC_LOG(LS_INFO)
-+ << "video capture: ScreenCapturerX11::CreateRawScreenCapturer "
-+ "DesktopCapturer is null because it can not be initiated";
- return nullptr;
- }
-
-diff --git a/modules/desktop_capture/linux/x11/window_capturer_x11.cc b/modules/desktop_capture/linux/x11/window_capturer_x11.cc
-index 8e592ff2d9..9505205b76 100644
---- a/modules/desktop_capture/linux/x11/window_capturer_x11.cc
-+++ b/modules/desktop_capture/linux/x11/window_capturer_x11.cc
-@@ -247,6 +247,10 @@ std::unique_ptr<DesktopCapturer> WindowCapturerX11::CreateRawWindowCapturer(
- const DesktopCaptureOptions& options) {
- if (!options.x_display())
- return nullptr;
-+
-+ RTC_LOG(LS_INFO)
-+ << "video capture: WindowCapturerX11::CreateRawWindowCapturer creates "
-+ "DesktopCapturer of type WindowCapturerX11";
- return std::unique_ptr<DesktopCapturer>(new WindowCapturerX11(options));
- }
-
-diff --git a/modules/desktop_capture/screen_capturer_darwin.mm b/modules/desktop_capture/screen_capturer_darwin.mm
-index 95a877c45d..3f14ddfe58 100644
---- a/modules/desktop_capture/screen_capturer_darwin.mm
-+++ b/modules/desktop_capture/screen_capturer_darwin.mm
-@@ -12,6 +12,7 @@
-
- #include "modules/desktop_capture/mac/screen_capturer_mac.h"
- #include "modules/desktop_capture/mac/screen_capturer_sck.h"
-+#include "rtc_base/logging.h"
-
- namespace webrtc {
-
-@@ -27,10 +28,16 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
- std::unique_ptr<DesktopCapturer> sck_capturer =
- CreateScreenCapturerSck(options);
- if (sck_capturer) {
-+ RTC_LOG(LS_INFO)
-+ << "video capture: DesktopCapturer::CreateRawScreenCapturer creates "
-+ "DesktopCapturer of type ScreenCapturerSck";
- return sck_capturer;
- }
- }
-
-+ RTC_LOG(LS_INFO)
-+ << "video capture: DesktopCapturer::CreateRawScreenCapturer creates "
-+ "DesktopCapturer of type ScreenCapturerMac";
- auto capturer =
- std::make_unique<ScreenCapturerMac>(options.configuration_monitor(),
- options.detect_updated_region(),
-diff --git a/modules/desktop_capture/screen_capturer_fuchsia.cc b/modules/desktop_capture/screen_capturer_fuchsia.cc
-index c3f51ef0fc..2a6c5e753d 100644
---- a/modules/desktop_capture/screen_capturer_fuchsia.cc
-+++ b/modules/desktop_capture/screen_capturer_fuchsia.cc
-@@ -56,6 +56,9 @@ size_t RoundUpToMultiple(size_t value, size_t multiple) {
-
- std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
- const DesktopCaptureOptions& options) {
-+ RTC_LOG(LS_INFO)
-+ << "video capture: DesktopCapturer::CreateRawScreenCapturer creates "
-+ "DesktopCapturer of type ScreenCapturerFuchsia";
- std::unique_ptr<ScreenCapturerFuchsia> capturer(new ScreenCapturerFuchsia());
- return capturer;
- }
-diff --git a/modules/desktop_capture/screen_capturer_linux.cc b/modules/desktop_capture/screen_capturer_linux.cc
-index 94726750c5..f25e08fb59 100644
---- a/modules/desktop_capture/screen_capturer_linux.cc
-+++ b/modules/desktop_capture/screen_capturer_linux.cc
-@@ -13,6 +13,7 @@
- #include "modules/desktop_capture/desktop_capture_options.h"
- #include "modules/desktop_capture/desktop_capture_types.h"
- #include "modules/desktop_capture/desktop_capturer.h"
-+#include "rtc_base/logging.h"
-
- #if defined(WEBRTC_USE_PIPEWIRE)
- #include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h"
-@@ -29,6 +30,9 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
- const DesktopCaptureOptions& options) {
- #if defined(WEBRTC_USE_PIPEWIRE)
- if (options.allow_pipewire() && BaseCapturerPipeWire::IsSupported()) {
-+ RTC_LOG(LS_INFO)
-+ << "video capture: DesktopCapturer::CreateRawScreenCapturer creates "
-+ "DesktopCapturer of type BaseCapturerPipeWire";
- return std::make_unique<BaseCapturerPipeWire>(options,
- CaptureType::kScreen);
- }
-diff --git a/modules/desktop_capture/screen_capturer_null.cc b/modules/desktop_capture/screen_capturer_null.cc
-index aa6d4991a0..21b2f46c4d 100644
---- a/modules/desktop_capture/screen_capturer_null.cc
-+++ b/modules/desktop_capture/screen_capturer_null.cc
-@@ -11,12 +11,16 @@
- #include <memory>
-
- #include "modules/desktop_capture/desktop_capturer.h"
-+#include "rtc_base/logging.h"
-
- namespace webrtc {
-
- // static
- std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
- const DesktopCaptureOptions& options) {
-+ RTC_LOG(LS_INFO)
-+ << "video capture: DesktopCapturer::CreateRawScreenCapturer creates null "
-+ "DesktopCapturer";
- return nullptr;
- }
-
-diff --git a/modules/desktop_capture/screen_capturer_win.cc b/modules/desktop_capture/screen_capturer_win.cc
-index a5f2052979..6620888f18 100644
---- a/modules/desktop_capture/screen_capturer_win.cc
-+++ b/modules/desktop_capture/screen_capturer_win.cc
-@@ -19,6 +19,7 @@
- #include "modules/desktop_capture/win/dxgi_duplicator_controller.h"
- #include "modules/desktop_capture/win/screen_capturer_win_directx.h"
- #include "modules/desktop_capture/win/screen_capturer_win_gdi.h"
-+#include "rtc_base/logging.h"
-
- namespace webrtc {
-
-@@ -26,6 +27,9 @@ namespace {
-
- std::unique_ptr<DesktopCapturer> CreateScreenCapturerWinDirectx(
- const DesktopCaptureOptions& options) {
-+ RTC_LOG(LS_INFO)
-+ << "video capture: DesktopCapturer::CreateRawScreenCapturer creates "
-+ "DesktopCapturer of type ScreenCapturerWinDirectx";
- std::unique_ptr<DesktopCapturer> capturer(
- new ScreenCapturerWinDirectx(options));
- capturer.reset(new BlankDetectorDesktopCapturerWrapper(
-@@ -39,6 +43,8 @@ std::unique_ptr<DesktopCapturer> CreateScreenCapturerWinDirectx(
- std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
- const DesktopCaptureOptions& options) {
- // Default capturer if no options are enabled is GDI.
-+ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateRawScreenCapturer "
-+ "creates DesktopCapturer of type ScreenCapturerWinGdi";
- std::unique_ptr<DesktopCapturer> capturer(new ScreenCapturerWinGdi(options));
-
- // If DirectX is enabled use it as main capturer with GDI as fallback.
-diff --git a/modules/desktop_capture/window_capturer_linux.cc b/modules/desktop_capture/window_capturer_linux.cc
-index f621a63e72..87ea3d5721 100644
---- a/modules/desktop_capture/window_capturer_linux.cc
-+++ b/modules/desktop_capture/window_capturer_linux.cc
-@@ -13,6 +13,7 @@
- #include "modules/desktop_capture/desktop_capture_options.h"
- #include "modules/desktop_capture/desktop_capture_types.h"
- #include "modules/desktop_capture/desktop_capturer.h"
-+#include "rtc_base/logging.h"
-
- #if defined(WEBRTC_USE_PIPEWIRE)
- #include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h"
-@@ -29,6 +30,9 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
- const DesktopCaptureOptions& options) {
- #if defined(WEBRTC_USE_PIPEWIRE)
- if (options.allow_pipewire() && BaseCapturerPipeWire::IsSupported()) {
-+ RTC_LOG(LS_INFO)
-+ << "video capture: DesktopCapturer::CreateRawWindowCapturer creates "
-+ "DesktopCapturer of type BaseCapturerPipeWire";
- return std::make_unique<BaseCapturerPipeWire>(options,
- CaptureType::kWindow);
- }
-diff --git a/modules/desktop_capture/window_capturer_mac.mm b/modules/desktop_capture/window_capturer_mac.mm
-index a1e6157b87..731090d3fb 100644
---- a/modules/desktop_capture/window_capturer_mac.mm
-+++ b/modules/desktop_capture/window_capturer_mac.mm
-@@ -217,6 +217,8 @@ void WindowCapturerMac::CaptureFrame() {
- // static
- std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
- const DesktopCaptureOptions& options) {
-+ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateRawWindowCapturer "
-+ "creates DesktopCapturer of type WindowCapturerMac";
- return std::unique_ptr<DesktopCapturer>(new WindowCapturerMac(
- options.full_screen_window_detector(), options.configuration_monitor()));
- }
-diff --git a/modules/desktop_capture/window_capturer_null.cc b/modules/desktop_capture/window_capturer_null.cc
-index 2061dc5248..384e186d20 100644
---- a/modules/desktop_capture/window_capturer_null.cc
-+++ b/modules/desktop_capture/window_capturer_null.cc
-@@ -12,6 +12,7 @@
-
- #include "modules/desktop_capture/desktop_capturer.h"
- #include "rtc_base/checks.h"
-+#include "rtc_base/logging.h"
-
- namespace webrtc {
-
-@@ -65,6 +66,8 @@ void WindowCapturerNull::CaptureFrame() {
- // static
- std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
- const DesktopCaptureOptions& options) {
-+ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateRawWindowCapturer "
-+ "creates DesktopCapturer of type WindowCapturerNull";
- return std::unique_ptr<DesktopCapturer>(new WindowCapturerNull());
- }
-
-diff --git a/modules/desktop_capture/window_capturer_win.cc b/modules/desktop_capture/window_capturer_win.cc
-index 115bc7d9b0..15ed7f5121 100644
---- a/modules/desktop_capture/window_capturer_win.cc
-+++ b/modules/desktop_capture/window_capturer_win.cc
-@@ -15,6 +15,7 @@
- #include "modules/desktop_capture/desktop_capturer.h"
- #include "modules/desktop_capture/rgba_color.h"
- #include "modules/desktop_capture/win/window_capturer_win_gdi.h"
-+#include "rtc_base/logging.h"
-
- #if defined(RTC_ENABLE_WIN_WGC)
- #include "modules/desktop_capture/blank_detector_desktop_capturer_wrapper.h"
-@@ -28,6 +29,8 @@ namespace webrtc {
- // static
- std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
- const DesktopCaptureOptions& options) {
-+ RTC_LOG(LS_INFO) << "video capture: DesktopCapturer::CreateRawWindowCapturer "
-+ "creates DesktopCapturer of type WindowCapturerWinGdi";
- std::unique_ptr<DesktopCapturer> capturer(
- WindowCapturerWinGdi::CreateRawWindowCapturer(options));
- #if defined(RTC_ENABLE_WIN_WGC)
-@@ -36,6 +39,10 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
- // BlankDectector capturer will send an error when it detects a failed
- // GDI rendering, then Fallback capturer will try to capture it again with
- // WGC.
-+ RTC_LOG(LS_INFO)
-+ << "video capture: DesktopCapturer::CreateRawWindowCapturer creates "
-+ "DesktopCapturer of type FallbackDesktopCapturerWrapper which has a "
-+ "fallback capturer of type WgcCapturerWin";
- capturer = std::make_unique<BlankDetectorDesktopCapturerWrapper>(
- std::move(capturer), RgbaColor(0, 0, 0, 0),
- /*check_per_capture*/ true);