From 7e2948f5e106e7d3623134fb9f6c59347640c696 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 12 Oct 2021 04:24:47 +0300 Subject: cam: Pass stream names to FileSink The FileSink class constructs stream names internally the same way that the CameraSession does, except that it fails to add the camera name. This results in files being written without the camera name. This could be fixed in FileSink, but we would still duplicate code to construct stream names. Pass the stream names map from CameraSession to FileSink instead, and store it internally. Fixes: 02001fecb0f5 ("cam: Turn BufferWriter into a FrameSink") Signed-off-by: Laurent Pinchart Acked-by: Kieran Bingham --- src/cam/file_sink.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cam/file_sink.h') diff --git a/src/cam/file_sink.h b/src/cam/file_sink.h index 335be93b..8de93a01 100644 --- a/src/cam/file_sink.h +++ b/src/cam/file_sink.h @@ -20,7 +20,8 @@ class Image; class FileSink : public FrameSink { public: - FileSink(const std::string &pattern = ""); + FileSink(const std::map &streamNames, + const std::string &pattern = ""); ~FileSink(); int configure(const libcamera::CameraConfiguration &config) override; -- cgit v1.2.1