ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
MKVWriter.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <IJsonConvertible.h>
11 #include <RGBDImage.h>
12 
14 
15 struct _k4a_device_configuration_t; // Alias of k4a_device_configuration_t
16 struct _k4a_device_t; // typedef _k4a_device_t* k4a_device_t;
17 struct _k4a_capture_t; // typedef _k4a_capture_t* k4a_capture_t;
18 struct _k4a_record_t; // typedef _k4a_record_t* k4a_record_t;
19 
20 namespace cloudViewer {
21 namespace io {
22 
23 class MKVWriter {
24 public:
25  MKVWriter();
26  virtual ~MKVWriter() {}
27 
28  bool IsOpened();
29 
30  /* We assume device is already set properly according to config */
31  bool Open(const std::string &filename,
32  const _k4a_device_configuration_t &config,
33  _k4a_device_t *device);
34  void Close();
35 
36  bool SetMetadata(const MKVMetadata &metadata);
37  bool NextFrame(_k4a_capture_t *);
38 
39 private:
40  _k4a_record_t *handle_;
41  MKVMetadata metadata_;
42 };
43 } // namespace io
44 } // namespace cloudViewer
std::string filename
bool SetMetadata(const MKVMetadata &metadata)
Definition: MKVWriter.cpp:42
bool NextFrame(_k4a_capture_t *)
Definition: MKVWriter.cpp:59
bool Open(const std::string &filename, const _k4a_device_configuration_t &config, _k4a_device_t *device)
Definition: MKVWriter.cpp:23
Generic file read and write utility for python interface.