Read the number of TLs for VP9 too + cleanup

In video_sender.cc, properly read the number of temporal layers for VP9 too.

Also, some cleanup in video_loopback.cc and video_quality_test.h.

Review URL: https://codereview.webrtc.org/1351693005

Cr-Commit-Position: refs/heads/master@{#10201}
This commit is contained in:
ivica
2015-10-07 06:43:33 -07:00
committed by Commit bot
parent 78543284d0
commit c7199c2d0b
3 changed files with 10 additions and 8 deletions

View File

@ -106,9 +106,15 @@ int32_t VideoSender::RegisterSendCodec(const VideoCodec* sendCodec,
return VCM_CODEC_ERROR;
}
int numLayers = (sendCodec->codecType != kVideoCodecVP8)
? 1
: sendCodec->codecSpecific.VP8.numberOfTemporalLayers;
int numLayers;
if (sendCodec->codecType == kVideoCodecVP8) {
numLayers = sendCodec->codecSpecific.VP8.numberOfTemporalLayers;
} else if (sendCodec->codecType == kVideoCodecVP9) {
numLayers = sendCodec->codecSpecific.VP9.numberOfTemporalLayers;
} else {
numLayers = 1;
}
// If we have screensharing and we have layers, we disable frame dropper.
bool disable_frame_dropper =
numLayers > 1 && sendCodec->mode == kScreensharing;

View File

@ -10,18 +10,14 @@
#include <stdio.h>
#include <map>
#include "gflags/gflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/test/field_trial.h"
#include "webrtc/test/run_test.h"
#include "webrtc/typedefs.h"
#include "webrtc/video/video_quality_test.h"
namespace webrtc {
namespace flags {
DEFINE_int32(width, 640, "Video width.");

View File

@ -34,8 +34,8 @@ class VideoQualityTest : public test::CallTest {
int max_bitrate_bps;
std::string codec;
size_t num_temporal_layers;
int min_transmit_bps;
Call::Config::BitrateConfig call_bitrate_config;
size_t tl_discard_threshold;
bool send_side_bwe;