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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 367 bool VideoReceiveStream::DeliverRtp(const uint8_t* packet, | 367 bool VideoReceiveStream::DeliverRtp(const uint8_t* packet, |
| 368 size_t length, | 368 size_t length, |
| 369 const PacketTime& packet_time) { | 369 const PacketTime& packet_time) { |
| 370 return vie_receiver_->DeliverRtp(packet, length, packet_time); | 370 return vie_receiver_->DeliverRtp(packet, length, packet_time); |
| 371 } | 371 } |
| 372 | 372 |
| 373 void VideoReceiveStream::FrameCallback(VideoFrame* video_frame) { | 373 void VideoReceiveStream::FrameCallback(VideoFrame* video_frame) { |
| 374 stats_proxy_.OnDecodedFrame(); | 374 stats_proxy_.OnDecodedFrame(); |
| 375 | 375 |
| 376 // Post processing is not supported if the frame is backed by a texture. | 376 // Post processing is not supported if the frame is backed by a texture. |
| 377 if (!video_frame->native_handle()) { | 377 // TODO(nisse): Is it allowed to have video_frame_buffer() return a |
|
perkj_webrtc
2016/04/13 05:44:08
no
| |
| 378 // nullptr here? | |
| 379 if (!video_frame->video_frame_buffer()->native_handle()) { | |
| 378 if (config_.pre_render_callback) | 380 if (config_.pre_render_callback) |
| 379 config_.pre_render_callback->FrameCallback(video_frame); | 381 config_.pre_render_callback->FrameCallback(video_frame); |
| 380 } | 382 } |
| 381 } | 383 } |
| 382 | 384 |
| 383 int VideoReceiveStream::RenderFrame(const uint32_t /*stream_id*/, | 385 int VideoReceiveStream::RenderFrame(const uint32_t /*stream_id*/, |
| 384 const VideoFrame& video_frame) { | 386 const VideoFrame& video_frame) { |
| 385 int64_t sync_offset_ms; | 387 int64_t sync_offset_ms; |
| 386 if (vie_sync_.GetStreamSyncOffsetInMs(video_frame, &sync_offset_ms)) | 388 if (vie_sync_.GetStreamSyncOffsetInMs(video_frame, &sync_offset_ms)) |
| 387 stats_proxy_.OnSyncOffsetUpdated(sync_offset_ms); | 389 stats_proxy_.OnSyncOffsetUpdated(sync_offset_ms); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 428 const std::vector<uint16_t>& sequence_numbers) { | 430 const std::vector<uint16_t>& sequence_numbers) { |
| 429 rtp_rtcp_->SendNack(sequence_numbers); | 431 rtp_rtcp_->SendNack(sequence_numbers); |
| 430 } | 432 } |
| 431 | 433 |
| 432 void VideoReceiveStream::RequestKeyFrame() { | 434 void VideoReceiveStream::RequestKeyFrame() { |
| 433 rtp_rtcp_->RequestKeyFrame(); | 435 rtp_rtcp_->RequestKeyFrame(); |
| 434 } | 436 } |
| 435 | 437 |
| 436 } // namespace internal | 438 } // namespace internal |
| 437 } // namespace webrtc | 439 } // namespace webrtc |
| OLD | NEW |