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

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

Issue 2385763002: Add stats for frequency offset when converting RTP timestamp to NTP time. (Closed)
Patch Set: Created 4 years, 2 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
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 10
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 return stats_proxy_.GetStats(); 329 return stats_proxy_.GetStats();
330 } 330 }
331 331
332 // TODO(tommi): This method grabs a lock 6 times. 332 // TODO(tommi): This method grabs a lock 6 times.
333 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) { 333 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) {
334 // TODO(tommi): OnDecodedFrame grabs a lock, incidentally the same lock 334 // TODO(tommi): OnDecodedFrame grabs a lock, incidentally the same lock
335 // that OnSyncOffsetUpdated() and OnRenderedFrame() below grab. 335 // that OnSyncOffsetUpdated() and OnRenderedFrame() below grab.
336 stats_proxy_.OnDecodedFrame(); 336 stats_proxy_.OnDecodedFrame();
337 337
338 int64_t sync_offset_ms; 338 int64_t sync_offset_ms;
339 double estimated_freq_khz;
339 // TODO(tommi): GetStreamSyncOffsetInMs grabs three locks. One inside the 340 // TODO(tommi): GetStreamSyncOffsetInMs grabs three locks. One inside the
340 // function itself, another in GetChannel() and a third in 341 // function itself, another in GetChannel() and a third in
341 // GetPlayoutTimestamp. Seems excessive. Anyhow, I'm assuming the function 342 // GetPlayoutTimestamp. Seems excessive. Anyhow, I'm assuming the function
342 // succeeds most of the time, which leads to grabbing a fourth lock. 343 // succeeds most of the time, which leads to grabbing a fourth lock.
343 if (rtp_stream_sync_.GetStreamSyncOffsetInMs(video_frame, &sync_offset_ms)) { 344 if (rtp_stream_sync_.GetStreamSyncOffsetInMs(video_frame, &sync_offset_ms,
345 &estimated_freq_khz)) {
344 // TODO(tommi): OnSyncOffsetUpdated grabs a lock. 346 // TODO(tommi): OnSyncOffsetUpdated grabs a lock.
345 stats_proxy_.OnSyncOffsetUpdated(sync_offset_ms); 347 stats_proxy_.OnSyncOffsetUpdated(sync_offset_ms, estimated_freq_khz);
346 } 348 }
347 349
348 // config_.renderer must never be null if we're getting this callback. 350 // config_.renderer must never be null if we're getting this callback.
349 config_.renderer->OnFrame(video_frame); 351 config_.renderer->OnFrame(video_frame);
350 352
351 // TODO(tommi): OnRenderFrame grabs a lock too. 353 // TODO(tommi): OnRenderFrame grabs a lock too.
352 stats_proxy_.OnRenderedFrame(video_frame); 354 stats_proxy_.OnRenderedFrame(video_frame);
353 } 355 }
354 356
355 // TODO(asapersson): Consider moving callback from video_encoder.h or 357 // TODO(asapersson): Consider moving callback from video_encoder.h or
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 RequestKeyFrame(); 411 RequestKeyFrame();
410 } 412 }
411 } 413 }
412 414
413 void VideoReceiveStream::RequestKeyFrame() { 415 void VideoReceiveStream::RequestKeyFrame() {
414 rtp_stream_receiver_.RequestKeyFrame(); 416 rtp_stream_receiver_.RequestKeyFrame();
415 } 417 }
416 418
417 } // namespace internal 419 } // namespace internal
418 } // namespace webrtc 420 } // namespace webrtc
OLDNEW
« webrtc/system_wrappers/source/rtp_to_ntp.cc ('K') | « webrtc/video/rtp_streams_synchronizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698