libcamera: stream: Construct a stream

Construct a stream object with a default internal pool.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Kieran Bingham 2019-02-05 11:45:24 +01:00 committed by Laurent Pinchart
parent 468176fa07
commit 1b7051b492
2 changed files with 26 additions and 0 deletions

View file

@ -7,10 +7,18 @@
#ifndef __LIBCAMERA_STREAM_H__ #ifndef __LIBCAMERA_STREAM_H__
#define __LIBCAMERA_STREAM_H__ #define __LIBCAMERA_STREAM_H__
#include <libcamera/buffer.h>
namespace libcamera { namespace libcamera {
class Stream final class Stream final
{ {
public:
Stream();
BufferPool &bufferPool() { return bufferPool_; }
private:
BufferPool bufferPool_;
}; };
struct StreamConfiguration { struct StreamConfiguration {

View file

@ -47,6 +47,24 @@ namespace libcamera {
* optimal stream for the task. * optimal stream for the task.
*/ */
/**
* \brief Construct a stream with default parameters
*/
Stream::Stream()
{
}
/**
* \fn Stream::bufferPool()
* \brief Retrieve the buffer pool for the stream
*
* The buffer pool handles the buffers used to capture frames at the output of
* the stream. It is initially created empty and shall be populated with
* buffers before being used.
*
* \return A reference to the buffer pool
*/
/** /**
* \struct StreamConfiguration * \struct StreamConfiguration
* \brief Configuration parameters for a stream * \brief Configuration parameters for a stream