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:
Åsa Persson
2017-10-26 15:33:18 +02:00
committed by Commit Bot
parent 71c62b438e
commit e87cfe2315
6 changed files with 45 additions and 35 deletions

View File

@ -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";