diff options
author | magjed@webrtc.org <magjed@webrtc.org> | 2015-03-12 13:11:25 +0000 |
---|---|---|
committer | magjed@webrtc.org <magjed@webrtc.org> | 2015-03-12 13:11:43 +0000 |
commit | afdd5dd372d69be7244a3d90d70de9d5ecd60eb9 (patch) | |
tree | 21d422b35f3d261dc9e7f301b2742369fff7f730 /talk/media/base/videoframe.h | |
parent | b73758d57a992807c2881690210300b2661143e1 (diff) | |
download | webrtc-afdd5dd372d69be7244a3d90d70de9d5ecd60eb9.tar.gz |
Revert "Revert "Remove frame copy from cricket::VideoFrame to I420VideoFrame""
This reverts r8683 and is a reland of r8682.
Reason for revert: The thread checker in Chromium that crashed has been fixed now.
BUG=1128
TBR=tommi,pbos,pthatcher
Review URL: https://webrtc-codereview.appspot.com/40319004
Cr-Commit-Position: refs/heads/master@{#8696}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8696 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'talk/media/base/videoframe.h')
-rw-r--r-- | talk/media/base/videoframe.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/talk/media/base/videoframe.h b/talk/media/base/videoframe.h index b41965df12..0ba01672e7 100644 --- a/talk/media/base/videoframe.h +++ b/talk/media/base/videoframe.h @@ -30,6 +30,7 @@ #include "webrtc/base/basictypes.h" #include "webrtc/base/stream.h" +#include "webrtc/common_video/interface/video_frame_buffer.h" #include "webrtc/common_video/rotation.h" namespace cricket { @@ -107,6 +108,14 @@ class VideoFrame { // longer in use, so the underlying resource can be freed. virtual void* GetNativeHandle() const = 0; + // Returns the underlying video frame buffer. The default implementation + // returns a shallow wrapper, converting itself into a + // webrtc::VideoFrameBuffer. This function is ok to call multiple times, but + // the returned object will refer to the same memory. + // TODO(magjed): Make pure virtual when all subclasses implement this. + virtual rtc::scoped_refptr<webrtc::VideoFrameBuffer> GetVideoFrameBuffer() + const; + // For retrieving the aspect ratio of each pixel. Usually this is 1x1, but // the aspect_ratio_idc parameter of H.264 can specify non-square pixels. virtual size_t GetPixelWidth() const = 0; |