Orbbec SDK K4A Wrapper
Loading...
Searching...
No Matches
k4a::record Class Reference

#include <record.hpp>

Public Member Functions

 record (k4a_record_t handle=nullptr) noexcept
 
 record (record &&other) noexcept
 
 record (const record &)=delete
 
recordoperator= (const record &)=delete
 
recordoperator= (record &&other) noexcept
 
 operator bool () const noexcept
 
bool is_valid () const noexcept
 
void close () noexcept
 
void flush ()
 
void add_tag (const char *name, const char *value)
 
void add_imu_track ()
 
void add_attachment (const char *attachment_name, const uint8_t *buffer, size_t buffer_size)
 
void add_custom_video_track (const char *track_name, const char *codec_id, const uint8_t *codec_context, size_t codec_context_size, const k4a_record_video_settings_t *track_settings)
 
void add_custom_subtitle_track (const char *track_name, const char *codec_id, const uint8_t *codec_context, size_t codec_context_size, const k4a_record_subtitle_settings_t *track_settings)
 
void write_header ()
 
void write_capture (const capture &capture)
 
void write_imu_sample (const k4a_imu_sample_t &imu_sample)
 
void write_custom_track_data (const char *track_name, const std::chrono::microseconds device_timestamp_usec, uint8_t *custom_data, size_t custom_data_size)
 

Static Public Member Functions

static record create (const char *path, const device &device, const k4a_device_configuration_t &device_configuration)
 

Detailed Description

Wrapper for k4a_record_t

Wraps a handle for a record object

See also
k4a_record_t

Definition at line 22 of file record.hpp.

Constructor & Destructor Documentation

◆ record() [1/2]

k4a::record::record ( k4a_record_t  handle = nullptr)
inlinenoexcept

Creates a k4a::record from a k4a_record_t Takes ownership of the handle, i.e. you should not call k4a_record_close on the handle after giving it to the k4a::record; the k4a::record will take care of that.

Definition at line 30 of file record.hpp.

◆ record() [2/2]

k4a::record::record ( record &&  other)
inlinenoexcept

Moves another k4a::record into a new k4a::record

Definition at line 34 of file record.hpp.

◆ ~record()

k4a::record::~record ( )
inline

Definition at line 41 of file record.hpp.

Member Function Documentation

◆ add_attachment()

void k4a::record::add_attachment ( const char *  attachment_name,
const uint8_t *  buffer,
size_t  buffer_size 
)
inline

Adds an attachment to the recording Throws error on failure

See also
k4a_record_add_attachment

Definition at line 142 of file record.hpp.

◆ add_custom_subtitle_track()

void k4a::record::add_custom_subtitle_track ( const char *  track_name,
const char *  codec_id,
const uint8_t *  codec_context,
size_t  codec_context_size,
const k4a_record_subtitle_settings_t track_settings 
)
inline

Adds custom subtitle tracks to the recording Throws error on failure

See also
k4a_record_add_custom_subtitle_track

Definition at line 181 of file record.hpp.

◆ add_custom_video_track()

void k4a::record::add_custom_video_track ( const char *  track_name,
const char *  codec_id,
const uint8_t *  codec_context,
size_t  codec_context_size,
const k4a_record_video_settings_t track_settings 
)
inline

Adds custom video tracks to the recording Throws error on failure

See also
k4a_record_add_custom_video_track

Definition at line 157 of file record.hpp.

◆ add_imu_track()

void k4a::record::add_imu_track ( )
inline

Adds the track header for recording IMU Throws error on failure

See also
k4a_record_add_imu_track

Definition at line 127 of file record.hpp.

◆ add_tag()

void k4a::record::add_tag ( const char *  name,
const char *  value 
)
inline

Adds a tag to the recording Throws error on failure

See also
k4a_record_add_tag

Definition at line 112 of file record.hpp.

◆ close()

void k4a::record::close ( )
inlinenoexcept

Closes a K4A recording.

See also
k4a_record_close

Definition at line 81 of file record.hpp.

◆ create()

static record k4a::record::create ( const char *  path,
const device device,
const k4a_device_configuration_t device_configuration 
)
inlinestatic

Opens a new recording file for writing Throws error on failure

See also
k4a_record_create

Definition at line 273 of file record.hpp.

◆ flush()

void k4a::record::flush ( )
inline

Flushes all pending recording data to disk

See also
k4a_record_flush

Definition at line 94 of file record.hpp.

◆ is_valid()

bool k4a::record::is_valid ( ) const
inlinenoexcept

Returns true if the k4a::record is valid, false otherwise

Definition at line 72 of file record.hpp.

◆ operator bool()

k4a::record::operator bool ( ) const
inlineexplicitnoexcept

Returns true if the k4a::record is valid, false otherwise

Definition at line 65 of file record.hpp.

◆ operator=()

record & k4a::record::operator= ( record &&  other)
inlinenoexcept

Moves another k4a::record into this k4a::record; other is set to invalid

Definition at line 51 of file record.hpp.

◆ write_capture()

void k4a::record::write_capture ( const capture capture)
inline

Writes a camera capture to file Throws error on failure

See also
k4a_record_write_capture

Definition at line 220 of file record.hpp.

◆ write_custom_track_data()

void k4a::record::write_custom_track_data ( const char *  track_name,
const std::chrono::microseconds  device_timestamp_usec,
uint8_t *  custom_data,
size_t  custom_data_size 
)
inline

Writes data for a custom track to file Throws error on failure

See also
k4a_record_write_custom_track_data

Definition at line 250 of file record.hpp.

◆ write_header()

void k4a::record::write_header ( )
inline

Writes the recording header and metadata to file Throws error on failure

See also
k4a_record_write_header

Definition at line 205 of file record.hpp.

◆ write_imu_sample()

void k4a::record::write_imu_sample ( const k4a_imu_sample_t imu_sample)
inline

Writes an imu sample to file Throws error on failure

See also
k4a_record_write_imu_sample

Definition at line 235 of file record.hpp.


The documentation for this class was generated from the following file: