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

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

Issue 1551753002: Build third-party code with -Wall, build chromium_code with -Wextra on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig Created 4 years, 11 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_VIDEO_CAPTURE_LINUX_V4L2_VIDEO_CAPTURE_DELEGATE_H_ 5 #ifndef MEDIA_VIDEO_CAPTURE_LINUX_V4L2_VIDEO_CAPTURE_DELEGATE_H_
6 #define MEDIA_VIDEO_CAPTURE_LINUX_V4L2_VIDEO_CAPTURE_DELEGATE_H_ 6 #define MEDIA_VIDEO_CAPTURE_LINUX_V4L2_VIDEO_CAPTURE_DELEGATE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // S/MPLANE but not construction, so this is implemented in derived classes. 63 // S/MPLANE but not construction, so this is implemented in derived classes.
64 // Internally it has a vector of planes, which for SPLANE will contain only 64 // Internally it has a vector of planes, which for SPLANE will contain only
65 // one element. 65 // one element.
66 class BufferTracker : public base::RefCounted<BufferTracker> { 66 class BufferTracker : public base::RefCounted<BufferTracker> {
67 public: 67 public:
68 BufferTracker(); 68 BufferTracker();
69 // Abstract method to mmap() given |fd| according to |buffer|, planarity 69 // Abstract method to mmap() given |fd| according to |buffer|, planarity
70 // specific. 70 // specific.
71 virtual bool Init(int fd, const v4l2_buffer& buffer) = 0; 71 virtual bool Init(int fd, const v4l2_buffer& buffer) = 0;
72 72
73 uint8_t* const GetPlaneStart(size_t plane) const { 73 const uint8_t* GetPlaneStart(size_t plane) const {
74 DCHECK_LT(plane, planes_.size()); 74 DCHECK_LT(plane, planes_.size());
75 return planes_[plane].start; 75 return planes_[plane].start;
76 } 76 }
77 77
78 size_t GetPlanePayloadSize(size_t plane) const { 78 size_t GetPlanePayloadSize(size_t plane) const {
79 DCHECK_LT(plane, planes_.size()); 79 DCHECK_LT(plane, planes_.size());
80 return planes_[plane].payload_size; 80 return planes_[plane].payload_size;
81 } 81 }
82 82
83 void SetPlanePayloadSize(size_t plane, size_t payload_size) { 83 void SetPlanePayloadSize(size_t plane, size_t payload_size) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 // Clockwise rotation in degrees. This value should be 0, 90, 180, or 270. 169 // Clockwise rotation in degrees. This value should be 0, 90, 180, or 270.
170 int rotation_; 170 int rotation_;
171 171
172 DISALLOW_COPY_AND_ASSIGN(V4L2CaptureDelegate); 172 DISALLOW_COPY_AND_ASSIGN(V4L2CaptureDelegate);
173 }; 173 };
174 174
175 } // namespace media 175 } // namespace media
176 176
177 #endif // MEDIA_VIDEO_CAPTURE_LINUX_V4L2_VIDEO_CAPTURE_DELEGATE_H_ 177 #endif // MEDIA_VIDEO_CAPTURE_LINUX_V4L2_VIDEO_CAPTURE_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/android/java/gin_java_method_invocation_helper.cc ('k') | net/tools/quic/quic_simple_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698