Moved check for native frame to VideoReceiveStream::FrameCallback.

Stats for decoded framerate will now also be updated if the frame is backed by a texture.

BUG=webrtc:4722
R=mflodman@webrtc.org, pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/53569004

Cr-Commit-Position: refs/heads/master@{#9389}
This commit is contained in:
Åsa Persson
2015-06-08 09:26:32 +02:00
parent 8f622a9f83
commit 1aff095b6c
2 changed files with 8 additions and 7 deletions

View File

@@ -297,8 +297,11 @@ bool VideoReceiveStream::DeliverRtp(const uint8_t* packet, size_t length) {
void VideoReceiveStream::FrameCallback(VideoFrame* video_frame) {
stats_proxy_->OnDecodedFrame();
// Post processing is not supported if the frame is backed by a texture.
if (video_frame->native_handle() == NULL) {
if (config_.pre_render_callback)
config_.pre_render_callback->FrameCallback(video_frame);
}
}
int VideoReceiveStream::RenderFrame(const uint32_t /*stream_id*/,

View File

@@ -1430,11 +1430,9 @@ int32_t ViEChannel::FrameToRender(VideoFrame& video_frame) { // NOLINT
}
decoder_reset_ = false;
}
// Post processing is not supported if the frame is backed by a texture.
if (video_frame.native_handle() == NULL) {
if (pre_render_callback_ != NULL)
pre_render_callback_->FrameCallback(&video_frame);
}
incoming_video_stream_->RenderFrame(channel_id_, video_frame);
return 0;