Remove redundant webrtc:: prefixes in api
Created by
tools_webrtc/remove_extra_namespace.py --namespace webrtc
and manual adjustments.
This CL was uploaded by git cl split.
R=eshr@webrtc.org
No-IWYU: Refactoring
Bug: webrtc:42232595
Change-Id: Iaa0f996efce0bc521d3558e4e531ef603a9d8890
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/396160
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44914}
diff --git a/api/array_view.h b/api/array_view.h
index 577d6cb..8b68b9d 100644
--- a/api/array_view.h
+++ b/api/array_view.h
@@ -22,7 +22,7 @@
 
 namespace webrtc {
 
-// tl;dr: webrtc::ArrayView is the same thing as gsl::span from the Guideline
+// tl;dr: ArrayView is the same thing as gsl::span from the Guideline
 //        Support Library.
 //
 // Many functions read from or write to arrays. The obvious way to do this is
@@ -37,7 +37,7 @@
 //   }
 //
 // This is flexible, since it doesn't matter how the array is stored (C array,
-// std::vector, webrtc::Buffer, ...), but it's error-prone because the caller
+// std::vector, Buffer, ...), but it's error-prone because the caller
 // has to correctly specify the array length:
 //
 //   Contains17(arr, std::size(arr));     // C array
@@ -48,11 +48,11 @@
 // It's also kind of messy to have two separate arguments for what is
 // conceptually a single thing.
 //
-// Enter webrtc::ArrayView<T>. It contains a T pointer (to an array it doesn't
+// Enter ArrayView<T>. It contains a T pointer (to an array it doesn't
 // own) and a count, and supports the basic things you'd expect, such as
 // indexing and iteration. It allows us to write our function like this:
 //
-//   bool Contains17(webrtc::ArrayView<const int> arr) {
+//   bool Contains17(ArrayView<const int> arr) {
 //     for (auto e : arr) {
 //       if (e == 17)
 //         return true;
@@ -65,7 +65,7 @@
 //
 //   Contains17(arr);                             // C array
 //   Contains17(arr);                             // std::vector
-//   Contains17(webrtc::ArrayView<int>(arr, size));  // pointer + size
+//   Contains17(ArrayView<int>(arr, size));  // pointer + size
 //   Contains17(nullptr);                         // nullptr -> empty ArrayView
 //   ...
 //
@@ -239,8 +239,8 @@
   // ArrayView<T, N> to ArrayView<T> or ArrayView<const T>,
   // std::vector<T> to ArrayView<T> or ArrayView<const T>,
   // const std::vector<T> to ArrayView<const T>,
-  // webrtc::Buffer to ArrayView<uint8_t> or ArrayView<const uint8_t>, and
-  // const webrtc::Buffer to ArrayView<const uint8_t>.
+  // Buffer to ArrayView<uint8_t> or ArrayView<const uint8_t>, and
+  // const Buffer to ArrayView<const uint8_t>.
   template <
       typename U,
       typename std::enable_if<Size == array_view_internal::kArrayViewVarSize &&
diff --git a/api/async_dns_resolver.h b/api/async_dns_resolver.h
index 11fdf67..e10df20 100644
--- a/api/async_dns_resolver.h
+++ b/api/async_dns_resolver.h
@@ -79,14 +79,14 @@
   // Creates an AsyncDnsResolver and starts resolving the name. The callback
   // will be called when resolution is finished.
   // The callback will be called on the sequence that the caller runs on.
-  virtual std::unique_ptr<webrtc::AsyncDnsResolverInterface> CreateAndResolve(
+  virtual std::unique_ptr<AsyncDnsResolverInterface> CreateAndResolve(
       const SocketAddress& addr,
       absl::AnyInvocable<void()> callback) = 0;
   // Creates an AsyncDnsResolver and starts resolving the name to an address
   // matching the specified family. The callback will be called when resolution
   // is finished. The callback will be called on the sequence that the caller
   // runs on.
-  virtual std::unique_ptr<webrtc::AsyncDnsResolverInterface> CreateAndResolve(
+  virtual std::unique_ptr<AsyncDnsResolverInterface> CreateAndResolve(
       const SocketAddress& addr,
       int family,
       absl::AnyInvocable<void()> callback) = 0;
@@ -94,7 +94,7 @@
   // For backwards compatibility, will be deprecated and removed.
   // One has to do a separate Start() call on the
   // resolver to start name resolution.
-  virtual std::unique_ptr<webrtc::AsyncDnsResolverInterface> Create() = 0;
+  virtual std::unique_ptr<AsyncDnsResolverInterface> Create() = 0;
 };
 
 }  // namespace webrtc
diff --git a/api/candidate.h b/api/candidate.h
index b02d0ac..69e66ef 100644
--- a/api/candidate.h
+++ b/api/candidate.h
@@ -105,7 +105,7 @@
   absl::string_view type_name() const;
 
   // Setting the type requires a constant string (e.g.
-  // webrtc::LOCAL_PORT_TYPE). The type should really be an enum rather than a
+  // LOCAL_PORT_TYPE). The type should really be an enum rather than a
   // string, but until we make that change the lifetime attribute helps us lock
   // things down. See also the `Port` class.
   void set_type(IceCandidateType type) { type_ = type; }
@@ -159,10 +159,10 @@
 
   // `network_cost` measures the cost/penalty of using this candidate. A network
   // cost of 0 indicates this candidate can be used freely. A value of
-  // webrtc::kNetworkCostMax indicates it should be used only as the last
+  // kNetworkCostMax indicates it should be used only as the last
   // resort.
   void set_network_cost(uint16_t network_cost) {
-    RTC_DCHECK_LE(network_cost, webrtc::kNetworkCostMax);
+    RTC_DCHECK_LE(network_cost, kNetworkCostMax);
     network_cost_ = network_cost;
   }
   uint16_t network_cost() const { return network_cost_; }
diff --git a/api/create_peerconnection_factory.cc b/api/create_peerconnection_factory.cc
index aec4f12..12434ee 100644
--- a/api/create_peerconnection_factory.cc
+++ b/api/create_peerconnection_factory.cc
@@ -52,7 +52,7 @@
   dependencies.env = CreateEnvironment(std::move(field_trials));
 
   if (network_thread) {
-    // TODO(bugs.webrtc.org/13145): Add an webrtc::SocketFactory* argument.
+    // TODO(bugs.webrtc.org/13145): Add an SocketFactory* argument.
     dependencies.socket_factory = network_thread->socketserver();
   }
   dependencies.adm = std::move(default_adm);
diff --git a/api/crypto/frame_decryptor_interface.h b/api/crypto/frame_decryptor_interface.h
index 7ed165f..659f166 100644
--- a/api/crypto/frame_decryptor_interface.h
+++ b/api/crypto/frame_decryptor_interface.h
@@ -60,7 +60,7 @@
   // kRecoverable should be returned if the failure was due to something other
   // than a decryption failure. kFailedToDecrypt should be returned in all other
   // cases.
-  virtual Result Decrypt(webrtc::MediaType media_type,
+  virtual Result Decrypt(MediaType media_type,
                          const std::vector<uint32_t>& csrcs,
                          ArrayView<const uint8_t> additional_data,
                          ArrayView<const uint8_t> encrypted_frame,
@@ -69,7 +69,7 @@
   // Returns the total required length in bytes for the output of the
   // decryption. This can be larger than the actual number of bytes you need but
   // must never be smaller as it informs the size of the frame buffer.
-  virtual size_t GetMaxPlaintextByteSize(webrtc::MediaType media_type,
+  virtual size_t GetMaxPlaintextByteSize(MediaType media_type,
                                          size_t encrypted_frame_size) = 0;
 };
 
diff --git a/api/crypto/frame_encryptor_interface.h b/api/crypto/frame_encryptor_interface.h
index 9a2b170..6a17972 100644
--- a/api/crypto/frame_encryptor_interface.h
+++ b/api/crypto/frame_encryptor_interface.h
@@ -38,7 +38,7 @@
   // must set bytes_written to the number of bytes you wrote in the
   // encrypted_frame. 0 must be returned if successful all other numbers can be
   // selected by the implementer to represent error codes.
-  virtual int Encrypt(webrtc::MediaType media_type,
+  virtual int Encrypt(MediaType media_type,
                       uint32_t ssrc,
                       ArrayView<const uint8_t> additional_data,
                       ArrayView<const uint8_t> frame,
@@ -48,7 +48,7 @@
   // Returns the total required length in bytes for the output of the
   // encryption. This can be larger than the actual number of bytes you need but
   // must never be smaller as it informs the size of the encrypted_frame buffer.
-  virtual size_t GetMaxCiphertextByteSize(webrtc::MediaType media_type,
+  virtual size_t GetMaxCiphertextByteSize(MediaType media_type,
                                           size_t frame_size) = 0;
 };
 
diff --git a/api/dtls_transport_interface.h b/api/dtls_transport_interface.h
index c444313..79099f4 100644
--- a/api/dtls_transport_interface.h
+++ b/api/dtls_transport_interface.h
@@ -110,7 +110,7 @@
 // accessed on that thread, except for functions explicitly marked otherwise.
 // References can be held by other threads, and destruction can therefore
 // be initiated by other threads.
-class DtlsTransportInterface : public webrtc::RefCountInterface {
+class DtlsTransportInterface : public RefCountInterface {
  public:
   // Returns a pointer to the ICE transport that is owned by the DTLS transport.
   virtual scoped_refptr<IceTransportInterface> ice_transport() = 0;
diff --git a/api/dtmf_sender_interface.h b/api/dtmf_sender_interface.h
index 16ce665..3b18483 100644
--- a/api/dtmf_sender_interface.h
+++ b/api/dtmf_sender_interface.h
@@ -41,7 +41,7 @@
 // The interface of native implementation of the RTCDTMFSender defined by the
 // WebRTC W3C Editor's Draft.
 // See: https://www.w3.org/TR/webrtc/#peer-to-peer-dtmf
-class DtmfSenderInterface : public webrtc::RefCountInterface {
+class DtmfSenderInterface : public RefCountInterface {
  public:
   // Provides the spec compliant default 2 second delay for the ',' character.
   static const int kDtmfDefaultCommaDelayMs = 2000;
diff --git a/api/ice_transport_factory.h b/api/ice_transport_factory.h
index cdd9db1..56ac4b3 100644
--- a/api/ice_transport_factory.h
+++ b/api/ice_transport_factory.h
@@ -19,7 +19,7 @@
 namespace webrtc {
 
 // Static factory for an IceTransport object that can be created
-// without using a webrtc::PeerConnection.
+// without using a PeerConnection.
 // The returned object must be accessed and destroyed on the thread that
 // created it.
 // The PortAllocator must outlive the created IceTransportInterface object.
@@ -29,7 +29,7 @@
     PortAllocator* port_allocator);
 
 // Static factory for an IceTransport object that can be created
-// without using a webrtc::PeerConnection.
+// without using a PeerConnection.
 // The returned object must be accessed and destroyed on the thread that
 // created it.
 // `init.port_allocator()` is required and must outlive the created
diff --git a/api/ice_transport_interface.h b/api/ice_transport_interface.h
index d859ed6..937c916 100644
--- a/api/ice_transport_interface.h
+++ b/api/ice_transport_interface.h
@@ -35,7 +35,7 @@
   // The returned object can only be safely used on the signalling thread.
   // TODO(crbug.com/907849): Add API calls for the functions that have to
   // be exposed to clients, and stop allowing access to the
-  // webrtc::IceTransportInternal API.
+  // IceTransportInternal API.
   virtual IceTransportInternal* internal() = 0;
 };
 
diff --git a/api/jsep.h b/api/jsep.h
index 829f726..2c626bb 100644
--- a/api/jsep.h
+++ b/api/jsep.h
@@ -317,8 +317,7 @@
     std::unique_ptr<SessionDescription> description);
 
 // CreateOffer and CreateAnswer callback interface.
-class RTC_EXPORT CreateSessionDescriptionObserver
-    : public webrtc::RefCountInterface {
+class RTC_EXPORT CreateSessionDescriptionObserver : public RefCountInterface {
  public:
   // This callback transfers the ownership of the `desc`.
   // TODO(deadbeef): Make this take an std::unique_ptr<> to avoid confusion
@@ -337,8 +336,7 @@
 };
 
 // SetLocalDescription and SetRemoteDescription callback interface.
-class RTC_EXPORT SetSessionDescriptionObserver
-    : public webrtc::RefCountInterface {
+class RTC_EXPORT SetSessionDescriptionObserver : public RefCountInterface {
  public:
   virtual void OnSuccess() = 0;
   // See description in CreateSessionDescriptionObserver for OnFailure.
diff --git a/api/legacy_stats_types.h b/api/legacy_stats_types.h
index 8d94541..51b9318 100644
--- a/api/legacy_stats_types.h
+++ b/api/legacy_stats_types.h
@@ -244,7 +244,7 @@
     kStatsValueNameLocalCandidateRelayProtocol,
   };
 
-  class RTC_EXPORT IdBase : public webrtc::RefCountInterface {
+  class RTC_EXPORT IdBase : public RefCountInterface {
    public:
     ~IdBase() override;
     StatsType type() const;
@@ -356,7 +356,7 @@
 #endif
 
    private:
-    webrtc::SequenceChecker thread_checker_{webrtc::SequenceChecker::kDetached};
+    SequenceChecker thread_checker_{SequenceChecker::kDetached};
     mutable int ref_count_ RTC_GUARDED_BY(thread_checker_) = 0;
 
     const Type type_;
@@ -474,7 +474,7 @@
 
  private:
   Container list_;
-  webrtc::SequenceChecker thread_checker_{SequenceChecker::kDetached};
+  SequenceChecker thread_checker_{SequenceChecker::kDetached};
 };
 
 }  // namespace webrtc
diff --git a/api/make_ref_counted.h b/api/make_ref_counted.h
index b7781e9..48a0535 100644
--- a/api/make_ref_counted.h
+++ b/api/make_ref_counted.h
@@ -56,7 +56,7 @@
 //   auto p = scoped_refptr<Foo>(new RefCountedObject<Foo>("bar", 123));
 //
 // If the class does not inherit from RefCountInterface, but does have
-// AddRef/Release methods (so a T* is convertible to webrtc::scoped_refptr),
+// AddRef/Release methods (so a T* is convertible to scoped_refptr),
 // this is equivalent to just
 //
 //   auto p = scoped_refptr<Foo>(new Foo("bar", 123));
diff --git a/api/media_stream_interface.h b/api/media_stream_interface.h
index c3b60f7..07fc72d 100644
--- a/api/media_stream_interface.h
+++ b/api/media_stream_interface.h
@@ -56,7 +56,7 @@
 
 // Base class for sources. A MediaStreamTrack has an underlying source that
 // provides media. A source can be shared by multiple tracks.
-class RTC_EXPORT MediaSourceInterface : public webrtc::RefCountInterface,
+class RTC_EXPORT MediaSourceInterface : public RefCountInterface,
                                         public NotifierInterface {
  public:
   enum SourceState { kInitializing, kLive, kEnded, kMuted };
@@ -71,7 +71,7 @@
 
 // C++ version of MediaStreamTrack.
 // See: https://www.w3.org/TR/mediacapture-streams/#mediastreamtrack
-class RTC_EXPORT MediaStreamTrackInterface : public webrtc::RefCountInterface,
+class RTC_EXPORT MediaStreamTrackInterface : public RefCountInterface,
                                              public NotifierInterface {
  public:
   enum TrackState {
@@ -106,7 +106,7 @@
 // VideoTrackSourceInterface is a reference counted source used for
 // VideoTracks. The same source can be used by multiple VideoTracks.
 // VideoTrackSourceInterface is designed to be invoked on the signaling thread
-// except for webrtc::VideoSourceInterface<VideoFrame> methods that will be
+// except for VideoSourceInterface<VideoFrame> methods that will be
 // invoked on the worker thread via a VideoTrack. A custom implementation of a
 // source can inherit AdaptedVideoTrackSource instead of directly implementing
 // this interface.
@@ -161,14 +161,14 @@
   // The call is expected to happen on the network thread.
   // TODO(crbug/1255737): make pure virtual once downstream project adapts.
   virtual void ProcessConstraints(
-      const webrtc::VideoTrackSourceConstraints& /* constraints */) {}
+      const VideoTrackSourceConstraints& /* constraints */) {}
 
  protected:
   ~VideoTrackSourceInterface() override = default;
 };
 
 // VideoTrackInterface is designed to be invoked on the signaling thread except
-// for webrtc::VideoSourceInterface<VideoFrame> methods that must be invoked
+// for VideoSourceInterface<VideoFrame> methods that must be invoked
 // on the worker thread.
 // PeerConnectionFactory::CreateVideoTrack can be used for creating a VideoTrack
 // that ensures thread safety and that all methods are called on the right
@@ -210,7 +210,7 @@
   // In this method, `absolute_capture_timestamp_ms`, when available, is
   // supposed to deliver the timestamp when this audio frame was originally
   // captured. This timestamp MUST be based on the same clock as
-  // webrtc::TimeMillis().
+  // TimeMillis().
   virtual void OnData(
       const void* audio_data,
       int bits_per_sample,
@@ -269,7 +269,7 @@
 
 // Interface of the audio processor used by the audio track to collect
 // statistics.
-class AudioProcessorInterface : public webrtc::RefCountInterface {
+class AudioProcessorInterface : public RefCountInterface {
  public:
   struct AudioProcessorStatistics {
     bool typing_noise_detected = false;
@@ -323,7 +323,7 @@
 // must be pushed down.
 //
 // Thus, this interface acts as simply a container for tracks.
-class MediaStreamInterface : public webrtc::RefCountInterface,
+class MediaStreamInterface : public RefCountInterface,
                              public NotifierInterface {
  public:
   virtual std::string id() const = 0;
diff --git a/api/media_types.h b/api/media_types.h
index c2d4149..e58abfd 100644
--- a/api/media_types.h
+++ b/api/media_types.h
@@ -24,7 +24,7 @@
   DATA,
   UNSUPPORTED,
   ANY,
-  // Backwards compatibility values for webrtc::MediaType users
+  // Backwards compatibility values for MediaType users
   // TODO: https://issues.webrtc.org/42222911 - remove
   MEDIA_TYPE_AUDIO [[deprecated("Use AUDIO")]] = AUDIO,
   MEDIA_TYPE_VIDEO [[deprecated("Use VIDEO")]] = VIDEO,
diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h
index 9e2e99c..549afb3 100644
--- a/api/peer_connection_interface.h
+++ b/api/peer_connection_interface.h
@@ -155,7 +155,7 @@
 
 // IWYU pragma: end_keep
 // MediaStream container interface.
-class StreamCollectionInterface : public webrtc::RefCountInterface {
+class StreamCollectionInterface : public RefCountInterface {
  public:
   // TODO(ronghuawu): Update the function names to c++ style, e.g. find -> Find.
   virtual size_t count() = 0;
@@ -169,7 +169,7 @@
   ~StreamCollectionInterface() override = default;
 };
 
-class StatsObserver : public webrtc::RefCountInterface {
+class StatsObserver : public RefCountInterface {
  public:
   virtual void OnComplete(const StatsReports& reports) = 0;
 
@@ -184,7 +184,7 @@
   kUnifiedPlan,
 };
 
-class RTC_EXPORT PeerConnectionInterface : public webrtc::RefCountInterface {
+class RTC_EXPORT PeerConnectionInterface : public RefCountInterface {
  public:
   // See https://w3c.github.io/webrtc-pc/#dom-rtcsignalingstate
   enum SignalingState {
@@ -613,7 +613,7 @@
     // With this class one can modify outgoing TURN messages.
     // The object passed in must remain valid until PeerConnection::Close() is
     // called.
-    webrtc::TurnCustomizer* turn_customizer = nullptr;
+    TurnCustomizer* turn_customizer = nullptr;
 
     // Preferred network interface.
     // A candidate pair on a preferred network has a higher precedence in ICE
@@ -864,13 +864,13 @@
       const RtpTransceiverInit& init) = 0;
 
   // Adds a transceiver with the given kind. Can either be
-  // webrtc::MediaType::AUDIO or webrtc::MediaType::VIDEO. Errors:
-  // - INVALID_PARAMETER: `media_type` is not webrtc::MediaType::AUDIO or
-  //                      webrtc::MediaType::VIDEO.
+  // MediaType::AUDIO or MediaType::VIDEO. Errors:
+  // - INVALID_PARAMETER: `media_type` is not MediaType::AUDIO or
+  //                      MediaType::VIDEO.
   virtual RTCErrorOr<scoped_refptr<RtpTransceiverInterface>> AddTransceiver(
-      webrtc::MediaType media_type) = 0;
+      MediaType media_type) = 0;
   virtual RTCErrorOr<scoped_refptr<RtpTransceiverInterface>> AddTransceiver(
-      webrtc::MediaType media_type,
+      MediaType media_type,
       const RtpTransceiverInit& init) = 0;
 
   // Creates a sender without a track. Can be used for "early media"/"warmup"
@@ -941,7 +941,7 @@
   // version of getStats() in JavaScript. Implementation status is described in
   // api/stats/rtcstats_objects.h. For more details on stats, see spec:
   // https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-getstats
-  // TODO(hbos): Takes shared ownership, use webrtc::scoped_refptr<> instead.
+  // TODO(hbos): Takes shared ownership, use scoped_refptr<> instead.
   // This requires stop overriding the current version in third party or making
   // third party calls explicit to avoid ambiguity during switch. Make the
   // future version abstract as soon as third party projects implement it.
@@ -1128,7 +1128,7 @@
   // networks come and go. Note that the candidates' transport_name must be set
   // to the MID of the m= section that generated the candidate.
   // TODO(bugs.webrtc.org/8395): Use IceCandidate instead of
-  // webrtc::Candidate, which would avoid the transport_name oddity.
+  // Candidate, which would avoid the transport_name oddity.
   virtual bool RemoveIceCandidates(
       const std::vector<Candidate>& candidates) = 0;
 
@@ -1390,13 +1390,11 @@
   // PacketSocketFactory when creating the PeerConnectionFactory.
   std::unique_ptr<PortAllocator> allocator;
   // Factory for creating resolvers that look up hostnames in DNS
-  std::unique_ptr<webrtc::AsyncDnsResolverFactoryInterface>
-      async_dns_resolver_factory;
-  std::unique_ptr<webrtc::IceTransportFactory> ice_transport_factory;
+  std::unique_ptr<AsyncDnsResolverFactoryInterface> async_dns_resolver_factory;
+  std::unique_ptr<IceTransportFactory> ice_transport_factory;
   std::unique_ptr<RTCCertificateGeneratorInterface> cert_generator;
   std::unique_ptr<SSLCertificateVerifier> tls_cert_verifier;
-  std::unique_ptr<webrtc::VideoBitrateAllocatorFactory>
-      video_bitrate_allocator_factory;
+  std::unique_ptr<VideoBitrateAllocatorFactory> video_bitrate_allocator_factory;
   // Optional network controller factory to use.
   // Overrides that set in PeerConnectionFactoryDependencies.
   std::unique_ptr<NetworkControllerFactoryInterface> network_controller_factory;
@@ -1497,8 +1495,7 @@
 // of networking classes, it should use the alternate
 // CreatePeerConnectionFactory method which accepts threads as input, and use
 // the CreatePeerConnection version that takes a PortAllocator as an argument.
-class RTC_EXPORT PeerConnectionFactoryInterface
-    : public webrtc::RefCountInterface {
+class RTC_EXPORT PeerConnectionFactoryInterface : public RefCountInterface {
  public:
   class Options {
    public:
@@ -1541,16 +1538,14 @@
       PeerConnectionDependencies dependencies) = 0;
 
   // Returns the capabilities of an RTP sender of type `kind`.
-  // If for some reason you pass in webrtc::MediaType::DATA, returns an empty
+  // If for some reason you pass in MediaType::DATA, returns an empty
   // structure.
-  virtual RtpCapabilities GetRtpSenderCapabilities(
-      webrtc::MediaType kind) const = 0;
+  virtual RtpCapabilities GetRtpSenderCapabilities(MediaType kind) const = 0;
 
   // Returns the capabilities of an RTP receiver of type `kind`.
-  // If for some reason you pass in webrtc::MediaType::DATA, returns an empty
+  // If for some reason you pass in MediaType::DATA, returns an empty
   // structure.
-  virtual RtpCapabilities GetRtpReceiverCapabilities(
-      webrtc::MediaType kind) const = 0;
+  virtual RtpCapabilities GetRtpReceiverCapabilities(MediaType kind) const = 0;
 
   virtual scoped_refptr<MediaStreamInterface> CreateLocalMediaStream(
       const std::string& stream_id) = 0;
@@ -1616,7 +1611,7 @@
 // If `network_thread` or `worker_thread` are null, the PeerConnectionFactory
 // will create the necessary thread internally. If `signaling_thread` is null,
 // the PeerConnectionFactory will use the thread on which this method is called
-// as the signaling thread, wrapping it in an webrtc::Thread object if needed.
+// as the signaling thread, wrapping it in an Thread object if needed.
 RTC_EXPORT scoped_refptr<PeerConnectionFactoryInterface>
 CreateModularPeerConnectionFactory(
     PeerConnectionFactoryDependencies dependencies);
diff --git a/api/priority.h b/api/priority.h
index bb2f881..e74e7d3 100644
--- a/api/priority.h
+++ b/api/priority.h
@@ -27,7 +27,7 @@
 };
 
 class RTC_EXPORT PriorityValue
-    : public webrtc::StrongAlias<class PriorityValueTag, uint16_t> {
+    : public StrongAlias<class PriorityValueTag, uint16_t> {
  public:
   explicit PriorityValue(Priority priority);
   explicit PriorityValue(uint16_t priority) : StrongAlias(priority) {}
diff --git a/api/ref_count.h b/api/ref_count.h
index b3fb763..0b9d56c 100644
--- a/api/ref_count.h
+++ b/api/ref_count.h
@@ -22,7 +22,7 @@
 // you're borrowing someone else's reference. (A newly created object is a
 // special case: the reference count is zero on construction, and the code that
 // creates the object should immediately call AddRef(), bringing the reference
-// count from zero to one, e.g., by constructing an webrtc::scoped_refptr).
+// count from zero to one, e.g., by constructing an scoped_refptr).
 //
 // AddRef() creates a new reference to the object.
 //
@@ -41,8 +41,8 @@
 // result of another thread calling Release().
 //
 // Calling AddRef() and Release() manually is discouraged. It's recommended to
-// use webrtc::scoped_refptr to manage all pointers to reference counted
-// objects. Note that webrtc::scoped_refptr depends on compile-time duck-typing;
+// use scoped_refptr to manage all pointers to reference counted
+// objects. Note that scoped_refptr depends on compile-time duck-typing;
 // formally implementing the below RefCountInterface is not required.
 
 enum class RefCountReleaseStatus { kDroppedLastRef, kOtherRefsRemained };
diff --git a/api/ref_counted_base.h b/api/ref_counted_base.h
index 8862ebd..a411257 100644
--- a/api/ref_counted_base.h
+++ b/api/ref_counted_base.h
@@ -41,7 +41,7 @@
   virtual ~RefCountedBase() = default;
 
  private:
-  mutable webrtc::webrtc_impl::RefCounter ref_count_{0};
+  mutable webrtc_impl::RefCounter ref_count_{0};
 };
 
 // Template based version of `RefCountedBase` for simple implementations that do
@@ -49,11 +49,11 @@
 // vtable.
 //
 // To use:
-//   struct MyInt : public webrtc::RefCountedNonVirtual<MyInt>  {
+//   struct MyInt : public RefCountedNonVirtual<MyInt>  {
 //     int foo_ = 0;
 //   };
 //
-//   webrtc::scoped_refptr<MyInt> my_int(new MyInt());
+//   scoped_refptr<MyInt> my_int(new MyInt());
 //
 // sizeof(MyInt) on a 32 bit system would then be 8, int + refcount and no
 // vtable generated.
@@ -73,7 +73,7 @@
     //    so the virtual attribute(s) can be removed.
     // 2) The virtual methods are a part of the design of the class. In this
     //    case you can consider using `RefCountedBase` instead or alternatively
-    //    use `webrtc::RefCountedObject`.
+    //    use `RefCountedObject`.
     static_assert(!std::is_polymorphic<T>::value,
                   "T has virtual methods. RefCountedBase is a better fit.");
     const auto status = ref_count_.DecRef();
@@ -91,7 +91,7 @@
   ~RefCountedNonVirtual() = default;
 
  private:
-  mutable webrtc::webrtc_impl::RefCounter ref_count_{0};
+  mutable webrtc_impl::RefCounter ref_count_{0};
 };
 
 }  // namespace webrtc
diff --git a/api/rtp_packet_info.h b/api/rtp_packet_info.h
index 8e8236d..4059108 100644
--- a/api/rtp_packet_info.h
+++ b/api/rtp_packet_info.h
@@ -87,7 +87,7 @@
   std::vector<uint32_t> csrcs_;
   uint32_t rtp_timestamp_;
 
-  // Local `webrtc::Clock`-based timestamp of when the packet was received.
+  // Local `Clock`-based timestamp of when the packet was received.
   Timestamp receive_time_;
 
   // Fields from the Audio Level header extension:
diff --git a/api/rtp_parameters.cc b/api/rtp_parameters.cc
index c6560d4..06c5811 100644
--- a/api/rtp_parameters.cc
+++ b/api/rtp_parameters.cc
@@ -202,7 +202,7 @@
       // srtpfilter. External auth is used by Chromium and replaces the
       // extension header value of "kAbsSendTimeUri", so it must not be
       // encrypted (which can't be done by Chromium).
-      uri != webrtc::RtpExtension::kAbsSendTimeUri &&
+      uri != RtpExtension::kAbsSendTimeUri &&
 #endif
       uri != RtpExtension::kEncryptHeaderExtensionsUri;
 }
diff --git a/api/rtp_parameters.h b/api/rtp_parameters.h
index 3bb65d8..5d7c266 100644
--- a/api/rtp_parameters.h
+++ b/api/rtp_parameters.h
@@ -137,7 +137,7 @@
   std::string name;
 
   // The media type of this codec. Equivalent to MIME top-level type.
-  webrtc::MediaType kind = webrtc::MediaType::AUDIO;
+  MediaType kind = MediaType::AUDIO;
 
   // If unset, the implementation default is used.
   std::optional<int> clock_rate;
@@ -195,7 +195,7 @@
 
   template <typename Sink>
   friend void AbslStringify(Sink& sink, const RtpCodecCapability& cap) {
-    if (cap.kind == webrtc::MediaType::AUDIO) {
+    if (cap.kind == MediaType::AUDIO) {
       absl::Format(&sink, "[audio/%s/%d/%d]", cap.name,
                    cap.clock_rate.value_or(0), cap.num_channels.value_or(1));
     } else {
@@ -214,7 +214,7 @@
 //
 // Note that ORTC includes a "kind" field, but we omit this because it's
 // redundant; if you call
-// "RtpReceiver::GetCapabilities(webrtc::MediaType::AUDIO)", you know you're
+// "RtpReceiver::GetCapabilities(MediaType::AUDIO)", you know you're
 // getting audio capabilities.
 struct RTC_EXPORT RtpHeaderExtensionCapability {
   // URI of this extension, as defined in RFC8285.
@@ -394,7 +394,7 @@
   static constexpr char kRepairedRidUri[] =
       "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id";
 
-  // Header extension to propagate webrtc::VideoFrame id field
+  // Header extension to propagate VideoFrame id field
   static constexpr char kVideoFrameTrackingIdUri[] =
       "http://www.webrtc.org/experiments/rtp-hdrext/video-frame-tracking-id";
 
diff --git a/api/rtp_receiver_interface.h b/api/rtp_receiver_interface.h
index 29df678..bf87f46 100644
--- a/api/rtp_receiver_interface.h
+++ b/api/rtp_receiver_interface.h
@@ -40,13 +40,13 @@
   // In the future, it's likely that an RtpReceiver will only call
   // OnFirstPacketReceived when a packet is received specifically for its
   // SSRC/mid.
-  virtual void OnFirstPacketReceived(webrtc::MediaType media_type) = 0;
+  virtual void OnFirstPacketReceived(MediaType media_type) = 0;
 
  protected:
   virtual ~RtpReceiverObserverInterface() {}
 };
 
-class RTC_EXPORT RtpReceiverInterface : public webrtc::RefCountInterface,
+class RTC_EXPORT RtpReceiverInterface : public RefCountInterface,
                                         public FrameTransformerHost {
  public:
   virtual scoped_refptr<MediaStreamTrackInterface> track() const = 0;
@@ -68,7 +68,7 @@
   virtual std::vector<scoped_refptr<MediaStreamInterface>> streams() const;
 
   // Audio or video receiver?
-  virtual webrtc::MediaType media_type() const = 0;
+  virtual MediaType media_type() const = 0;
 
   // Not to be confused with "mid", this is a field we can temporarily use
   // to uniquely identify a receiver until we implement Unified Plan SDP.
diff --git a/api/rtp_sender_interface.h b/api/rtp_sender_interface.h
index 478e15d..2a7907d 100644
--- a/api/rtp_sender_interface.h
+++ b/api/rtp_sender_interface.h
@@ -40,7 +40,7 @@
  public:
   // The observer is called when the first media packet is sent for the observed
   // sender. It is called immediately if the first packet was already sent.
-  virtual void OnFirstPacketSent(webrtc::MediaType media_type) = 0;
+  virtual void OnFirstPacketSent(MediaType media_type) = 0;
 
  protected:
   virtual ~RtpSenderObserverInterface() {}
@@ -48,7 +48,7 @@
 
 using SetParametersCallback = absl::AnyInvocable<void(RTCError) &&>;
 
-class RTC_EXPORT RtpSenderInterface : public webrtc::RefCountInterface,
+class RTC_EXPORT RtpSenderInterface : public RefCountInterface,
                                       public FrameTransformerHost {
  public:
   // Returns true if successful in setting the track.
@@ -68,7 +68,7 @@
   virtual uint32_t ssrc() const = 0;
 
   // Audio or video sender?
-  virtual webrtc::MediaType media_type() const = 0;
+  virtual MediaType media_type() const = 0;
 
   // Not to be confused with "mid", this is a field we can temporarily use
   // to uniquely identify a receiver until we implement Unified Plan SDP.
diff --git a/api/rtp_transceiver_interface.h b/api/rtp_transceiver_interface.h
index e35c5b7..0d9671f 100644
--- a/api/rtp_transceiver_interface.h
+++ b/api/rtp_transceiver_interface.h
@@ -59,11 +59,11 @@
 //
 // WebRTC specification for RTCRtpTransceiver, the JavaScript analog:
 // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver
-class RTC_EXPORT RtpTransceiverInterface : public webrtc::RefCountInterface {
+class RTC_EXPORT RtpTransceiverInterface : public RefCountInterface {
  public:
   // Media type of the transceiver. Any sender(s)/receiver(s) will have this
   // type as well.
-  virtual webrtc::MediaType media_type() const = 0;
+  virtual MediaType media_type() const = 0;
 
   // The mid attribute is the mid negotiated and present in the local and
   // remote descriptions. Before negotiation is complete, the mid value may be
@@ -165,7 +165,7 @@
   // The SetHeaderExtensionsToNegotiate method modifies the next SDP negotiation
   // so that it negotiates use of header extensions which are not kStopped.
   // https://w3c.github.io/webrtc-extensions/#rtcrtptransceiver-interface
-  virtual webrtc::RTCError SetHeaderExtensionsToNegotiate(
+  virtual RTCError SetHeaderExtensionsToNegotiate(
       ArrayView<const RtpHeaderExtensionCapability> header_extensions) = 0;
 
  protected:
diff --git a/api/sctp_transport_interface.h b/api/sctp_transport_interface.h
index a9fd115..ba68ca0 100644
--- a/api/sctp_transport_interface.h
+++ b/api/sctp_transport_interface.h
@@ -75,7 +75,7 @@
 // accessed on that thread, except for functions explicitly marked otherwise.
 // References can be held by other threads, and destruction can therefore
 // be initiated by other threads.
-class SctpTransportInterface : public webrtc::RefCountInterface {
+class SctpTransportInterface : public RefCountInterface {
  public:
   // This function can be called from other threads.
   virtual scoped_refptr<DtlsTransportInterface> dtls_transport() const = 0;
diff --git a/api/set_local_description_observer_interface.h b/api/set_local_description_observer_interface.h
index 40f85b9..3ba19f9 100644
--- a/api/set_local_description_observer_interface.h
+++ b/api/set_local_description_observer_interface.h
@@ -19,7 +19,7 @@
 // OnSetLocalDescriptionComplete() invokes as soon as
 // PeerConnectionInterface::SetLocalDescription() operation completes, allowing
 // the observer to examine the effects of the operation without delay.
-class SetLocalDescriptionObserverInterface : public webrtc::RefCountInterface {
+class SetLocalDescriptionObserverInterface : public RefCountInterface {
  public:
   // On success, `error.ok()` is true.
   virtual void OnSetLocalDescriptionComplete(RTCError error) = 0;
diff --git a/api/set_remote_description_observer_interface.h b/api/set_remote_description_observer_interface.h
index c162541..4e77be0 100644
--- a/api/set_remote_description_observer_interface.h
+++ b/api/set_remote_description_observer_interface.h
@@ -20,7 +20,7 @@
 // callback is invoked such that the state of the peer connection can be
 // examined to accurately reflect the effects of the SetRemoteDescription
 // operation.
-class SetRemoteDescriptionObserverInterface : public webrtc::RefCountInterface {
+class SetRemoteDescriptionObserverInterface : public RefCountInterface {
  public:
   // On success, `error.ok()` is true.
   virtual void OnSetRemoteDescriptionComplete(RTCError error) = 0;
diff --git a/api/task_queue/pending_task_safety_flag.h b/api/task_queue/pending_task_safety_flag.h
index 71e8710..e514b41 100644
--- a/api/task_queue/pending_task_safety_flag.h
+++ b/api/task_queue/pending_task_safety_flag.h
@@ -40,7 +40,7 @@
 //
 // class ExampleClass {
 // ....
-//    webrtc::scoped_refptr<PendingTaskSafetyFlag> flag = safety_flag_;
+//    scoped_refptr<PendingTaskSafetyFlag> flag = safety_flag_;
 //    my_task_queue_->PostTask(
 //        [flag = std::move(flag), this] {
 //          // Now running on the main thread.
diff --git a/api/task_queue/task_queue_test.cc b/api/task_queue/task_queue_test.cc
index a7c6226..b0054de 100644
--- a/api/task_queue/task_queue_test.cc
+++ b/api/task_queue/task_queue_test.cc
@@ -54,7 +54,7 @@
   auto queue = CreateTaskQueue(factory, "PostAndCheckCurrent");
 
   // We're not running a task, so `queue` shouldn't be current.
-  // Note that because webrtc::Thread also supports the TQ interface and
+  // Note that because Thread also supports the TQ interface and
   // TestMainImpl::Init wraps the main test thread (bugs.webrtc.org/9714), that
   // means that TaskQueueBase::Current() will still return a valid value.
   EXPECT_FALSE(queue->IsCurrent());
diff --git a/api/task_queue/task_queue_test.h b/api/task_queue/task_queue_test.h
index 214f950..6237f7f 100644
--- a/api/task_queue/task_queue_test.h
+++ b/api/task_queue/task_queue_test.h
@@ -27,7 +27,7 @@
 // using ::testing::Values;
 // using ::webrtc::TaskQueueTest;
 //
-// std::unique_ptr<webrtc::TaskQueueFactory> CreateMyFactory();
+// std::unique_ptr<TaskQueueFactory> CreateMyFactory();
 //
 // INSTANTIATE_TEST_SUITE_P(My, TaskQueueTest, Values(CreateMyFactory));
 //
diff --git a/api/voip/test/mock_voip_engine.h b/api/voip/test/mock_voip_engine.h
index 6f9e281..97006a5 100644
--- a/api/voip/test/mock_voip_engine.h
+++ b/api/voip/test/mock_voip_engine.h
@@ -69,13 +69,11 @@
  public:
   MOCK_METHOD(VoipResult,
               ReceivedRTPPacket,
-              (ChannelId channel_id,
-               webrtc::ArrayView<const uint8_t> rtp_packet),
+              (ChannelId channel_id, ArrayView<const uint8_t> rtp_packet),
               (override));
   MOCK_METHOD(VoipResult,
               ReceivedRTCPPacket,
-              (ChannelId channel_id,
-               webrtc::ArrayView<const uint8_t> rtcp_packet),
+              (ChannelId channel_id, ArrayView<const uint8_t> rtcp_packet),
               (override));
 };
 
diff --git a/api/voip/voip_base.h b/api/voip/voip_base.h
index f7f4432..72cd4b7 100644
--- a/api/voip/voip_base.h
+++ b/api/voip/voip_base.h
@@ -58,7 +58,7 @@
   // Creates a channel.
   // Each channel handle maps into one audio media session where each has
   // its own separate module for send/receive rtp packet with one peer.
-  // Caller must set `transport`, webrtc::Transport callback pointer to
+  // Caller must set `transport`, Transport callback pointer to
   // receive rtp/rtcp packets from corresponding media session in VoIP engine.
   // VoipEngine framework expects applications to handle network I/O directly
   // and injection for incoming RTP from remote endpoint is handled via