mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-18 18:05:09 +03:00
Add a cache of the active stream configuration to the stream object. This cache is to be updated from the Camera object and can be accessed read only from both the application and pipeline handlers. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
42 lines
724 B
C++
42 lines
724 B
C++
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
/*
|
|
* Copyright (C) 2019, Google Inc.
|
|
*
|
|
* stream.h - Video stream for a Camera
|
|
*/
|
|
#ifndef __LIBCAMERA_STREAM_H__
|
|
#define __LIBCAMERA_STREAM_H__
|
|
|
|
#include <libcamera/buffer.h>
|
|
|
|
namespace libcamera {
|
|
|
|
class Camera;
|
|
|
|
struct StreamConfiguration {
|
|
unsigned int width;
|
|
unsigned int height;
|
|
unsigned int pixelFormat;
|
|
|
|
unsigned int bufferCount;
|
|
};
|
|
|
|
class Stream final
|
|
{
|
|
public:
|
|
Stream();
|
|
BufferPool &bufferPool() { return bufferPool_; }
|
|
const StreamConfiguration &configuration() const { return configuration_; }
|
|
|
|
private:
|
|
friend Camera;
|
|
|
|
BufferPool bufferPool_;
|
|
StreamConfiguration configuration_;
|
|
};
|
|
|
|
|
|
|
|
} /* namespace libcamera */
|
|
|
|
#endif /* __LIBCAMERA_STREAM_H__ */
|