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:
Tommi
2021-06-09 13:46:28 +02:00
committed by WebRTC LUCI CQ
parent c0a95863bd
commit 6eda26c550
9 changed files with 153 additions and 78 deletions

View File

@ -157,15 +157,26 @@ class AudioReceiveStream {
// An optional custom frame decryptor that allows the entire frame to be
// decrypted in whatever way the caller choses. This is not required by
// default.
// TODO(tommi): Remove this member variable from the struct. It's not
// a part of the AudioReceiveStream state but rather a pass through
// variable.
rtc::scoped_refptr<webrtc::FrameDecryptorInterface> frame_decryptor;
// An optional frame transformer used by insertable streams to transform
// encoded frames.
// TODO(tommi): Remove this member variable from the struct. It's not
// a part of the AudioReceiveStream state but rather a pass through
// variable.
rtc::scoped_refptr<webrtc::FrameTransformerInterface> frame_transformer;
};
// Reconfigure the stream according to the Configuration.
virtual void Reconfigure(const Config& config) = 0;
// 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;
// Starts stream activity.
// When a stream is active, it can receive, process and deliver packets.