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 2942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2953 expected_height /= 2; | 2953 expected_height /= 2; |
2954 } | 2954 } |
2955 } | 2955 } |
2956 | 2956 |
2957 void CompareConsecutiveFrames(const RTPHeader& header, | 2957 void CompareConsecutiveFrames(const RTPHeader& header, |
2958 const RTPVideoHeader& video) const { | 2958 const RTPVideoHeader& video) const { |
2959 const RTPVideoHeaderVP9& vp9 = video.codecHeader.VP9; | 2959 const RTPVideoHeaderVP9& vp9 = video.codecHeader.VP9; |
2960 | 2960 |
2961 bool new_frame = packets_sent_ == 0 || | 2961 bool new_frame = packets_sent_ == 0 || |
2962 IsNewerTimestamp(header.timestamp, last_header_.timestamp); | 2962 IsNewerTimestamp(header.timestamp, last_header_.timestamp); |
2963 EXPECT_EQ(new_frame, video.isFirstPacket); | 2963 EXPECT_EQ(new_frame, video.is_first_packet_in_frame); |
2964 if (!new_frame) { | 2964 if (!new_frame) { |
2965 EXPECT_FALSE(last_header_.markerBit); | 2965 EXPECT_FALSE(last_header_.markerBit); |
2966 EXPECT_EQ(last_header_.timestamp, header.timestamp); | 2966 EXPECT_EQ(last_header_.timestamp, header.timestamp); |
2967 EXPECT_EQ(last_vp9_.picture_id, vp9.picture_id); | 2967 EXPECT_EQ(last_vp9_.picture_id, vp9.picture_id); |
2968 EXPECT_EQ(last_vp9_.temporal_idx, vp9.temporal_idx); | 2968 EXPECT_EQ(last_vp9_.temporal_idx, vp9.temporal_idx); |
2969 EXPECT_EQ(last_vp9_.tl0_pic_idx, vp9.tl0_pic_idx); | 2969 EXPECT_EQ(last_vp9_.tl0_pic_idx, vp9.tl0_pic_idx); |
2970 VerifySpatialIdxWithinFrame(vp9); | 2970 VerifySpatialIdxWithinFrame(vp9); |
2971 return; | 2971 return; |
2972 } | 2972 } |
2973 // New frame. | 2973 // New frame. |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3236 private: | 3236 private: |
3237 Call* call_; | 3237 Call* call_; |
3238 rtc::CriticalSection crit_; | 3238 rtc::CriticalSection crit_; |
3239 uint32_t max_bitrate_kbps_ GUARDED_BY(&crit_); | 3239 uint32_t max_bitrate_kbps_ GUARDED_BY(&crit_); |
3240 } test; | 3240 } test; |
3241 | 3241 |
3242 RunBaseTest(&test); | 3242 RunBaseTest(&test); |
3243 } | 3243 } |
3244 | 3244 |
3245 } // namespace webrtc | 3245 } // namespace webrtc |
OLD | NEW |