Factor out common receive stream methods to a common interface.
Also including common Rtp config members.
Follow up changes will remove the ReceiveRtpConfig class in Call
and copy of extension headers, instead use the config directly
from the receive streams and not require stream recreation for changing
the headers.
Bug: webrtc:11993
Change-Id: I29ff3400d45d5bffddb3ad0a078403eb102afb65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221983
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34283}
diff --git a/call/audio_receive_stream.h b/call/audio_receive_stream.h
index 2f67f7c..55e3fdb 100644
--- a/call/audio_receive_stream.h
+++ b/call/audio_receive_stream.h
@@ -20,17 +20,14 @@
#include "api/audio_codecs/audio_decoder_factory.h"
#include "api/call/transport.h"
#include "api/crypto/crypto_options.h"
-#include "api/crypto/frame_decryptor_interface.h"
-#include "api/frame_transformer_interface.h"
#include "api/rtp_parameters.h"
-#include "api/scoped_refptr.h"
-#include "api/transport/rtp/rtp_source.h"
+#include "call/receive_stream.h"
#include "call/rtp_config.h"
namespace webrtc {
class AudioSinkInterface;
-class AudioReceiveStream {
+class AudioReceiveStream : public MediaReceiveStream {
public:
struct Stats {
Stats();
@@ -106,29 +103,14 @@
std::string ToString() const;
// Receive-stream specific RTP settings.
- struct Rtp {
+ struct Rtp : public RtpConfig {
Rtp();
~Rtp();
std::string ToString() const;
- // Synchronization source (stream identifier) to be received.
- uint32_t remote_ssrc = 0;
-
- // Sender SSRC used for sending RTCP (such as receiver reports).
- uint32_t local_ssrc = 0;
-
- // Enable feedback for send side bandwidth estimation.
- // See
- // https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions
- // for details.
- bool transport_cc = false;
-
// See NackConfig for description.
NackConfig nack;
-
- // RTP header extensions used for the received stream.
- std::vector<RtpExtension> extensions;
} rtp;
Transport* rtcp_send_transport = nullptr;
@@ -171,21 +153,9 @@
};
// Methods that support reconfiguring the stream post initialization.
- virtual void SetDepacketizerToDecoderFrameTransformer(
- rtc::scoped_refptr<webrtc::FrameTransformerInterface>
- frame_transformer) = 0;
virtual void SetDecoderMap(std::map<int, SdpAudioFormat> decoder_map) = 0;
virtual void SetUseTransportCcAndNackHistory(bool use_transport_cc,
int history_ms) = 0;
- virtual void SetFrameDecryptor(
- rtc::scoped_refptr<webrtc::FrameDecryptorInterface> frame_decryptor) = 0;
-
- // Starts stream activity.
- // When a stream is active, it can receive, process and deliver packets.
- virtual void Start() = 0;
- // Stops stream activity.
- // When a stream is stopped, it can't receive, process or deliver packets.
- virtual void Stop() = 0;
// Returns true if the stream has been started.
virtual bool IsRunning() const = 0;
@@ -215,8 +185,6 @@
// Returns current value of base minimum delay in milliseconds.
virtual int GetBaseMinimumPlayoutDelayMs() const = 0;
- virtual std::vector<RtpSource> GetSources() const = 0;
-
protected:
virtual ~AudioReceiveStream() {}
};