Go to the documentation of this file.
29 #include <condition_variable>
61 PNGParallelRecordingStrategy(
const std::filesystem::path& filePath,
const std::string& file_name,
unsigned int png_compression = 9,
unsigned int thread_pool_size = 1);
64 static void recordSnapshot(
const cv::Mat& image,
const std::filesystem::path& path);
65 static void recordSnapshot(
const CByteImage& image,
const std::filesystem::path& path);
69 void recordFrame(
const cv::Mat& frame, std::chrono::microseconds timestamp)
override;
Concrete strategy for a PNG image recording.
void startRecording() override
Starts the recording manually if constructed empty.
static void recordSnapshot(const cv::Mat &image, const std::filesystem::path &path)
PNGParallelRecordingStrategy()
std::mutex m_record_frame_mutex
An object of this class behaves likee a normal recording, but is in fact a sequence of images.
unsigned int m_pool_max_size
~PNGParallelRecordingStrategy() override
void recordFrame(const cv::Mat &frame, std::chrono::microseconds timestamp) override
Adds the given frame to the recording.
std::atomic< unsigned int > m_pool_current_size
void stopRecording() override
Stops the recording.
std::condition_variable m_pool_cv
unsigned int m_png_compression
void recordFrameAsync(std::filesystem::path path, const cv::Mat &frame)