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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 config_.pre_render_callback->FrameCallback(video_frame); | 381 config_.pre_render_callback->FrameCallback(video_frame); |
382 } | 382 } |
383 } | 383 } |
384 | 384 |
385 int VideoReceiveStream::RenderFrame(const uint32_t /*stream_id*/, | 385 int VideoReceiveStream::RenderFrame(const uint32_t /*stream_id*/, |
386 const VideoFrame& video_frame) { | 386 const VideoFrame& video_frame) { |
387 int64_t sync_offset_ms; | 387 int64_t sync_offset_ms; |
388 if (vie_sync_.GetStreamSyncOffsetInMs(video_frame, &sync_offset_ms)) | 388 if (vie_sync_.GetStreamSyncOffsetInMs(video_frame, &sync_offset_ms)) |
389 stats_proxy_.OnSyncOffsetUpdated(sync_offset_ms); | 389 stats_proxy_.OnSyncOffsetUpdated(sync_offset_ms); |
390 | 390 |
391 // TODO(pbos): Wire up config_.render->IsTextureSupported() and convert if not | |
392 // supported. Or provide methods for converting a texture frame in | |
393 // VideoFrame. | |
394 | |
395 if (config_.renderer != nullptr) | 391 if (config_.renderer != nullptr) |
396 config_.renderer->RenderFrame( | 392 config_.renderer->OnFrame(video_frame); |
397 video_frame, | |
398 video_frame.render_time_ms() - clock_->TimeInMilliseconds()); | |
399 | 393 |
400 stats_proxy_.OnRenderedFrame(video_frame); | 394 stats_proxy_.OnRenderedFrame(video_frame); |
401 | 395 |
402 return 0; | 396 return 0; |
403 } | 397 } |
404 | 398 |
405 // TODO(asapersson): Consider moving callback from video_encoder.h or | 399 // TODO(asapersson): Consider moving callback from video_encoder.h or |
406 // creating a different callback. | 400 // creating a different callback. |
407 int32_t VideoReceiveStream::Encoded( | 401 int32_t VideoReceiveStream::Encoded( |
408 const EncodedImage& encoded_image, | 402 const EncodedImage& encoded_image, |
(...skipping 27 matching lines...) Expand all Loading... |
436 const std::vector<uint16_t>& sequence_numbers) { | 430 const std::vector<uint16_t>& sequence_numbers) { |
437 rtp_rtcp_->SendNack(sequence_numbers); | 431 rtp_rtcp_->SendNack(sequence_numbers); |
438 } | 432 } |
439 | 433 |
440 void VideoReceiveStream::RequestKeyFrame() { | 434 void VideoReceiveStream::RequestKeyFrame() { |
441 rtp_rtcp_->RequestKeyFrame(); | 435 rtp_rtcp_->RequestKeyFrame(); |
442 } | 436 } |
443 | 437 |
444 } // namespace internal | 438 } // namespace internal |
445 } // namespace webrtc | 439 } // namespace webrtc |
OLD | NEW |