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;
|
static_cast<int>(config_.max_bitrate_kbps) * 1000;
|
||||||
stream->max_framerate = config_.fps;
|
stream->max_framerate = config_.fps;
|
||||||
stream->max_qp = 56;
|
stream->max_qp = 56;
|
||||||
|
if (config_.num_temporal_layers != 0) {
|
||||||
|
stream->temporal_layer_thresholds_bps.resize(config_.num_temporal_layers -
|
||||||
|
1);
|
||||||
|
}
|
||||||
return encoder_config;
|
return encoder_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class Loopback {
|
|||||||
size_t max_bitrate_kbps;
|
size_t max_bitrate_kbps;
|
||||||
int32_t min_transmit_bitrate_kbps;
|
int32_t min_transmit_bitrate_kbps;
|
||||||
std::string codec;
|
std::string codec;
|
||||||
|
size_t num_temporal_layers;
|
||||||
int32_t loss_percent;
|
int32_t loss_percent;
|
||||||
int32_t link_capacity_kbps;
|
int32_t link_capacity_kbps;
|
||||||
int32_t queue_size;
|
int32_t queue_size;
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ void Loopback() {
|
|||||||
flags::MaxBitrate(),
|
flags::MaxBitrate(),
|
||||||
flags::MinTransmitBitrate(),
|
flags::MinTransmitBitrate(),
|
||||||
flags::Codec(),
|
flags::Codec(),
|
||||||
|
0, // Default number of temporal layers.
|
||||||
flags::LossPercent(),
|
flags::LossPercent(),
|
||||||
flags::LinkCapacity(),
|
flags::LinkCapacity(),
|
||||||
flags::QueueSize(),
|
flags::QueueSize(),
|
||||||
|
|||||||
@@ -103,6 +103,15 @@ DEFINE_string(
|
|||||||
"E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/"
|
"E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/"
|
||||||
" will assign the group Enable to field trial WebRTC-FooFeature. Multiple "
|
" will assign the group Enable to field trial WebRTC-FooFeature. Multiple "
|
||||||
"trials are separated by \"/\"");
|
"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
|
} // namespace flags
|
||||||
|
|
||||||
void Loopback() {
|
void Loopback() {
|
||||||
@@ -114,6 +123,7 @@ void Loopback() {
|
|||||||
flags::MaxBitrate(),
|
flags::MaxBitrate(),
|
||||||
0, // No min transmit bitrate.
|
0, // No min transmit bitrate.
|
||||||
flags::Codec(),
|
flags::Codec(),
|
||||||
|
flags::NumTemporalLayers(),
|
||||||
flags::LossPercent(),
|
flags::LossPercent(),
|
||||||
flags::LinkCapacity(),
|
flags::LinkCapacity(),
|
||||||
flags::QueueSize(),
|
flags::QueueSize(),
|
||||||
|
|||||||
Reference in New Issue
Block a user