summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/stream.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
index e38c0e7e..48daf5ac 100644
--- a/include/libcamera/stream.h
+++ b/include/libcamera/stream.h
@@ -7,6 +7,7 @@
#ifndef __LIBCAMERA_STREAM_H__
#define __LIBCAMERA_STREAM_H__
+#include <map>
#include <string>
#include <vector>
@@ -18,6 +19,21 @@ namespace libcamera {
class Camera;
class Stream;
+class StreamFormats
+{
+public:
+ StreamFormats();
+ StreamFormats(const std::map<unsigned int, std::vector<SizeRange>> &formats);
+
+ std::vector<unsigned int> pixelformats() const;
+ std::vector<Size> sizes(unsigned int pixelformat) const;
+
+ SizeRange range(unsigned int pixelformat) const;
+
+private:
+ std::map<unsigned int, std::vector<SizeRange>> formats_;
+};
+
struct StreamConfiguration {
StreamConfiguration()
: stream_(nullptr)