Refactors FEC in preparation for deferred packet generation.

RtpVideoSender now stores fec type and overhead instead of querying the
generator all the time. Setting of protection parameters and asking for
current bitrate is also now handled just by the VideoFecGenerator
instance, instead of going via RtpVideoSender.
Finally, adds method to query for RtpState in VideoFecGenerator
interface. This avoids an ugly cast that would have been even more
trouble after moving fec generation.

For context, see https://webrtc-review.googlesource.com/c/src/+/173708

Bug: webrtc:11340
Change-Id: Ia5e6cd919e71850c9cc5ed5a4f4417338d577162
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174203
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31166}
This commit is contained in:
Erik Språng
2020-05-05 14:51:09 +02:00
committed by Commit Bot
parent 9a925c9ce3
commit 421088815f
9 changed files with 68 additions and 52 deletions

View File

@ -69,7 +69,7 @@ class FlexfecSender : public VideoFecGenerator {
DataRate CurrentFecRate() const override;
// Only called on the VideoSendStream queue, after operation has shut down.
RtpState GetRtpState();
absl::optional<RtpState> GetRtpState() override;
private:
// Utility.