OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <algorithm> // max | 10 #include <algorithm> // max |
(...skipping 2923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2934 expected_height /= 2; | 2934 expected_height /= 2; |
2935 } | 2935 } |
2936 } | 2936 } |
2937 | 2937 |
2938 void CompareConsecutiveFrames(const RTPHeader& header, | 2938 void CompareConsecutiveFrames(const RTPHeader& header, |
2939 const RTPVideoHeader& video) const { | 2939 const RTPVideoHeader& video) const { |
2940 const RTPVideoHeaderVP9& vp9 = video.codecHeader.VP9; | 2940 const RTPVideoHeaderVP9& vp9 = video.codecHeader.VP9; |
2941 | 2941 |
2942 bool new_frame = packets_sent_ == 0 || | 2942 bool new_frame = packets_sent_ == 0 || |
2943 IsNewerTimestamp(header.timestamp, last_header_.timestamp); | 2943 IsNewerTimestamp(header.timestamp, last_header_.timestamp); |
2944 EXPECT_EQ(new_frame, video.isFirstPacket); | 2944 EXPECT_EQ(new_frame, video.is_first_packet_in_frame); |
2945 if (!new_frame) { | 2945 if (!new_frame) { |
2946 EXPECT_FALSE(last_header_.markerBit); | 2946 EXPECT_FALSE(last_header_.markerBit); |
2947 EXPECT_EQ(last_header_.timestamp, header.timestamp); | 2947 EXPECT_EQ(last_header_.timestamp, header.timestamp); |
2948 EXPECT_EQ(last_vp9_.picture_id, vp9.picture_id); | 2948 EXPECT_EQ(last_vp9_.picture_id, vp9.picture_id); |
2949 EXPECT_EQ(last_vp9_.temporal_idx, vp9.temporal_idx); | 2949 EXPECT_EQ(last_vp9_.temporal_idx, vp9.temporal_idx); |
2950 EXPECT_EQ(last_vp9_.tl0_pic_idx, vp9.tl0_pic_idx); | 2950 EXPECT_EQ(last_vp9_.tl0_pic_idx, vp9.tl0_pic_idx); |
2951 VerifySpatialIdxWithinFrame(vp9); | 2951 VerifySpatialIdxWithinFrame(vp9); |
2952 return; | 2952 return; |
2953 } | 2953 } |
2954 // New frame. | 2954 // New frame. |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3211 private: | 3211 private: |
3212 Call* call_; | 3212 Call* call_; |
3213 rtc::CriticalSection crit_; | 3213 rtc::CriticalSection crit_; |
3214 uint32_t max_bitrate_kbps_ GUARDED_BY(&crit_); | 3214 uint32_t max_bitrate_kbps_ GUARDED_BY(&crit_); |
3215 } test; | 3215 } test; |
3216 | 3216 |
3217 RunBaseTest(&test); | 3217 RunBaseTest(&test); |
3218 } | 3218 } |
3219 | 3219 |
3220 } // namespace webrtc | 3220 } // namespace webrtc |
OLD | NEW |