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

Side by Side Diff: media/video/capture/linux/v4l2_capture_delegate_multi_plane.h

Issue 967793002: Linux Video Capture: Add V4L2VideoCaptureDelegate{Single,Multi}Plane. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: posciak@ comments on PS5. Minor rebase of video_capture_controller_unittest.cc and BUILD.gn Created 5 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_VIDEO_CAPTURE_LINUX_V4L2_CAPTURE_DELEGATE_MULTI_PLANE_H_
6 #define MEDIA_VIDEO_CAPTURE_LINUX_V4L2_CAPTURE_DELEGATE_MULTI_PLANE_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "media/video/capture/linux/v4l2_video_capture_delegate.h"
10
11 #if defined(OS_OPENBSD)
12 #error "OpenBSD does not support MPlane capture API."
13 #endif
14
15 namespace base {
16 class SingleThreadTaskRunner;
17 } // namespace base
18
19 namespace media {
20
21 // V4L2 specifics for MPLANE API.
22 class V4L2CaptureDelegateMultiPlane final : public V4L2VideoCaptureDelegate {
23 public:
24 V4L2CaptureDelegateMultiPlane(
25 const VideoCaptureDevice::Name& device_name,
26 const scoped_refptr<base::SingleThreadTaskRunner>& v4l2_task_runner,
27 int power_line_frequency);
28
29 private:
30 // BufferTracker derivation to implement construction semantics for MPLANE.
31 class BufferTrackerMPlane final : public BufferTracker {
32 public:
33 bool Init(int fd, const v4l2_buffer& buffer) override;
34
35 private:
36 ~BufferTrackerMPlane() override {}
37 };
38
39 ~V4L2CaptureDelegateMultiPlane() override;
40
41 // V4L2VideoCaptureDelegate virtual methods implementation.
42 scoped_refptr<BufferTracker> CreateBufferTracker() override;
magjed_chromium 2015/03/19 18:13:29 Shouldn't this be a static function?
mcasas 2015/03/19 22:57:00 I would like to but they I could not override it.
43 bool FillV4L2Format(v4l2_format* format,
44 uint32_t width,
45 uint32_t height,
46 uint32_t pixelformat_fourcc) override;
47 void FinishFillingV4L2Buffer(v4l2_buffer* buffer) const override;
48 void SendBuffer(const scoped_refptr<BufferTracker>& buffer_tracker) override;
Pawel Osciak 2015/03/19 07:52:43 Can this be const?
mcasas 2015/03/19 22:57:00 Done.
49
50 // Vector to allocate and track as many v4l2_plane structs as planes, needed
51 // for v4l2_buffer.m.planes.
52 std::vector<struct v4l2_plane> v4l2_planes_;
53 };
54
55 } // namespace media
56
57 #endif // MEDIA_VIDEO_CAPTURE_LINUX_V4L2_CAPTURE_DELEGATE_SINGLE_PLANE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698