| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 360 |
| 361 if (file != rtc::kInvalidPlatformFileValue) { | 361 if (file != rtc::kInvalidPlatformFileValue) { |
| 362 // Make a keyframe appear as early as possible in the logs, to give actually | 362 // Make a keyframe appear as early as possible in the logs, to give actually |
| 363 // decodable output. | 363 // decodable output. |
| 364 RequestKeyFrame(); | 364 RequestKeyFrame(); |
| 365 } | 365 } |
| 366 } | 366 } |
| 367 | 367 |
| 368 // TODO(tommi): This method grabs a lock 6 times. | 368 // TODO(tommi): This method grabs a lock 6 times. |
| 369 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) { | 369 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) { |
| 370 // TODO(tommi): OnDecodedFrame grabs a lock, incidentally the same lock | |
| 371 // that OnSyncOffsetUpdated() and OnRenderedFrame() below grab. | |
| 372 stats_proxy_.OnDecodedFrame(); | |
| 373 | |
| 374 int64_t sync_offset_ms; | 370 int64_t sync_offset_ms; |
| 375 double estimated_freq_khz; | 371 double estimated_freq_khz; |
| 376 // TODO(tommi): GetStreamSyncOffsetInMs grabs three locks. One inside the | 372 // TODO(tommi): GetStreamSyncOffsetInMs grabs three locks. One inside the |
| 377 // function itself, another in GetChannel() and a third in | 373 // function itself, another in GetChannel() and a third in |
| 378 // GetPlayoutTimestamp. Seems excessive. Anyhow, I'm assuming the function | 374 // GetPlayoutTimestamp. Seems excessive. Anyhow, I'm assuming the function |
| 379 // succeeds most of the time, which leads to grabbing a fourth lock. | 375 // succeeds most of the time, which leads to grabbing a fourth lock. |
| 380 if (rtp_stream_sync_.GetStreamSyncOffsetInMs(video_frame.timestamp(), | 376 if (rtp_stream_sync_.GetStreamSyncOffsetInMs(video_frame.timestamp(), |
| 381 video_frame.render_time_ms(), | 377 video_frame.render_time_ms(), |
| 382 &sync_offset_ms, | 378 &sync_offset_ms, |
| 383 &estimated_freq_khz)) { | 379 &estimated_freq_khz)) { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 if (video_receiver_.Decode(frame.get()) == VCM_OK) | 487 if (video_receiver_.Decode(frame.get()) == VCM_OK) |
| 492 rtp_stream_receiver_.FrameDecoded(frame->picture_id); | 488 rtp_stream_receiver_.FrameDecoded(frame->picture_id); |
| 493 } else { | 489 } else { |
| 494 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs | 490 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs |
| 495 << " ms, requesting keyframe."; | 491 << " ms, requesting keyframe."; |
| 496 RequestKeyFrame(); | 492 RequestKeyFrame(); |
| 497 } | 493 } |
| 498 } | 494 } |
| 499 } // namespace internal | 495 } // namespace internal |
| 500 } // namespace webrtc | 496 } // namespace webrtc |
| OLD | NEW |