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:
Niklas Söderlund 2019-05-26 02:31:39 +02:00
parent 63c578ed99
commit a502896429
2 changed files with 33 additions and 4 deletions

View file

@ -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 {