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

Unified Diff: media/base/video_frame.h

Issue 48113011: Remove media::VideoFrame from media::VideoCaptureDevice::Client interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: ffdbaeb83 Trybot failures. Created 7 years, 1 month 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 | « content/renderer/media/video_capture_impl.cc ('k') | 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 e6069305f2e0108248c740bcb0f6e21ee3e5fed2..ed554a1b390e8f7f892012bea686b778d2a96bfa 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -135,12 +135,13 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
// least as large as 4*visible_rect().width()*visible_rect().height().
void ReadPixelsFromNativeTexture(const SkBitmap& pixels);
- // Wraps image data in a buffer backed by a base::SharedMemoryHandle with a
- // VideoFrame. The image data resides in |data| and is assumed to be packed
- // tightly in a buffer of logical dimensions |coded_size| with the appropriate
- // bit depth and plane count as given by |format|. When the frame is
- // destroyed |no_longer_needed_cb.Run()| will be called.
- static scoped_refptr<VideoFrame> WrapExternalSharedMemory(
+ // Wraps packed image data residing in a memory buffer with a VideoFrame.
+ // The image data resides in |data| and is assumed to be packed tightly in a
+ // buffer of logical dimensions |coded_size| with the appropriate bit depth
+ // and plane count as given by |format|. The shared memory handle of the
+ // backing allocation, if present, can be passed in with |handle|. When the
+ // frame is destroyed, |no_longer_needed_cb.Run()| will be called.
+ static scoped_refptr<VideoFrame> WrapExternalPackedMemory(
Format format,
const gfx::Size& coded_size,
const gfx::Rect& visible_rect,
@@ -194,6 +195,12 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
// given coded size and format.
static size_t AllocationSize(Format format, const gfx::Size& coded_size);
+ // Returns the required allocation size for a (tightly packed) plane of the
+ // given coded size and format.
+ static size_t PlaneAllocationSize(Format format,
+ size_t plane,
+ const gfx::Size& coded_size);
+
Format format() const { return format_; }
const gfx::Size& coded_size() const { return coded_size_; }
« no previous file with comments | « content/renderer/media/video_capture_impl.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698