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

Unified Diff: media/video/capture/linux/v4l2_capture_delegate_single_plane.h

Issue 1124723006: VideoCaptureDeviceLinux: Add support for SPLANE+DMABUF V4L2 type capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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: media/video/capture/linux/v4l2_capture_delegate_single_plane.h
diff --git a/media/video/capture/linux/v4l2_capture_delegate_single_plane.h b/media/video/capture/linux/v4l2_capture_delegate_single_plane.h
index 8d4dc91f5206a2e8bb0a23c5b106768ca7e86bd4..073e39fc06df99c5f870a2e96682a7e97c27cb40 100644
--- a/media/video/capture/linux/v4l2_capture_delegate_single_plane.h
+++ b/media/video/capture/linux/v4l2_capture_delegate_single_plane.h
@@ -16,27 +16,25 @@ class SingleThreadTaskRunner;
namespace media {
// V4L2 specifics for SPLANE API.
-class V4L2CaptureDelegateSinglePlane final : public V4L2CaptureDelegate {
+class V4L2CaptureDelegateSinglePlane : public V4L2CaptureDelegate {
public:
V4L2CaptureDelegateSinglePlane(
const VideoCaptureDevice::Name& device_name,
const scoped_refptr<base::SingleThreadTaskRunner>& v4l2_task_runner,
- int power_line_frequency)
- : V4L2CaptureDelegate(device_name,
- v4l2_task_runner,
- power_line_frequency) {}
+ int power_line_frequency,
+ bool try_to_use_dma_buf);
Pawel Osciak 2015/06/15 10:34:55 This is not really "try", but "use dmabuf or fail"
mcasas 2015/06/17 01:30:53 Is a "try" and if you can't, is fine. Changed to |
- private:
+ protected:
// BufferTracker derivation to implement construction semantics for SPLANE.
- class BufferTrackerSPlane final : public BufferTracker {
+ class BufferTrackerSPlane : public BufferTracker {
public:
bool Init(int fd, const v4l2_buffer& buffer) override;
- private:
+ protected:
~BufferTrackerSPlane() override {}
};
- ~V4L2CaptureDelegateSinglePlane() override {}
+ ~V4L2CaptureDelegateSinglePlane() override;
// V4L2CaptureDelegate virtual methods implementation.
scoped_refptr<BufferTracker> CreateBufferTracker() const override;
@@ -44,11 +42,20 @@ class V4L2CaptureDelegateSinglePlane final : public V4L2CaptureDelegate {
uint32_t width,
uint32_t height,
uint32_t pixelformat_fourcc) const override;
- void FinishFillingV4L2Buffer(v4l2_buffer* buffer) const override;
void SetPayloadSize(const scoped_refptr<BufferTracker>& buffer_tracker,
const v4l2_buffer& buffer) const override;
+ void FinishFillingV4L2Buffer(v4l2_buffer* buffer,
+ bool for_enqueue) const override;
+ void FinishFillingV4L2RequestBuffers(
+ v4l2_requestbuffers* request) const override;
void SendBuffer(const scoped_refptr<BufferTracker>& buffer_tracker,
const v4l2_format& format) const override;
+
+ private:
+ // Memory Type configured on ctor, mappable or not.
+ v4l2_memory memory_type_;
Pawel Osciak 2015/06/15 10:34:55 This should be a member of V4l2CaptureDelegate. We
mcasas 2015/06/17 01:30:53 Done.
+
+ mutable ScopedVector<VideoCaptureDevice::Client::Buffer> allocated_buffers_;
};
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698