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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 373 | 373 |
| 374 // Post processing is not supported if the frame is backed by a texture. | 374 // Post processing is not supported if the frame is backed by a texture. |
| 375 if (video_frame->native_handle() == NULL) { | 375 if (video_frame->native_handle() == NULL) { |
| 376 if (config_.pre_render_callback) | 376 if (config_.pre_render_callback) |
| 377 config_.pre_render_callback->FrameCallback(video_frame); | 377 config_.pre_render_callback->FrameCallback(video_frame); |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 | 380 |
| 381 int VideoReceiveStream::RenderFrame(const uint32_t /*stream_id*/, | 381 int VideoReceiveStream::RenderFrame(const uint32_t /*stream_id*/, |
| 382 const VideoFrame& video_frame) { | 382 const VideoFrame& video_frame) { |
| 383 int64_t sync_offset_ms; | |
| 384 if (vie_sync_.GetStreamSyncOffsetInMs(video_frame, &sync_offset_ms)) | |
| 385 stats_proxy_.OnSyncOffsetUpdated(sync_offset_ms); | |
|
stefan-webrtc
2016/03/09 15:59:30
Nice, thanks!
I wonder if we instead should expos
åsapersson
2016/03/10 09:08:35
Sounds good. Maybe as a later improvement?
stefan-webrtc
2016/03/10 14:25:09
Yes
| |
| 386 | |
| 383 // TODO(pbos): Wire up config_.render->IsTextureSupported() and convert if not | 387 // TODO(pbos): Wire up config_.render->IsTextureSupported() and convert if not |
| 384 // supported. Or provide methods for converting a texture frame in | 388 // supported. Or provide methods for converting a texture frame in |
| 385 // VideoFrame. | 389 // VideoFrame. |
| 386 | 390 |
| 387 if (config_.renderer != nullptr) | 391 if (config_.renderer != nullptr) |
| 388 config_.renderer->RenderFrame( | 392 config_.renderer->RenderFrame( |
| 389 video_frame, | 393 video_frame, |
| 390 video_frame.render_time_ms() - clock_->TimeInMilliseconds()); | 394 video_frame.render_time_ms() - clock_->TimeInMilliseconds()); |
| 391 | 395 |
| 392 stats_proxy_.OnRenderedFrame(video_frame); | 396 stats_proxy_.OnRenderedFrame(video_frame); |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 419 return true; | 423 return true; |
| 420 } | 424 } |
| 421 | 425 |
| 422 void VideoReceiveStream::Decode() { | 426 void VideoReceiveStream::Decode() { |
| 423 static const int kMaxDecodeWaitTimeMs = 50; | 427 static const int kMaxDecodeWaitTimeMs = 50; |
| 424 vcm_->Decode(kMaxDecodeWaitTimeMs); | 428 vcm_->Decode(kMaxDecodeWaitTimeMs); |
| 425 } | 429 } |
| 426 | 430 |
| 427 } // namespace internal | 431 } // namespace internal |
| 428 } // namespace webrtc | 432 } // namespace webrtc |
| OLD | NEW |