libcamera: stream: StreamConfiguration: Add StreamFormats information
Allow StreamFormats to be associated to a StreamConfiguration. The intention is that pipeline handlers should associate formats to a StreamConfiguration when it's created in generateConfiguration(). Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -35,10 +35,8 @@ private:
|
||||
};
|
||||
|
||||
struct StreamConfiguration {
|
||||
StreamConfiguration()
|
||||
: stream_(nullptr)
|
||||
{
|
||||
}
|
||||
StreamConfiguration();
|
||||
StreamConfiguration(const StreamFormats &formats);
|
||||
|
||||
unsigned int pixelFormat;
|
||||
Size size;
|
||||
@@ -47,11 +45,13 @@ struct StreamConfiguration {
|
||||
|
||||
Stream *stream() const { return stream_; }
|
||||
void setStream(Stream *stream) { stream_ = stream; }
|
||||
const StreamFormats &formats() const { return formats_; }
|
||||
|
||||
std::string toString() const;
|
||||
|
||||
private:
|
||||
Stream *stream_;
|
||||
StreamFormats formats_;
|
||||
};
|
||||
|
||||
enum StreamRole {
|
||||
|
||||
Reference in New Issue
Block a user