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

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

Issue 1016773002: MJPEG acceleration for video capture using VAAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/browser/media/capture/web_contents_video_capture_device_unittest.cc
diff --git a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
index 8b24ed798021ee8e4b6da1059bf0f2d09cd4477e..c2e461ef39e3475bc5da9a32bcef5e3a7a0558fb 100644
--- a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
+++ b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
@@ -346,9 +346,10 @@ class StubClient : public media::VideoCaptureDevice::Client {
return NULL;
void* data;
size_t size;
- buffer_pool_->GetBufferInfo(buffer_id, &data, &size);
+ base::SharedMemoryHandle handle;
+ buffer_pool_->GetBufferInfo(buffer_id, &data, &size, &handle);
return scoped_refptr<media::VideoCaptureDevice::Client::Buffer>(
- new AutoReleaseBuffer(buffer_pool_, buffer_id, data, size));
+ new AutoReleaseBuffer(buffer_pool_, buffer_id, data, size, handle));
}
void OnIncomingCapturedVideoFrame(
@@ -377,18 +378,21 @@ class StubClient : public media::VideoCaptureDevice::Client {
class AutoReleaseBuffer : public media::VideoCaptureDevice::Client::Buffer {
public:
AutoReleaseBuffer(const scoped_refptr<VideoCaptureBufferPool>& pool,
- int buffer_id,
- void* data,
- size_t size)
+ int buffer_id,
+ void* data,
+ size_t size,
+ base::SharedMemoryHandle handle)
: pool_(pool),
id_(buffer_id),
data_(data),
- size_(size) {
+ size_(size),
+ handle_(handle) {
DCHECK(pool_.get());
}
int id() const override { return id_; }
void* data() const override { return data_; }
size_t size() const override { return size_; }
+ base::SharedMemoryHandle handle() const override { return handle_; }
private:
~AutoReleaseBuffer() override { pool_->RelinquishProducerReservation(id_); }
@@ -397,6 +401,7 @@ class StubClient : public media::VideoCaptureDevice::Client {
const int id_;
void* const data_;
const size_t size_;
+ const base::SharedMemoryHandle handle_;
};
scoped_refptr<VideoCaptureBufferPool> buffer_pool_;

Powered by Google App Engine
This is Rietveld 408576698