libcamera: converter: Add interface for feature flags
This patch intends to extend the converter interface to have feature flags, which enables each converter to expose the set of features it supports. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <libcamera/base/class.h>
|
||||
#include <libcamera/base/flags.h>
|
||||
#include <libcamera/base/signal.h>
|
||||
|
||||
#include <libcamera/geometry.h>
|
||||
@@ -32,7 +33,13 @@ struct StreamConfiguration;
|
||||
class Converter
|
||||
{
|
||||
public:
|
||||
Converter(MediaDevice *media);
|
||||
enum class Feature {
|
||||
None = 0,
|
||||
};
|
||||
|
||||
using Features = Flags<Feature>;
|
||||
|
||||
Converter(MediaDevice *media, Features features = Feature::None);
|
||||
virtual ~Converter();
|
||||
|
||||
virtual int loadConfiguration(const std::string &filename) = 0;
|
||||
@@ -61,6 +68,11 @@ public:
|
||||
|
||||
const std::string &deviceNode() const { return deviceNode_; }
|
||||
|
||||
Features features() const { return features_; }
|
||||
|
||||
protected:
|
||||
Features features_;
|
||||
|
||||
private:
|
||||
std::string deviceNode_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user