From d7fee8e7dd15c692e6946792b86d0806583e3b03 Mon Sep 17 00:00:00 2001 From: magjed Date: Tue, 28 Oct 2014 10:42:52 -0700 Subject: With this CL, the time for PepperVideoSourceHost::SendGetFrameReply drops from about 4ms to 0.7ms for each 720p frame. If the current video frame is of the same size as the previous frame, reuse the shared memory and overwrite the previous frame. Pepper does not hold onto a frame after it has been processed, and it indicates processing is done by sending a new request, so overwriting the previous frame should be fine. BUG=423365 Review URL: https://codereview.chromium.org/653873003 Cr-Commit-Position: refs/heads/master@{#301657} --- ppapi/cpp/private/video_source_private.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ppapi/cpp/private/video_source_private.h') diff --git a/ppapi/cpp/private/video_source_private.h b/ppapi/cpp/private/video_source_private.h index 3d919bf..487703e 100644 --- a/ppapi/cpp/private/video_source_private.h +++ b/ppapi/cpp/private/video_source_private.h @@ -61,7 +61,8 @@ class VideoSource_Private : public Resource { int32_t Open(const Var& stream_url, const CompletionCallback& cc); - /// Gets a frame from the video source. + /// Gets a frame from the video source. The returned frame is only valid + /// until the next call to GetFrame. /// /// @param[out] frame A VideoFrame_Private to hold a video /// frame from the source. -- cgit v1.1