Add ability to specify if rate controller of video encoder is trusted.
If rate controller is trusted, we disable the frame dropper in the media optimization module. Bug: webrtc:9722 Change-Id: I821f21fd74a400ee9d5aa3f6b42d4e569033acbe Reviewed-on: https://webrtc-review.googlesource.com/c/105020 Commit-Queue: Erik Språng <sprang@webrtc.org> Reviewed-by: Per Kjellander <perkj@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25107}
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "api/test/mock_video_encoder.h"
|
||||
#include "api/video/i420_buffer.h"
|
||||
#include "modules/video_coding/codecs/vp8/include/vp8.h"
|
||||
#include "modules/video_coding/codecs/vp8/include/vp8_temporal_layers.h"
|
||||
@ -392,6 +393,17 @@ TEST_F(TestVideoSenderWithMockEncoder,
|
||||
AddFrame();
|
||||
}
|
||||
|
||||
TEST_F(TestVideoSenderWithMockEncoder, ChecksTrustedRateController) {
|
||||
// Checks that encoder is asked if rate controller is trusted.
|
||||
EXPECT_CALL(encoder_, HasTrustedRateController())
|
||||
.Times(1)
|
||||
.WillOnce(Return(true));
|
||||
|
||||
VideoCodec codec;
|
||||
webrtc::test::CodecSettings(kVideoCodecVP8, &codec);
|
||||
EXPECT_EQ(0, sender_->RegisterSendCodec(&codec, 1, 1200));
|
||||
}
|
||||
|
||||
class TestVideoSenderWithVp8 : public TestVideoSender {
|
||||
public:
|
||||
TestVideoSenderWithVp8()
|
||||
|
||||
Reference in New Issue
Block a user