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

Unified Diff: media/gpu/v4l2_image_processor.h

Issue 2398883002: Add support for multiple V4L2 video devices of the same type. (Closed)
Patch Set: Fixes for image processor. Created 4 years, 2 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/gpu/v4l2_image_processor.h
diff --git a/media/gpu/v4l2_image_processor.h b/media/gpu/v4l2_image_processor.h
index bbebe8d01670bc4d8dd791e1e89ab9f29c8364d1..6b6acca2c00dd03d676d551adf819bc30c26201c 100644
--- a/media/gpu/v4l2_image_processor.h
+++ b/media/gpu/v4l2_image_processor.h
@@ -55,21 +55,20 @@ class MEDIA_GPU_EXPORT V4L2ImageProcessor {
std::vector<base::ScopedFD> GetDmabufsForOutputBuffer(
int output_buffer_index);
- // Returns a vector of supported input formats in fourcc. This can be called
- // before Initialize.
- std::vector<uint32_t> GetSupportedInputFormats();
-
- // Returns a vector of supported output formats in fourcc. This can be called
- // before Initialize.
- std::vector<uint32_t> GetSupportedOutputFormats();
-
- // Gets the output allocated size and number of planes given |pixelformat|
- // fourcc and visible size |size|. Return true if success. The adjusted coded
- // size will be stored in |size| and the number of planes will be stored in
- // |num_planes|. This can be called before Initialize.
- bool TryOutputFormat(uint32_t pixelformat,
- gfx::Size* size,
- size_t* num_planes);
+ // Returns a vector of supported input formats in fourcc.
+ static std::vector<uint32_t> GetSupportedInputFormats();
+
+ // Returns a vector of supported output formats in fourcc.
+ static std::vector<uint32_t> GetSupportedOutputFormats();
+
+ // Gets output allocated size and number of planes required by the device
+ // for conversion from |input_pixelformat| to |output_pixelformat|, for
+ // visible size |size|. Returns true on success. Adjusted coded size will be
+ // stored in |size| and the number of planes will be stored in |num_planes|.
+ static bool TryOutputFormat(uint32_t input_pixelformat,
+ uint32_t output_pixelformat,
+ gfx::Size* size,
+ size_t* num_planes);
// Returns input allocated size required by the processor to be fed with.
gfx::Size input_allocated_size() const { return input_allocated_size_; }

Powered by Google App Engine
This is Rietveld 408576698