| 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 <stdio.h> | 10 #include <stdio.h> |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 ~VideoAnalyzer() { | 130 ~VideoAnalyzer() { |
| 131 for (ThreadWrapper* thread : comparison_thread_pool_) { | 131 for (ThreadWrapper* thread : comparison_thread_pool_) { |
| 132 EXPECT_TRUE(thread->Stop()); | 132 EXPECT_TRUE(thread->Stop()); |
| 133 delete thread; | 133 delete thread; |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 | 136 |
| 137 virtual void SetReceiver(PacketReceiver* receiver) { receiver_ = receiver; } | 137 virtual void SetReceiver(PacketReceiver* receiver) { receiver_ = receiver; } |
| 138 | 138 |
| 139 DeliveryStatus DeliverPacket(MediaType media_type, const uint8_t* packet, | 139 DeliveryStatus DeliverPacket(MediaType media_type, |
| 140 size_t length) override { | 140 const uint8_t* packet, |
| 141 size_t length, |
| 142 const PacketTime& packet_time) override { |
| 141 rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create()); | 143 rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create()); |
| 142 RTPHeader header; | 144 RTPHeader header; |
| 143 parser->Parse(packet, length, &header); | 145 parser->Parse(packet, length, &header); |
| 144 { | 146 { |
| 145 rtc::CritScope lock(&crit_); | 147 rtc::CritScope lock(&crit_); |
| 146 recv_times_[header.timestamp - rtp_timestamp_delta_] = | 148 recv_times_[header.timestamp - rtp_timestamp_delta_] = |
| 147 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds(); | 149 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds(); |
| 148 } | 150 } |
| 149 | 151 |
| 150 return receiver_->DeliverPacket(media_type, packet, length); | 152 return receiver_->DeliverPacket(media_type, packet, length, packet_time); |
| 151 } | 153 } |
| 152 | 154 |
| 153 void IncomingCapturedFrame(const VideoFrame& video_frame) override { | 155 void IncomingCapturedFrame(const VideoFrame& video_frame) override { |
| 154 VideoFrame copy = video_frame; | 156 VideoFrame copy = video_frame; |
| 155 copy.set_timestamp(copy.ntp_time_ms() * 90); | 157 copy.set_timestamp(copy.ntp_time_ms() * 90); |
| 156 | 158 |
| 157 { | 159 { |
| 158 rtc::CritScope lock(&crit_); | 160 rtc::CritScope lock(&crit_); |
| 159 if (first_send_frame_.IsZeroSize() && rtp_timestamp_delta_ == 0) | 161 if (first_send_frame_.IsZeroSize() && rtp_timestamp_delta_ == 0) |
| 160 first_send_frame_ = copy; | 162 first_send_frame_ = copy; |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 50000, | 808 50000, |
| 807 200000, | 809 200000, |
| 808 2000000, | 810 2000000, |
| 809 0.0, | 811 0.0, |
| 810 0.0, | 812 0.0, |
| 811 kFullStackTestDurationSecs, | 813 kFullStackTestDurationSecs, |
| 812 "VP9"}; | 814 "VP9"}; |
| 813 RunTest(screenshare_params); | 815 RunTest(screenshare_params); |
| 814 } | 816 } |
| 815 } // namespace webrtc | 817 } // namespace webrtc |
| OLD | NEW |