Add temporal-layers option to video_loopback.
BUG= R=asapersson@webrtc.org, sprang@webrtc.org Review URL: https://codereview.webrtc.org/1194533002 Cr-Commit-Position: refs/heads/master@{#9482}
This commit is contained in:
@ -158,6 +158,10 @@ VideoEncoderConfig Loopback::CreateEncoderConfig() {
|
||||
static_cast<int>(config_.max_bitrate_kbps) * 1000;
|
||||
stream->max_framerate = config_.fps;
|
||||
stream->max_qp = 56;
|
||||
if (config_.num_temporal_layers != 0) {
|
||||
stream->temporal_layer_thresholds_bps.resize(config_.num_temporal_layers -
|
||||
1);
|
||||
}
|
||||
return encoder_config;
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,7 @@ class Loopback {
|
||||
size_t max_bitrate_kbps;
|
||||
int32_t min_transmit_bitrate_kbps;
|
||||
std::string codec;
|
||||
size_t num_temporal_layers;
|
||||
int32_t loss_percent;
|
||||
int32_t link_capacity_kbps;
|
||||
int32_t queue_size;
|
||||
|
@ -159,6 +159,7 @@ void Loopback() {
|
||||
flags::MaxBitrate(),
|
||||
flags::MinTransmitBitrate(),
|
||||
flags::Codec(),
|
||||
0, // Default number of temporal layers.
|
||||
flags::LossPercent(),
|
||||
flags::LinkCapacity(),
|
||||
flags::QueueSize(),
|
||||
|
@ -103,6 +103,15 @@ DEFINE_string(
|
||||
"E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/"
|
||||
" will assign the group Enable to field trial WebRTC-FooFeature. Multiple "
|
||||
"trials are separated by \"/\"");
|
||||
|
||||
DEFINE_int32(num_temporal_layers,
|
||||
0,
|
||||
"Number of temporal layers. Set to 1-4 to override.");
|
||||
|
||||
size_t NumTemporalLayers() {
|
||||
return static_cast<size_t>(FLAGS_num_temporal_layers);
|
||||
}
|
||||
|
||||
} // namespace flags
|
||||
|
||||
void Loopback() {
|
||||
@ -114,6 +123,7 @@ void Loopback() {
|
||||
flags::MaxBitrate(),
|
||||
0, // No min transmit bitrate.
|
||||
flags::Codec(),
|
||||
flags::NumTemporalLayers(),
|
||||
flags::LossPercent(),
|
||||
flags::LinkCapacity(),
|
||||
flags::QueueSize(),
|
||||
|
Reference in New Issue
Block a user