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

Unified Diff: media/base/video_capture_types.h

Issue 1191443003: VideoCaptureParams: add flag for hinting capture using GpuMemoryBuffers & flag for it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added #include "build/build_config.h" 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
« no previous file with comments | « media/base/media_switches.cc ('k') | media/base/video_capture_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_capture_types.h
diff --git a/media/base/video_capture_types.h b/media/base/video_capture_types.h
index c849ed7b35f9673d9112da267904754c9aafd25e..8483a2dd42f5cb03015dffda309f08efdae20727 100644
--- a/media/base/video_capture_types.h
+++ b/media/base/video_capture_types.h
@@ -7,6 +7,7 @@
#include <vector>
+#include "build/build_config.h"
#include "media/base/media_export.h"
#include "ui/gfx/geometry/size.h"
@@ -64,8 +65,7 @@ const int kFrameRatePrecision = 10000;
// This class is used by the video capture device to specify the format of every
// frame captured and returned to a client. It is also used to specify a
// supported capture format by a device.
-class MEDIA_EXPORT VideoCaptureFormat {
- public:
+struct MEDIA_EXPORT VideoCaptureFormat {
VideoCaptureFormat();
VideoCaptureFormat(const gfx::Size& frame_size,
float frame_rate,
@@ -99,12 +99,14 @@ typedef std::vector<VideoCaptureFormat> VideoCaptureFormats;
// This class is used by the client of a video capture device to specify the
// format of frames in which the client would like to have captured frames
// returned.
-class MEDIA_EXPORT VideoCaptureParams {
- public:
+struct MEDIA_EXPORT VideoCaptureParams {
VideoCaptureParams();
bool operator==(const VideoCaptureParams& other) const {
return requested_format == other.requested_format &&
+#if defined(OS_LINUX)
+ use_native_gpu_memory_buffers == other.use_native_gpu_memory_buffers &&
+#endif
resolution_change_policy == other.resolution_change_policy;
}
@@ -113,6 +115,11 @@ class MEDIA_EXPORT VideoCaptureParams {
// Policy for resolution change.
ResolutionChangePolicy resolution_change_policy;
+
+#if defined(OS_LINUX)
+ // Indication to the Driver to try to use native GpuMemoryBuffers.
+ bool use_native_gpu_memory_buffers;
+#endif
};
} // namespace media
« no previous file with comments | « media/base/media_switches.cc ('k') | media/base/video_capture_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698