Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Unified Diff: media/base/video_frame.h

Issue 101623006: Created VideoFramePool to avoid unnecessary VideoFrame alloc/free. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change SimpleFormatChange test so it can pass on Android. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/video_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.h
diff --git a/media/base/video_frame.h b/media/base/video_frame.h
index dc0932043b90a89e9e91ff801adb8db8c612732a..8a63cd3513fa888e95c639c7648e915244d9d5dc 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -169,6 +169,12 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
base::TimeDelta timestamp,
const base::Closure& no_longer_needed_cb);
+ // Wraps |frame| and calls |no_longer_needed_cb| when the wrapper VideoFrame
+ // gets destroyed.
+ static scoped_refptr<VideoFrame> WrapVideoFrame(
+ const scoped_refptr<VideoFrame>& frame,
+ const base::Closure& no_longer_needed_cb);
+
// Creates a frame which indicates end-of-stream.
static scoped_refptr<VideoFrame> CreateEOSFrame();
« no previous file with comments | « no previous file | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698