summaryrefslogtreecommitdiff
path: root/src/cam/buffer_writer.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-04-05 20:56:07 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-04-09 16:59:19 +0200
commit47a9f357fe9d6c4e6ea592f1fbc947cae3c532f8 (patch)
tree050235ae98fb1a2ea499308ce2a4a7c8e774ee71 /src/cam/buffer_writer.h
parentea34d1a574427a0efcf72addfb5a7f1254e3f94c (diff)
cam: Extend BufferWriter to include a stream name in file path
To be able to write multiple buffers captured in the same request (and hence having the same sequence number) the buffer writer needs to name each file uniquely. Add a stream name to the writer function which the buffer writer can add to the part of the pattern it already expands to the sequence number. As cam only supports one stream, hard code the name to stream0. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/cam/buffer_writer.h')
-rw-r--r--src/cam/buffer_writer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cam/buffer_writer.h b/src/cam/buffer_writer.h
index 9705773e..7bf785d1 100644
--- a/src/cam/buffer_writer.h
+++ b/src/cam/buffer_writer.h
@@ -16,7 +16,7 @@ class BufferWriter
public:
BufferWriter(const std::string &pattern = "frame-#.bin");
- int write(libcamera::Buffer *buffer);
+ int write(libcamera::Buffer *buffer, const std::string &streamName);
private:
std::string pattern_;