Remove unused method PacketLossModeToStr.
Add method FrameType for frame to TestConfig. Bug: none Change-Id: Icfeb12fcb961559c9b36a3aedb081a840b9d8556 Reviewed-on: https://webrtc-review.googlesource.com/16120 Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Åsa Persson <asapersson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20458}
This commit is contained in:
@ -9,9 +9,12 @@
|
||||
*/
|
||||
|
||||
#include "modules/video_coding/codecs/test/test_config.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/video_codec_settings.h"
|
||||
|
||||
using ::testing::ElementsAre;
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
@ -84,6 +87,25 @@ TEST(TestConfig, TemporalLayersForFrame_ThreeLayers) {
|
||||
EXPECT_EQ(2, config.TemporalLayerForFrame(7));
|
||||
}
|
||||
|
||||
TEST(TestConfig, ForcedKeyFrameIntervalOff) {
|
||||
TestConfig config;
|
||||
config.keyframe_interval = 0;
|
||||
EXPECT_THAT(config.FrameTypeForFrame(0), ElementsAre(kVideoFrameDelta));
|
||||
EXPECT_THAT(config.FrameTypeForFrame(1), ElementsAre(kVideoFrameDelta));
|
||||
EXPECT_THAT(config.FrameTypeForFrame(2), ElementsAre(kVideoFrameDelta));
|
||||
}
|
||||
|
||||
TEST(TestConfig, ForcedKeyFrameIntervalOn) {
|
||||
TestConfig config;
|
||||
config.keyframe_interval = 3;
|
||||
EXPECT_THAT(config.FrameTypeForFrame(0), ElementsAre(kVideoFrameKey));
|
||||
EXPECT_THAT(config.FrameTypeForFrame(1), ElementsAre(kVideoFrameDelta));
|
||||
EXPECT_THAT(config.FrameTypeForFrame(2), ElementsAre(kVideoFrameDelta));
|
||||
EXPECT_THAT(config.FrameTypeForFrame(3), ElementsAre(kVideoFrameKey));
|
||||
EXPECT_THAT(config.FrameTypeForFrame(4), ElementsAre(kVideoFrameDelta));
|
||||
EXPECT_THAT(config.FrameTypeForFrame(5), ElementsAre(kVideoFrameDelta));
|
||||
}
|
||||
|
||||
TEST(TestConfig, ToString_Vp8) {
|
||||
TestConfig config;
|
||||
config.filename = "yuvfile";
|
||||
|
||||
Reference in New Issue
Block a user