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:
@@ -297,8 +297,11 @@ bool VideoReceiveStream::DeliverRtp(const uint8_t* packet, size_t length) {
|
|||||||
void VideoReceiveStream::FrameCallback(VideoFrame* video_frame) {
|
void VideoReceiveStream::FrameCallback(VideoFrame* video_frame) {
|
||||||
stats_proxy_->OnDecodedFrame();
|
stats_proxy_->OnDecodedFrame();
|
||||||
|
|
||||||
if (config_.pre_render_callback)
|
// Post processing is not supported if the frame is backed by a texture.
|
||||||
config_.pre_render_callback->FrameCallback(video_frame);
|
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*/,
|
int VideoReceiveStream::RenderFrame(const uint32_t /*stream_id*/,
|
||||||
|
|||||||
@@ -1430,11 +1430,9 @@ int32_t ViEChannel::FrameToRender(VideoFrame& video_frame) { // NOLINT
|
|||||||
}
|
}
|
||||||
decoder_reset_ = false;
|
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)
|
||||||
if (pre_render_callback_ != NULL)
|
pre_render_callback_->FrameCallback(&video_frame);
|
||||||
pre_render_callback_->FrameCallback(&video_frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
incoming_video_stream_->RenderFrame(channel_id_, video_frame);
|
incoming_video_stream_->RenderFrame(channel_id_, video_frame);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user