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

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: Add PoolImpl destructor to make clang on the bots happy. 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') | media/base/video_frame.cc » ('J')
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..a986b0ac7a0d52668b6992dfcc58e243ea79f256 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -169,6 +169,15 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
base::TimeDelta timestamp,
const base::Closure& no_longer_needed_cb);
+ // Wraps |frame| and calls |wrapper_destroyed_cb| when the wrapper VideoFrame
+ // gets destroyed.
+ typedef base::Callback<void(const scoped_refptr<VideoFrame>&)>
+ WrapperDestroyedCB;
+
+ static scoped_refptr<VideoFrame> WrapVideoFrame(
+ const scoped_refptr<VideoFrame>& frame,
+ const WrapperDestroyedCB& wrapper_destroyed_cb);
DaleCurtis 2013/12/09 20:48:25 Rename to no_longer_needed_cb for consistency with
acolwell GONE FROM CHROMIUM 2013/12/09 21:42:11 Done.
+
// 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') | media/base/video_frame.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698