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

Unified Diff: content/browser/media/capture/content_video_capture_device_core.cc

Issue 1064703002: VideoCaptureBufferPool: Refactor to allow support of non-ShMem backed buffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: miu@s nits Created 5 years, 8 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/media/capture/desktop_capture_device_aura_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/content_video_capture_device_core.cc
diff --git a/content/browser/media/capture/content_video_capture_device_core.cc b/content/browser/media/capture/content_video_capture_device_core.cc
index 5030f6d633005666cc4961f9d52ee99a1d698b20..3c507c6f46b6fcbe5811067de64ac6bd0fb641fb 100644
--- a/content/browser/media/capture/content_video_capture_device_core.cc
+++ b/content/browser/media/capture/content_video_capture_device_core.cc
@@ -67,10 +67,6 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
if (!client_)
return false; // Capture is stopped.
- const media::VideoFrame::Format video_frame_format =
- params_.requested_format.pixel_format == media::PIXEL_FORMAT_TEXTURE ?
- media::VideoFrame::NATIVE_TEXTURE : media::VideoFrame::I420;
-
if (capture_size_.IsEmpty())
capture_size_ = max_frame_size();
const gfx::Size visible_size = capture_size_;
@@ -80,7 +76,8 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
(visible_size.height() + 15) & ~15);
scoped_refptr<media::VideoCaptureDevice::Client::Buffer> output_buffer =
- client_->ReserveOutputBuffer(video_frame_format, coded_size);
+ client_->ReserveOutputBuffer(params_.requested_format.pixel_format,
+ coded_size);
const bool should_capture =
oracle_.ObserveEventAndDecideCapture(event, damage_rect, event_time);
const char* event_name =
@@ -120,9 +117,9 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
"trigger", event_name);
// NATIVE_TEXTURE frames wrap a texture mailbox, which we don't have at the
// moment. We do not construct those frames.
- if (video_frame_format != media::VideoFrame::NATIVE_TEXTURE) {
+ if (params_.requested_format.pixel_format != media::PIXEL_FORMAT_TEXTURE) {
*storage = media::VideoFrame::WrapExternalPackedMemory(
- video_frame_format,
+ media::VideoFrame::I420,
coded_size,
gfx::Rect(visible_size),
visible_size,
« no previous file with comments | « no previous file | content/browser/media/capture/desktop_capture_device_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698