Refactoring PayloadRouter.
- Move PayloadRouter to RtpTransportControllerInterface.
- Move RetransmissionLimiter inside RtpTransportControllerSend from
VideoSendStreamImpl.
- Move video RTP specifics into PayloadRouter, in particular ownership
of the RTP modules.
- PayloadRouter now contains all video specific RTP code, and will be
renamed in a follow-up to VideoRtpSender.
- Introduce VideoRtpSenderInterface.
Bug: webrtc:9517
Change-Id: I1c7b293fa6f9c320286c80533b3c584498034a38
Reviewed-on: https://webrtc-review.googlesource.com/88240
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24009}
diff --git a/modules/video_coding/media_opt_util.h b/modules/video_coding/media_opt_util.h
index c91ab2b..9cc8d6d 100644
--- a/modules/video_coding/media_opt_util.h
+++ b/modules/video_coding/media_opt_util.h
@@ -48,19 +48,7 @@
const int kMaxRttDelayThreshold = 500;
struct VCMProtectionParameters {
- VCMProtectionParameters()
- : rtt(0),
- lossPr(0.0f),
- bitRate(0.0f),
- packetsPerFrame(0.0f),
- packetsPerFrameKey(0.0f),
- frameRate(0.0f),
- keyFrameSize(0.0f),
- fecRateDelta(0),
- fecRateKey(0),
- codecWidth(0),
- codecHeight(0),
- numLayers(1) {}
+ VCMProtectionParameters();
int64_t rtt;
float lossPr;
@@ -107,38 +95,38 @@
// Returns the protection type
//
// Return value : The protection type
- enum VCMProtectionMethodEnum Type() const { return _type; }
+ VCMProtectionMethodEnum Type() const;
// Returns the effective packet loss for ER, required by this protection
// method
//
// Return value : Required effective packet loss
- virtual uint8_t RequiredPacketLossER() { return _effectivePacketLoss; }
+ virtual uint8_t RequiredPacketLossER();
// Extracts the FEC protection factor for Key frame, required by this
// protection method
//
// Return value : Required protectionFactor for Key frame
- virtual uint8_t RequiredProtectionFactorK() { return _protectionFactorK; }
+ virtual uint8_t RequiredProtectionFactorK();
// Extracts the FEC protection factor for Delta frame, required by this
// protection method
//
// Return value : Required protectionFactor for delta frame
- virtual uint8_t RequiredProtectionFactorD() { return _protectionFactorD; }
+ virtual uint8_t RequiredProtectionFactorD();
// Extracts whether the FEC Unequal protection (UEP) is used for Key frame.
//
// Return value : Required Unequal protection on/off state.
- virtual bool RequiredUepProtectionK() { return _useUepProtectionK; }
+ virtual bool RequiredUepProtectionK();
// Extracts whether the the FEC Unequal protection (UEP) is used for Delta
// frame.
//
// Return value : Required Unequal protection on/off state.
- virtual bool RequiredUepProtectionD() { return _useUepProtectionD; }
+ virtual bool RequiredUepProtectionD();
- virtual int MaxFramesFec() const { return 1; }
+ virtual int MaxFramesFec() const;
protected:
uint8_t _effectivePacketLoss;
@@ -151,14 +139,14 @@
bool _useUepProtectionK;
bool _useUepProtectionD;
float _corrFecCost;
- enum VCMProtectionMethodEnum _type;
+ VCMProtectionMethodEnum _type;
};
class VCMNackMethod : public VCMProtectionMethod {
public:
VCMNackMethod();
- virtual ~VCMNackMethod();
- virtual bool UpdateParameters(const VCMProtectionParameters* parameters);
+ ~VCMNackMethod() override;
+ bool UpdateParameters(const VCMProtectionParameters* parameters) override;
// Get the effective packet loss
bool EffectivePacketLoss(const VCMProtectionParameters* parameter);
};
@@ -166,8 +154,8 @@
class VCMFecMethod : public VCMProtectionMethod {
public:
VCMFecMethod();
- virtual ~VCMFecMethod();
- virtual bool UpdateParameters(const VCMProtectionParameters* parameters);
+ ~VCMFecMethod() override;
+ bool UpdateParameters(const VCMProtectionParameters* parameters) override;
// Get the effective packet loss for ER
bool EffectivePacketLoss(const VCMProtectionParameters* parameters);
// Get the FEC protection factors
@@ -202,14 +190,14 @@
public:
VCMNackFecMethod(int64_t lowRttNackThresholdMs,
int64_t highRttNackThresholdMs);
- virtual ~VCMNackFecMethod();
- virtual bool UpdateParameters(const VCMProtectionParameters* parameters);
+ ~VCMNackFecMethod() override;
+ bool UpdateParameters(const VCMProtectionParameters* parameters) override;
// Get the effective packet loss for ER
bool EffectivePacketLoss(const VCMProtectionParameters* parameters);
// Get the protection factors
bool ProtectionFactor(const VCMProtectionParameters* parameters);
// Get the max number of frames the FEC is allowed to be based on.
- int MaxFramesFec() const;
+ int MaxFramesFec() const override;
// Turn off the FEC based on low bitrate and other factors.
bool BitRateTooLowForFec(const VCMProtectionParameters* parameters);