summaryrefslogtreecommitdiff
path: root/src/cam/buffer_writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cam/buffer_writer.cpp')
-rw-r--r--src/cam/buffer_writer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cam/buffer_writer.cpp b/src/cam/buffer_writer.cpp
index 2d2258b4..e0374ffc 100644
--- a/src/cam/buffer_writer.cpp
+++ b/src/cam/buffer_writer.cpp
@@ -19,7 +19,8 @@ BufferWriter::BufferWriter(const std::string &pattern)
{
}
-int BufferWriter::write(libcamera::Buffer *buffer)
+int BufferWriter::write(libcamera::Buffer *buffer,
+ const std::string &streamName)
{
std::string filename;
size_t pos;
@@ -29,7 +30,8 @@ int BufferWriter::write(libcamera::Buffer *buffer)
pos = filename.find_first_of('#');
if (pos != std::string::npos) {
std::stringstream ss;
- ss << std::setw(6) << std::setfill('0') << buffer->sequence();
+ ss << streamName << "-" << std::setw(6)
+ << std::setfill('0') << buffer->sequence();
filename.replace(pos, 1, ss.str());
}