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

Unified Diff: content/browser/renderer_host/media/video_capture_buffer_pool.cc

Issue 22875047: EVEA cleanup: use video utility functions in media::* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: b2b1b2ee Last comments. Created 7 years, 4 months 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 | content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_buffer_pool.cc
diff --git a/content/browser/renderer_host/media/video_capture_buffer_pool.cc b/content/browser/renderer_host/media/video_capture_buffer_pool.cc
index 207f86a99f3df42cea42f8402ddaf3dacdd2f856..3e30834feb2ca8a17788ddd94cf3b0ade2147eb9 100644
--- a/content/browser/renderer_host/media/video_capture_buffer_pool.cc
+++ b/content/browser/renderer_host/media/video_capture_buffer_pool.cc
@@ -128,8 +128,12 @@ int VideoCaptureBufferPool::RecognizeReservedBuffer(
scoped_refptr<media::VideoFrame> VideoCaptureBufferPool::ReserveI420VideoFrame(
const gfx::Size& size,
int rotation) {
- if (static_cast<size_t>(size.GetArea() * 3 / 2) != GetMemorySize())
+ if (GetMemorySize() !=
+ media::VideoFrame::AllocationSize(media::VideoFrame::I420, size)) {
+ DCHECK_EQ(GetMemorySize(),
+ media::VideoFrame::AllocationSize(media::VideoFrame::I420, size));
return NULL;
+ }
base::AutoLock lock(lock_);
@@ -151,6 +155,7 @@ scoped_refptr<media::VideoFrame> VideoCaptureBufferPool::ReserveI420VideoFrame(
gfx::Rect(size),
size,
static_cast<uint8*>(buffer->shared_memory.memory()),
+ GetMemorySize(),
buffer->shared_memory.handle(),
base::TimeDelta(),
disposal_handler);
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698