diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-01-29 03:34:31 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-02-06 08:03:03 +0200 |
commit | 46ca8eeca06de7e0657d628325876e7f0a15ef0b (patch) | |
tree | 29af3caa3d05e7cdcf10207ec23d4e545299ce92 /src/cam/buffer_writer.h | |
parent | dbe7a28377b10804d2aa345dcfb215e97452e406 (diff) |
cam: Add BufferWriter helper
Add a simpler helper to allow the cam application to write raw captured
frames to disk.
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>
Diffstat (limited to 'src/cam/buffer_writer.h')
-rw-r--r-- | src/cam/buffer_writer.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/cam/buffer_writer.h b/src/cam/buffer_writer.h new file mode 100644 index 00000000..9705773e --- /dev/null +++ b/src/cam/buffer_writer.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2019, Google Inc. + * + * buffer_writer.h - Buffer writer + */ +#ifndef __LIBCAMERA_BUFFER_WRITER_H__ +#define __LIBCAMERA_BUFFER_WRITER_H__ + +#include <string> + +#include <libcamera/buffer.h> + +class BufferWriter +{ +public: + BufferWriter(const std::string &pattern = "frame-#.bin"); + + int write(libcamera::Buffer *buffer); + +private: + std::string pattern_; +}; + +#endif /* __LIBCAMERA_BUFFER_WRITER_H__ */ |