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

Side by Side Diff: webrtc/video/full_stack.cc

Issue 1333483002: Wire up PacketTime to ReceiveStreams. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/packet_injection_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/packet_injection_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698