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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h

Issue 2911193002: Implement timing frames. (Closed)
Patch Set: Fix capture timestamp issues which cause capture time from the future Created 3 years, 6 months 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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
11 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_
12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ 12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_
13 13
14 #include <algorithm> 14 #include <algorithm>
15 #include <map> 15 #include <map>
16 #include <memory> 16 #include <memory>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/api/video/i420_buffer.h" 19 #include "webrtc/api/video/i420_buffer.h"
20 #include "webrtc/api/video/video_frame.h" 20 #include "webrtc/api/video/video_frame.h"
21 #include "webrtc/base/checks.h" 21 #include "webrtc/base/checks.h"
22 #include "webrtc/common_video/include/video_frame.h" 22 #include "webrtc/common_video/include/video_frame.h"
23 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 23 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
24 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" 24 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
25 #include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h" 25 #include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h"
26 #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" 26 #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
27 #include "webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h" 27 #include "webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h"
28 #include "webrtc/modules/video_coding/include/video_coding_defines.h"
28 #include "webrtc/test/gtest.h" 29 #include "webrtc/test/gtest.h"
29 30
30 using ::testing::_; 31 using ::testing::_;
31 using ::testing::AllOf; 32 using ::testing::AllOf;
32 using ::testing::Field; 33 using ::testing::Field;
33 using ::testing::Return; 34 using ::testing::Return;
34 35
35 namespace webrtc { 36 namespace webrtc {
36 namespace testing { 37 namespace testing {
37 38
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // 96 to 127 dynamic payload types for video codecs 205 // 96 to 127 dynamic payload types for video codecs
205 settings->plType = 120; 206 settings->plType = 120;
206 settings->startBitrate = 300; 207 settings->startBitrate = 300;
207 settings->minBitrate = 30; 208 settings->minBitrate = 30;
208 settings->maxBitrate = 0; 209 settings->maxBitrate = 0;
209 settings->maxFramerate = 30; 210 settings->maxFramerate = 30;
210 settings->width = kDefaultWidth; 211 settings->width = kDefaultWidth;
211 settings->height = kDefaultHeight; 212 settings->height = kDefaultHeight;
212 settings->numberOfSimulcastStreams = kNumberOfSimulcastStreams; 213 settings->numberOfSimulcastStreams = kNumberOfSimulcastStreams;
213 ASSERT_EQ(3, kNumberOfSimulcastStreams); 214 ASSERT_EQ(3, kNumberOfSimulcastStreams);
215 settings->timingFrameTriggerThresholds = {kDefaultTimingFramesDelayMs,
216 kDefaultOutlierFrameSizePercent};
214 ConfigureStream(kDefaultWidth / 4, kDefaultHeight / 4, kMaxBitrates[0], 217 ConfigureStream(kDefaultWidth / 4, kDefaultHeight / 4, kMaxBitrates[0],
215 kMinBitrates[0], kTargetBitrates[0], 218 kMinBitrates[0], kTargetBitrates[0],
216 &settings->simulcastStream[0], temporal_layer_profile[0]); 219 &settings->simulcastStream[0], temporal_layer_profile[0]);
217 ConfigureStream(kDefaultWidth / 2, kDefaultHeight / 2, kMaxBitrates[1], 220 ConfigureStream(kDefaultWidth / 2, kDefaultHeight / 2, kMaxBitrates[1],
218 kMinBitrates[1], kTargetBitrates[1], 221 kMinBitrates[1], kTargetBitrates[1],
219 &settings->simulcastStream[1], temporal_layer_profile[1]); 222 &settings->simulcastStream[1], temporal_layer_profile[1]);
220 ConfigureStream(kDefaultWidth, kDefaultHeight, kMaxBitrates[2], 223 ConfigureStream(kDefaultWidth, kDefaultHeight, kMaxBitrates[2],
221 kMinBitrates[2], kTargetBitrates[2], 224 kMinBitrates[2], kTargetBitrates[2],
222 &settings->simulcastStream[2], temporal_layer_profile[2]); 225 &settings->simulcastStream[2], temporal_layer_profile[2]);
223 settings->VP8()->resilience = kResilientStream; 226 settings->VP8()->resilience = kResilientStream;
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 VideoCodec settings_; 751 VideoCodec settings_;
749 rtc::scoped_refptr<I420Buffer> input_buffer_; 752 rtc::scoped_refptr<I420Buffer> input_buffer_;
750 std::unique_ptr<VideoFrame> input_frame_; 753 std::unique_ptr<VideoFrame> input_frame_;
751 std::unique_ptr<SimulcastRateAllocator> rate_allocator_; 754 std::unique_ptr<SimulcastRateAllocator> rate_allocator_;
752 }; 755 };
753 756
754 } // namespace testing 757 } // namespace testing
755 } // namespace webrtc 758 } // namespace webrtc
756 759
757 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ 760 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698