From 0601db9a48e1178f3a9541d1f5b13d0951799441 Mon Sep 17 00:00:00 2001 From: Tommi Date: Wed, 18 May 2022 09:18:37 +0200 Subject: [PATCH] Rename ReceiveStream to ReceiveStreamInterface Bug: webrtc:7484 Change-Id: I41176a66b8399f6c8cf568630f2808eb95cf6247 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262767 Auto-Submit: Tomas Gunnarsson Commit-Queue: Niels Moller Reviewed-by: Niels Moller Cr-Commit-Position: refs/heads/main@{#36917} --- call/call.cc | 9 +++++---- call/flexfec_receive_stream.h | 2 +- call/flexfec_receive_stream_impl.h | 2 +- call/receive_stream.h | 10 +++++++--- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/call/call.cc b/call/call.cc index f96bda5702..078aa2edc0 100644 --- a/call/call.cc +++ b/call/call.cc @@ -85,7 +85,7 @@ bool HasTransportSequenceNumber(const RtpHeaderExtensionMap& map) { map.IsRegistered(kRtpExtensionTransportSequenceNumber02); } -bool UseSendSideBwe(const ReceiveStream* stream) { +bool UseSendSideBwe(const ReceiveStreamInterface* stream) { return stream->transport_cc() && HasTransportSequenceNumber(stream->GetRtpExtensionMap()); } @@ -361,7 +361,7 @@ class Call final : public webrtc::Call, bool IdentifyReceivedPacket(RtpPacketReceived& packet, bool* use_send_side_bwe = nullptr); - bool RegisterReceiveStream(uint32_t ssrc, ReceiveStream* stream); + bool RegisterReceiveStream(uint32_t ssrc, ReceiveStreamInterface* stream); bool UnregisterReceiveStream(uint32_t ssrc); void UpdateAggregateNetworkState(); @@ -416,7 +416,7 @@ class Call final : public webrtc::Call, // TODO(bugs.webrtc.org/11993): Move receive_rtp_config_ over to the // network thread. - std::map receive_rtp_config_ + std::map receive_rtp_config_ RTC_GUARDED_BY(&receive_11993_checker_); // Audio and Video send streams are owned by the client that creates them. @@ -1710,7 +1710,8 @@ bool Call::IdentifyReceivedPacket(RtpPacketReceived& packet, return true; } -bool Call::RegisterReceiveStream(uint32_t ssrc, ReceiveStream* stream) { +bool Call::RegisterReceiveStream(uint32_t ssrc, + ReceiveStreamInterface* stream) { RTC_DCHECK_RUN_ON(&receive_11993_checker_); RTC_DCHECK(stream); auto inserted = receive_rtp_config_.emplace(ssrc, stream); diff --git a/call/flexfec_receive_stream.h b/call/flexfec_receive_stream.h index 118eb0bce5..31aa99d0bb 100644 --- a/call/flexfec_receive_stream.h +++ b/call/flexfec_receive_stream.h @@ -25,7 +25,7 @@ namespace webrtc { class FlexfecReceiveStream : public RtpPacketSinkInterface, - public ReceiveStream { + public ReceiveStreamInterface { public: ~FlexfecReceiveStream() override = default; diff --git a/call/flexfec_receive_stream_impl.h b/call/flexfec_receive_stream_impl.h index 857715a941..48edf098e0 100644 --- a/call/flexfec_receive_stream_impl.h +++ b/call/flexfec_receive_stream_impl.h @@ -58,7 +58,7 @@ class FlexfecReceiveStreamImpl : public FlexfecReceiveStream { Stats GetStats() const override; - // ReceiveStream impl. + // ReceiveStreamInterface impl. void SetRtpExtensions(std::vector extensions) override; RtpHeaderExtensionMap GetRtpExtensionMap() const override; diff --git a/call/receive_stream.h b/call/receive_stream.h index 0464a70a28..4a946d653f 100644 --- a/call/receive_stream.h +++ b/call/receive_stream.h @@ -24,7 +24,7 @@ namespace webrtc { // Common base interface for MediaReceiveStream based classes and // FlexfecReceiveStream. -class ReceiveStream { +class ReceiveStreamInterface { public: // Receive-stream specific RTP settings. // TODO(tommi): This struct isn't needed at this level anymore. Move it closer @@ -68,11 +68,11 @@ class ReceiveStream { virtual bool transport_cc() const = 0; protected: - virtual ~ReceiveStream() {} + virtual ~ReceiveStreamInterface() {} }; // Either an audio or video receive stream. -class MediaReceiveStream : public ReceiveStream { +class MediaReceiveStream : public ReceiveStreamInterface { public: // Starts stream activity. // When a stream is active, it can receive, process and deliver packets. @@ -94,6 +94,10 @@ class MediaReceiveStream : public ReceiveStream { virtual std::vector GetSources() const = 0; }; +// TODO(bugs.webrtc.org/7484): Remove this once downstream usage of the +// deprecated name is gone. +using ReceiveStream [[deprecated]] = ReceiveStreamInterface; + } // namespace webrtc #endif // CALL_RECEIVE_STREAM_H_