Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: webrtc/modules/video_coding/main/source/video_coding_robustness_unittest.cc

Issue 1428293003: Add VideoCodec::PreferDecodeLate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed SetExpectedRendererDelay bug Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 27 matching lines...) Expand all
38 vcm_ = VideoCodingModule::Create(clock_.get(), &event_factory_); 38 vcm_ = VideoCodingModule::Create(clock_.get(), &event_factory_);
39 ASSERT_TRUE(vcm_ != NULL); 39 ASSERT_TRUE(vcm_ != NULL);
40 const size_t kMaxNackListSize = 250; 40 const size_t kMaxNackListSize = 250;
41 const int kMaxPacketAgeToNack = 450; 41 const int kMaxPacketAgeToNack = 450;
42 vcm_->SetNackSettings(kMaxNackListSize, kMaxPacketAgeToNack, 0); 42 vcm_->SetNackSettings(kMaxNackListSize, kMaxPacketAgeToNack, 0);
43 ASSERT_EQ(0, vcm_->RegisterFrameTypeCallback(&frame_type_callback_)); 43 ASSERT_EQ(0, vcm_->RegisterFrameTypeCallback(&frame_type_callback_));
44 ASSERT_EQ(0, vcm_->RegisterPacketRequestCallback(&request_callback_)); 44 ASSERT_EQ(0, vcm_->RegisterPacketRequestCallback(&request_callback_));
45 ASSERT_EQ(VCM_OK, vcm_->Codec(kVideoCodecVP8, &video_codec_)); 45 ASSERT_EQ(VCM_OK, vcm_->Codec(kVideoCodecVP8, &video_codec_));
46 ASSERT_EQ(VCM_OK, vcm_->RegisterReceiveCodec(&video_codec_, 1)); 46 ASSERT_EQ(VCM_OK, vcm_->RegisterReceiveCodec(&video_codec_, 1));
47 ASSERT_EQ(VCM_OK, vcm_->RegisterExternalDecoder(&decoder_, 47 ASSERT_EQ(VCM_OK, vcm_->RegisterExternalDecoder(&decoder_,
48 video_codec_.plType, 48 video_codec_.plType));
49 true));
50 } 49 }
51 50
52 virtual void TearDown() { 51 virtual void TearDown() {
53 VideoCodingModule::Destroy(vcm_); 52 VideoCodingModule::Destroy(vcm_);
54 } 53 }
55 54
56 void InsertPacket(uint32_t timestamp, 55 void InsertPacket(uint32_t timestamp,
57 uint16_t seq_no, 56 uint16_t seq_no,
58 bool first, 57 bool first,
59 bool marker_bit, 58 bool marker_bit,
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 228
230 clock_->AdvanceTimeMilliseconds(23); 229 clock_->AdvanceTimeMilliseconds(23);
231 InsertPacket(3000, 4, false, false, kVideoFrameDelta); 230 InsertPacket(3000, 4, false, false, kVideoFrameDelta);
232 231
233 InsertPacket(9000, 9, true, false, kVideoFrameDelta); 232 InsertPacket(9000, 9, true, false, kVideoFrameDelta);
234 InsertPacket(9000, 10, false, false, kVideoFrameDelta); 233 InsertPacket(9000, 10, false, false, kVideoFrameDelta);
235 InsertPacket(9000, 11, false, true, kVideoFrameDelta); 234 InsertPacket(9000, 11, false, true, kVideoFrameDelta);
236 EXPECT_EQ(VCM_OK, vcm_->Decode(0)); // Decode timestamp 9000 complete. 235 EXPECT_EQ(VCM_OK, vcm_->Decode(0)); // Decode timestamp 9000 complete.
237 } 236 }
238 } // namespace webrtc 237 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698