Reland "Remove AudioReceiveStream::Reconfigure() method."
This reverts commit 8a18e5b3c954a3f9cc006c90356a3d850bcc352f. Reason for revert: Removing the problematic DCHECK. Original change's description: > Revert "Remove AudioReceiveStream::Reconfigure() method." > > This reverts commit e2561e17e29e62c02731f1d214d7ee5ffdaeb941. > > Reason for revert: Speculative revert: breaks an downstream project > > Original change's description: > > Remove AudioReceiveStream::Reconfigure() method. > > > > Instead, adding specific setters that are needed at runtime: > > * SetDepacketizerToDecoderFrameTransformer > > * SetDecoderMap > > * SetUseTransportCcAndNackHistory > > > > The whole config struct is big and much of the state it holds, needs to > > be considered const. For that reason the Reconfigure() method is too > > broad of an interface since it overwrites the whole config struct > > and doesn't actually handle all the potential config changes that might > > occur when the config changes. > > > > Bug: webrtc:11993 > > Change-Id: Ia5311978f56b2e136781467e44f0d18039f0bb2d > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221363 > > Reviewed-by: Niels Moller <nisse@webrtc.org> > > Commit-Queue: Tommi <tommi@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#34252} > > TBR=saza@webrtc.org,nisse@webrtc.org,tommi@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com > > Change-Id: I15ca2d8ee5fd612e13dc1f4b3bfb9c885c21dc66 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:11993 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221746 > Commit-Queue: Artem Titov <titovartem@webrtc.org> > Reviewed-by: Andrey Logvin <landrey@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#34253} # Not skipping CQ checks because this is a reland. Bug: webrtc:11993 Change-Id: I0d3bf9abdcdc8d3f9259d014e6074a5e6b6cc73c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221747 Reviewed-by: Tommi <tommi@webrtc.org> Reviewed-by: Artem Titov <titovartem@webrtc.org> Reviewed-by: Andrey Logvin <landrey@webrtc.org> Commit-Queue: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34255}
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
#ifndef AUDIO_AUDIO_RECEIVE_STREAM_H_
|
||||
#define AUDIO_AUDIO_RECEIVE_STREAM_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
@ -81,10 +82,15 @@ class AudioReceiveStream final : public webrtc::AudioReceiveStream,
|
||||
void UnregisterFromTransport();
|
||||
|
||||
// webrtc::AudioReceiveStream implementation.
|
||||
void Reconfigure(const webrtc::AudioReceiveStream::Config& config) override;
|
||||
void Start() override;
|
||||
void Stop() override;
|
||||
bool IsRunning() const override;
|
||||
void SetDepacketizerToDecoderFrameTransformer(
|
||||
rtc::scoped_refptr<webrtc::FrameTransformerInterface> frame_transformer)
|
||||
override;
|
||||
void SetDecoderMap(std::map<int, SdpAudioFormat> decoder_map) override;
|
||||
void SetUseTransportCcAndNackHistory(bool use_transport_cc,
|
||||
int history_ms) override;
|
||||
|
||||
webrtc::AudioReceiveStream::Stats GetStats(
|
||||
bool get_and_clear_legacy_stats) const override;
|
||||
@ -111,9 +117,25 @@ class AudioReceiveStream final : public webrtc::AudioReceiveStream,
|
||||
|
||||
void AssociateSendStream(AudioSendStream* send_stream);
|
||||
void DeliverRtcp(const uint8_t* packet, size_t length);
|
||||
|
||||
uint32_t local_ssrc() const {
|
||||
// The local_ssrc member variable of config_ will never change and can be
|
||||
// considered const.
|
||||
return config_.rtp.local_ssrc;
|
||||
}
|
||||
|
||||
uint32_t remote_ssrc() const {
|
||||
// The remote_ssrc member variable of config_ will never change and can be
|
||||
// considered const.
|
||||
return config_.rtp.remote_ssrc;
|
||||
}
|
||||
|
||||
const webrtc::AudioReceiveStream::Config& config() const;
|
||||
const AudioSendStream* GetAssociatedSendStreamForTesting() const;
|
||||
|
||||
// TODO(tommi): Remove this method.
|
||||
void ReconfigureForTesting(const webrtc::AudioReceiveStream::Config& config);
|
||||
|
||||
private:
|
||||
AudioState* audio_state() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user