Chromium Code Reviews| 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 | 10 |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 374 rtp_stream_sync_.ConfigureSync(-1, nullptr); | 374 rtp_stream_sync_.ConfigureSync(-1, nullptr); |
| 375 } | 375 } |
| 376 } | 376 } |
| 377 | 377 |
| 378 VideoReceiveStream::Stats VideoReceiveStream::GetStats() const { | 378 VideoReceiveStream::Stats VideoReceiveStream::GetStats() const { |
| 379 return stats_proxy_.GetStats(); | 379 return stats_proxy_.GetStats(); |
| 380 } | 380 } |
| 381 | 381 |
| 382 // TODO(tommi): This method grabs a lock 6 times. | 382 // TODO(tommi): This method grabs a lock 6 times. |
| 383 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) { | 383 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) { |
| 384 // TODO(tommi): OnDecodedFrame grabs a lock, incidentally the same lock | |
| 385 // that OnSyncOffsetUpdated() and OnRenderedFrame() below grab. | |
| 386 stats_proxy_.OnDecodedFrame(); | |
| 387 | |
|
hbos
2017/01/25 11:31:13
Why is this no longer called?
sakal
2017/01/25 12:39:34
It is called from VideoStreamDecoder::FrameToRende
| |
| 388 int64_t sync_offset_ms; | 384 int64_t sync_offset_ms; |
| 389 double estimated_freq_khz; | 385 double estimated_freq_khz; |
| 390 // TODO(tommi): GetStreamSyncOffsetInMs grabs three locks. One inside the | 386 // TODO(tommi): GetStreamSyncOffsetInMs grabs three locks. One inside the |
| 391 // function itself, another in GetChannel() and a third in | 387 // function itself, another in GetChannel() and a third in |
| 392 // GetPlayoutTimestamp. Seems excessive. Anyhow, I'm assuming the function | 388 // GetPlayoutTimestamp. Seems excessive. Anyhow, I'm assuming the function |
| 393 // succeeds most of the time, which leads to grabbing a fourth lock. | 389 // succeeds most of the time, which leads to grabbing a fourth lock. |
| 394 if (rtp_stream_sync_.GetStreamSyncOffsetInMs(video_frame, &sync_offset_ms, | 390 if (rtp_stream_sync_.GetStreamSyncOffsetInMs(video_frame, &sync_offset_ms, |
| 395 &estimated_freq_khz)) { | 391 &estimated_freq_khz)) { |
| 396 // TODO(tommi): OnSyncOffsetUpdated grabs a lock. | 392 // TODO(tommi): OnSyncOffsetUpdated grabs a lock. |
| 397 stats_proxy_.OnSyncOffsetUpdated(sync_offset_ms, estimated_freq_khz); | 393 stats_proxy_.OnSyncOffsetUpdated(sync_offset_ms, estimated_freq_khz); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 487 RequestKeyFrame(); | 483 RequestKeyFrame(); |
| 488 } | 484 } |
| 489 } | 485 } |
| 490 | 486 |
| 491 void VideoReceiveStream::RequestKeyFrame() { | 487 void VideoReceiveStream::RequestKeyFrame() { |
| 492 rtp_stream_receiver_.RequestKeyFrame(); | 488 rtp_stream_receiver_.RequestKeyFrame(); |
| 493 } | 489 } |
| 494 | 490 |
| 495 } // namespace internal | 491 } // namespace internal |
| 496 } // namespace webrtc | 492 } // namespace webrtc |
| OLD | NEW |