Configure default render delay as 10 ms.

BUG=chromium:488395
R=mflodman@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/56419005

Cr-Commit-Position: refs/heads/master@{#9296}
This commit is contained in:
Peter Boström 2015-05-27 17:59:11 +02:00
parent cf808d2366
commit def39883f0
3 changed files with 8 additions and 2 deletions

View File

@ -1924,6 +1924,7 @@ TEST_F(EndToEndTest, ReportsSetEncoderRates) {
TEST_F(EndToEndTest, GetStats) {
static const int kStartBitrateBps = 3000000;
static const int kExpectedRenderDelayMs = 20;
class StatsObserver : public test::EndToEndTest, public I420FrameCallback {
public:
explicit StatsObserver(const FakeNetworkPipe::Config& config)
@ -1971,6 +1972,9 @@ TEST_F(EndToEndTest, GetStats) {
receive_stats_filled_["IncomingRate"] |=
stats.network_frame_rate != 0 || stats.total_bitrate_bps != 0;
receive_stats_filled_["RenderDelayAsHighAsExpected"] |=
stats.render_delay_ms >= kExpectedRenderDelayMs;
receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0;
receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0;
@ -2100,6 +2104,7 @@ TEST_F(EndToEndTest, GetStats) {
expected_send_ssrcs_.insert(ssrcs[i]);
expected_receive_ssrcs_.push_back(
(*receive_configs)[i].rtp.remote_ssrc);
(*receive_configs)[i].render_delay_ms = kExpectedRenderDelayMs;
}
}

View File

@ -229,7 +229,8 @@ VideoReceiveStream::VideoReceiveStream(int num_cpu_cores,
const Decoder& decoder = config_.decoders[i];
CHECK_EQ(0, vie_channel_->RegisterExternalDecoder(
decoder.payload_type, decoder.decoder, decoder.is_renderer,
decoder.expected_delay_ms));
decoder.is_renderer ? decoder.expected_delay_ms
: config.render_delay_ms));
VideoCodec codec = CreateDecoderVideoCodec(decoder);

View File

@ -92,7 +92,7 @@ class VideoReceiveStream {
struct Config {
Config()
: renderer(NULL),
render_delay_ms(0),
render_delay_ms(10),
audio_channel_id(-1),
pre_decode_callback(NULL),
pre_render_callback(NULL),