OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 MOCK_METHOD1(UpdateRtt, void(int64_t rttMs)); | 68 MOCK_METHOD1(UpdateRtt, void(int64_t rttMs)); |
69 MOCK_METHOD3(UpdateEstimate, | 69 MOCK_METHOD3(UpdateEstimate, |
70 void(int64_t frameDelayMs, | 70 void(int64_t frameDelayMs, |
71 uint32_t frameSizeBytes, | 71 uint32_t frameSizeBytes, |
72 bool incompleteFrame)); | 72 bool incompleteFrame)); |
73 MOCK_METHOD1(GetJitterEstimate, int(double rttMultiplier)); | 73 MOCK_METHOD1(GetJitterEstimate, int(double rttMultiplier)); |
74 }; | 74 }; |
75 | 75 |
76 class FrameObjectFake : public FrameObject { | 76 class FrameObjectFake : public FrameObject { |
77 public: | 77 public: |
78 bool GetBitstream(uint8_t* destination) const override { return true; } | |
79 | |
80 uint32_t Timestamp() const override { return timestamp; } | 78 uint32_t Timestamp() const override { return timestamp; } |
81 | 79 |
82 int64_t ReceivedTime() const override { return 0; } | 80 int64_t ReceivedTime() const override { return 0; } |
83 | 81 |
84 int64_t RenderTime() const override { return _renderTimeMs; } | 82 int64_t RenderTime() const override { return _renderTimeMs; } |
85 }; | 83 }; |
86 | 84 |
87 class TestFrameBuffer2 : public ::testing::Test { | 85 class TestFrameBuffer2 : public ::testing::Test { |
88 protected: | 86 protected: |
89 static constexpr int kMaxReferences = 5; | 87 static constexpr int kMaxReferences = 5; |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 EXPECT_EQ(pid, InsertFrame(pid + 1, 1, ts, true, pid)); | 412 EXPECT_EQ(pid, InsertFrame(pid + 1, 1, ts, true, pid)); |
415 EXPECT_EQ(pid, InsertFrame(pid + 2, 0, ts, false, pid + 1)); | 413 EXPECT_EQ(pid, InsertFrame(pid + 2, 0, ts, false, pid + 1)); |
416 EXPECT_EQ(pid, InsertFrame(pid + 2, 1, ts, true, pid + 1)); | 414 EXPECT_EQ(pid, InsertFrame(pid + 2, 1, ts, true, pid + 1)); |
417 EXPECT_EQ(pid, InsertFrame(pid + 3, 0, ts, false, pid + 2)); | 415 EXPECT_EQ(pid, InsertFrame(pid + 3, 0, ts, false, pid + 2)); |
418 EXPECT_EQ(pid + 3, InsertFrame(pid + 1, 0, ts, false, pid)); | 416 EXPECT_EQ(pid + 3, InsertFrame(pid + 1, 0, ts, false, pid)); |
419 EXPECT_EQ(pid + 3, InsertFrame(pid + 3, 1, ts, true, pid + 2)); | 417 EXPECT_EQ(pid + 3, InsertFrame(pid + 3, 1, ts, true, pid + 2)); |
420 } | 418 } |
421 | 419 |
422 } // namespace video_coding | 420 } // namespace video_coding |
423 } // namespace webrtc | 421 } // namespace webrtc |
OLD | NEW |