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

#include <k4arecord/playback.hpp>

Public Member Functions

 playback (k4a_playback_t handle=nullptr) noexcept
 
 playback (playback &&other) noexcept
 
 playback (const playback &)=delete
 
playbackoperator= (const playback &)=delete
 
playbackoperator= (playback &&other) noexcept
 
 operator bool () const noexcept
 
bool is_valid () const noexcept
 
void close () noexcept
 
std::vector< uint8_t > get_raw_calibration () const
 
calibration get_calibration () const
 
k4a_record_configuration_t get_record_configuration () const
 
bool get_next_capture (capture *cap)
 
bool get_previous_capture (capture *cap)
 
bool get_tag (const char *name, std::string *out) const
 
bool get_next_imu_sample (k4a_imu_sample_t *sample)
 
bool get_previous_imu_sample (k4a_imu_sample_t *sample)
 
void seek_timestamp (std::chrono::microseconds offset, k4a_playback_seek_origin_t origin)
 
std::chrono::microseconds get_recording_length () const noexcept
 
void set_color_conversion (k4a_image_format_t format)
 
bool get_next_data_block (const char *track, data_block *block)
 
bool get_previous_data_block (const char *track, data_block *block)
 
bool get_attachment (const char *attachment, std::vector< uint8_t > *data)
 

Static Public Member Functions

static playback open (const char *path)
 

Detailed Description

Wrapper for k4a_playback_t

Wraps a handle for a playback object

See also
k4a_playback_t

Definition at line 128 of file playback.hpp.

Constructor & Destructor Documentation

◆ playback() [1/2]

k4a::playback::playback ( k4a_playback_t  handle = nullptr)
inlinenoexcept

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

Definition at line 136 of file playback.hpp.

◆ playback() [2/2]

k4a::playback::playback ( playback &&  other)
inlinenoexcept

Moves another k4a::playback into a new k4a::playback

Definition at line 140 of file playback.hpp.

◆ ~playback()

k4a::playback::~playback ( )
inline

Definition at line 147 of file playback.hpp.

Member Function Documentation

◆ close()

void k4a::playback::close ( )
inlinenoexcept

Closes a K4A recording.

See also
k4a_playback_close

Definition at line 186 of file playback.hpp.

◆ get_attachment()

bool k4a::playback::get_attachment ( const char *  attachment,
std::vector< uint8_t > *  data 
)
inline

Get the attachment block from the recording. Returns true if the attachment was available, false if it was not found. Throws error on failure.

See also
k4a_playback_get_attachment

Definition at line 476 of file playback.hpp.

◆ get_calibration()

calibration k4a::playback::get_calibration ( ) const
inline

Get the camera calibration for the K4A device that made the recording, which is used for all transformation functions. Throws error on failure.

See also
k4a_playback_get_calibration

Definition at line 225 of file playback.hpp.

◆ get_next_capture()

bool k4a::playback::get_next_capture ( capture cap)
inline

Get the next capture in the recording. Returns true if a capture was available, false if there are none left. Throws error on failure.

See also
k4a_playback_get_next_capture

Definition at line 261 of file playback.hpp.

◆ get_next_data_block()

bool k4a::playback::get_next_data_block ( const char *  track,
data_block block 
)
inline

Get the next data block in the recording. Returns true if a block was available, false if there are none left. Throws error on failure.

See also
k4a_playback_get_next_data_block

Definition at line 428 of file playback.hpp.

◆ get_next_imu_sample()

bool k4a::playback::get_next_imu_sample ( k4a_imu_sample_t sample)
inline

Get the next IMU sample in the recording. Returns true if a sample was available, false if there are none left. Throws error on failure.

See also
k4a_playback_get_next_imu_sample

Definition at line 343 of file playback.hpp.

◆ get_previous_capture()

bool k4a::playback::get_previous_capture ( capture cap)
inline

Get the previous capture in the recording. Returns true if a capture was available, false if there are none left. Throws error on failure.

See also
k4a_playback_get_previous_capture

Definition at line 285 of file playback.hpp.

◆ get_previous_data_block()

bool k4a::playback::get_previous_data_block ( const char *  track,
data_block block 
)
inline

Get the previous data block from the recording. Returns true if a block was available, false if there are none left. Throws error on failure.

See also
k4a_playback_get_previous_data_block

Definition at line 452 of file playback.hpp.

◆ get_previous_imu_sample()

bool k4a::playback::get_previous_imu_sample ( k4a_imu_sample_t sample)
inline

Get the previous IMU sample in the recording. Returns true if a sample was available, false if there are none left. Throws error on failure.

See also
k4a_playback_get_previous_imu_sample

Definition at line 365 of file playback.hpp.

◆ get_raw_calibration()

std::vector< uint8_t > k4a::playback::get_raw_calibration ( ) const
inline

Get the raw calibration blob for the K4A device that made the recording. Throws error on failure.

See also
k4a_playback_get_raw_calibration

Definition at line 200 of file playback.hpp.

◆ get_record_configuration()

k4a_record_configuration_t k4a::playback::get_record_configuration ( ) const
inline

Gets the configuration of the recording

See also
k4a_playback_get_record_configuration

Definition at line 242 of file playback.hpp.

◆ get_recording_length()

std::chrono::microseconds k4a::playback::get_recording_length ( ) const
inlinenoexcept

Get the last valid timestamp in the recording

See also
k4a_playback_get_recording_length_usec

Definition at line 400 of file playback.hpp.

◆ get_tag()

bool k4a::playback::get_tag ( const char *  name,
std::string *  out 
) const
inline

Reads the value of a tag from the recording Returns false if the tag does not exist.

See also
k4a_playback_get_tag

Definition at line 308 of file playback.hpp.

◆ is_valid()

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

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

Definition at line 177 of file playback.hpp.

◆ open()

static playback k4a::playback::open ( const char *  path)
inlinestatic

Opens a K4A recording for playback. Throws error on failure.

See also
k4a_playback_open

Definition at line 498 of file playback.hpp.

◆ operator bool()

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

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

Definition at line 170 of file playback.hpp.

◆ operator=()

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

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

Definition at line 156 of file playback.hpp.

◆ seek_timestamp()

void k4a::playback::seek_timestamp ( std::chrono::microseconds  offset,
k4a_playback_seek_origin_t  origin 
)
inline

Seeks to a specific time point in the recording Throws error on failure.

See also
k4a_playback_seek_timestamp

Definition at line 386 of file playback.hpp.

◆ set_color_conversion()

void k4a::playback::set_color_conversion ( k4a_image_format_t  format)
inline

Set the image format that color captures will be converted to. By default the conversion format will be the same as the image format stored in the recording file, and no conversion will occur.

Throws error on failure.

See also
k4a_playback_set_color_conversion

Definition at line 412 of file playback.hpp.


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