Remove redudant encoder rate calls.
Moves EncoderParameters update checks into GenericEncoder before calling SetRates/SetChannelParameters as applicable. Also removes CodecConfigParameters as a bonus. BUG= R=stefan@webrtc.org TBR=mflodman@webrtc.org Review URL: https://codereview.webrtc.org/1426953003 . Cr-Commit-Position: refs/heads/master@{#10452}
This commit is contained in:
@ -73,10 +73,6 @@ class I420Encoder : public VideoEncoder {
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
int CodecConfigParameters(uint8_t* /*buffer*/, int /*size*/) override {
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
void OnDroppedFrame() override {}
|
||||
|
||||
private:
|
||||
|
@ -43,8 +43,6 @@ class MockVideoEncoder : public VideoEncoder {
|
||||
MOCK_METHOD2(SetChannelParameters, int32_t(uint32_t packetLoss, int64_t rtt));
|
||||
MOCK_METHOD2(SetRates, int32_t(uint32_t newBitRate, uint32_t frameRate));
|
||||
MOCK_METHOD1(SetPeriodicKeyFrames, int32_t(bool enable));
|
||||
MOCK_METHOD2(CodecConfigParameters,
|
||||
int32_t(uint8_t* /*buffer*/, int32_t));
|
||||
};
|
||||
|
||||
class MockDecodedImageCallback : public DecodedImageCallback {
|
||||
@ -69,8 +67,6 @@ class MockVideoDecoder : public VideoDecoder {
|
||||
int32_t(DecodedImageCallback* callback));
|
||||
MOCK_METHOD0(Release, int32_t());
|
||||
MOCK_METHOD0(Reset, int32_t());
|
||||
MOCK_METHOD2(SetCodecConfigParameters,
|
||||
int32_t(const uint8_t* /*buffer*/, int32_t));
|
||||
MOCK_METHOD0(Copy, VideoDecoder*());
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user