Azure Kinect Sensor SDK  refs/heads/master
Documentation for https://github.com/Microsoft/Azure-Kinect-Sensor-SDK
playback.h
1 
7 #ifndef K4A_PLAYBACK_H
8 #define K4A_PLAYBACK_H
9 
10 #include <k4arecord/types.h>
11 #include <k4arecord/k4arecord_export.h>
12 
13 #ifdef __cplusplus
14 
15 extern "C" {
16 #endif
17 
48 K4ARECORD_EXPORT k4a_result_t k4a_playback_open(const char *path, k4a_playback_t *playback_handle);
49 
82  uint8_t *data,
83  size_t *data_size);
84 
110 K4ARECORD_EXPORT k4a_result_t k4a_playback_get_calibration(k4a_playback_t playback_handle,
111  k4a_calibration_t *calibration);
112 
134 K4ARECORD_EXPORT k4a_result_t k4a_playback_get_record_configuration(k4a_playback_t playback_handle,
136 
155 K4ARECORD_EXPORT bool k4a_playback_check_track_exists(k4a_playback_t playback_handle, const char *track_name);
156 
172 K4ARECORD_EXPORT size_t k4a_playback_get_track_count(k4a_playback_t playback_handle);
173 
208 K4ARECORD_EXPORT k4a_buffer_result_t k4a_playback_get_track_name(k4a_playback_t playback_handle,
209  size_t track_index,
210  char *track_name,
211  size_t *track_name_size);
212 
231 K4ARECORD_EXPORT bool k4a_playback_track_is_builtin(k4a_playback_t playback_handle, const char *track_name);
232 
255 K4ARECORD_EXPORT k4a_result_t k4a_playback_track_get_video_settings(k4a_playback_t playback_handle,
256  const char *track_name,
257  k4a_record_video_settings_t *video_settings);
258 
293  const char *track_name,
294  char *codec_id,
295  size_t *codec_id_size);
296 
330  const char *track_name,
331  uint8_t *codec_context,
332  size_t *codec_context_size);
333 
370 K4ARECORD_EXPORT k4a_buffer_result_t k4a_playback_get_tag(k4a_playback_t playback_handle,
371  const char *name,
372  char *value,
373  size_t *value_size);
374 
406 K4ARECORD_EXPORT k4a_result_t k4a_playback_set_color_conversion(k4a_playback_t playback_handle,
407  k4a_image_format_t target_format);
408 
438 K4ARECORD_EXPORT k4a_buffer_result_t k4a_playback_get_attachment(k4a_playback_t playback_handle,
439  const char *file_name,
440  uint8_t *data,
441  size_t *data_size);
442 
483 K4ARECORD_EXPORT k4a_stream_result_t k4a_playback_get_next_capture(k4a_playback_t playback_handle,
484  k4a_capture_t *capture_handle);
485 
528  k4a_capture_t *capture_handle);
529 
565  k4a_imu_sample_t *imu_sample);
566 
602  k4a_imu_sample_t *imu_sample);
603 
651  const char *track_name,
652  k4a_playback_data_block_t *data_block_handle);
653 
701  const char *track_name,
702  k4a_playback_data_block_t *data_block_handle);
703 
723 K4ARECORD_EXPORT uint64_t
725 
744 K4ARECORD_EXPORT size_t k4a_playback_data_block_get_buffer_size(k4a_playback_data_block_t data_block_handle);
745 
767 K4ARECORD_EXPORT uint8_t *k4a_playback_data_block_get_buffer(k4a_playback_data_block_t data_block_handle);
768 
787 K4ARECORD_EXPORT void k4a_playback_data_block_release(k4a_playback_data_block_t data_block_handle);
788 
835 K4ARECORD_EXPORT k4a_result_t k4a_playback_seek_timestamp(k4a_playback_t playback_handle,
836  int64_t offset_usec,
838 
861 K4ARECORD_EXPORT uint64_t k4a_playback_get_recording_length_usec(k4a_playback_t playback_handle);
862 
888 K4ARECORD_DEPRECATED_EXPORT uint64_t k4a_playback_get_last_timestamp_usec(k4a_playback_t playback_handle);
889 
907 K4ARECORD_EXPORT void k4a_playback_close(k4a_playback_t playback_handle);
908 
913 #ifdef __cplusplus
914 } // extern "C"
915 #endif
916 
917 #endif /* K4A_PLAYBACK_H */
Calibration type representing device calibration.
Definition: k4atypes.h:1099
k4a_result_t k4a_playback_track_get_video_settings(k4a_playback_t playback_handle, const char *track_name, k4a_record_video_settings_t *video_settings)
Gets the video-specific track information for a particular video track.
bool k4a_playback_check_track_exists(k4a_playback_t playback_handle, const char *track_name)
Checks whether a track with the given track name exists in the playback file.
k4a_stream_result_t k4a_playback_get_previous_capture(k4a_playback_t playback_handle, k4a_capture_t *capture_handle)
Read the previous capture in the recording sequence.
k4a_result_t
Result code returned by Azure Kinect APIs.
Definition: k4atypes.h:217
uint64_t k4a_playback_data_block_get_device_timestamp_usec(k4a_playback_data_block_t data_block_handle)
Get the device timestamp of a data block in microseconds.
Handle to an Azure Kinect capture.
Definition: k4atypes.h:122
k4a_buffer_result_t
Result code returned by Azure Kinect APIs.
Definition: k4atypes.h:231
void k4a_playback_data_block_release(k4a_playback_data_block_t data_block_handle)
Release a data block handle.
k4a_stream_result_t
Return codes returned by Azure Kinect playback API.
Definition: types.h:128
k4a_buffer_result_t k4a_playback_get_tag(k4a_playback_t playback_handle, const char *name, char *value, size_t *value_size)
Read the value of a tag from a recording.
uint8_t * k4a_playback_data_block_get_buffer(k4a_playback_data_block_t data_block_handle)
Get the buffer of a data block.
IMU sample.
Definition: k4atypes.h:1199
bool k4a_playback_track_is_builtin(k4a_playback_t playback_handle, const char *track_name)
Checks whether a track is one of the built-in tracks: "COLOR", "DEPTH", etc...
k4a_stream_result_t k4a_playback_get_next_data_block(k4a_playback_t playback_handle, const char *track_name, k4a_playback_data_block_t *data_block_handle)
Read the next data block for a particular track.
k4a_stream_result_t k4a_playback_get_previous_data_block(k4a_playback_t playback_handle, const char *track_name, k4a_playback_data_block_t *data_block_handle)
Read the previous data block for a particular track.
size_t k4a_playback_get_track_count(k4a_playback_t playback_handle)
Get the number of tracks in a playback file.
size_t k4a_playback_data_block_get_buffer_size(k4a_playback_data_block_t data_block_handle)
Get the buffer size of a data block.
k4a_result_t k4a_playback_set_color_conversion(k4a_playback_t playback_handle, k4a_image_format_t target_format)
Set the image format that color captures will be converted to.
K4ARECORD_DEPRECATED_EXPORT uint64_t k4a_playback_get_last_timestamp_usec(k4a_playback_t playback_handle)
Gets the last timestamp in a recording, relative to the start of the recording.
k4a_result_t k4a_playback_get_calibration(k4a_playback_t playback_handle, k4a_calibration_t *calibration)
Get the camera calibration for Azure Kinect device used during recording.
k4a_buffer_result_t k4a_playback_get_attachment(k4a_playback_t playback_handle, const char *file_name, uint8_t *data, size_t *data_size)
Reads an attachment file from a recording.
Handle to a block of data read from a k4a_playback_t custom track.
Definition: types.h:64
k4a_stream_result_t k4a_playback_get_previous_imu_sample(k4a_playback_t playback_handle, k4a_imu_sample_t *imu_sample)
Read the previous IMU sample in the recording sequence.
k4a_playback_seek_origin_t
Playback seeking positions.
Definition: types.h:143
Structure containing the device configuration used to record.
Definition: types.h:168
k4a_stream_result_t k4a_playback_get_next_capture(k4a_playback_t playback_handle, k4a_capture_t *capture_handle)
Read the next capture in the recording sequence.
k4a_result_t k4a_playback_get_record_configuration(k4a_playback_t playback_handle, k4a_record_configuration_t *config)
Get the device configuration used during recording.
k4a_result_t k4a_playback_open(const char *path, k4a_playback_t *playback_handle)
Opens an existing recording file for reading.
Structure containing additional metadata specific to custom video tracks.
Definition: types.h:224
k4a_buffer_result_t k4a_playback_get_raw_calibration(k4a_playback_t playback_handle, uint8_t *data, size_t *data_size)
Get the raw calibration blob for the Azure Kinect device used during recording.
k4a_result_t k4a_playback_seek_timestamp(k4a_playback_t playback_handle, int64_t offset_usec, k4a_playback_seek_origin_t origin)
Seek to a specific timestamp within a recording.
Handle to a k4a recording opened for playback.
Definition: types.h:49
void k4a_playback_close(k4a_playback_t playback_handle)
Closes a recording playback handle.
k4a_buffer_result_t k4a_playback_track_get_codec_id(k4a_playback_t playback_handle, const char *track_name, char *codec_id, size_t *codec_id_size)
Gets the codec id string for a particular track.
k4a_buffer_result_t k4a_playback_track_get_codec_context(k4a_playback_t playback_handle, const char *track_name, uint8_t *codec_context, size_t *codec_context_size)
Gets the codec context for a particular track.
k4a_buffer_result_t k4a_playback_get_track_name(k4a_playback_t playback_handle, size_t track_index, char *track_name, size_t *track_name_size)
Gets the name of a track at a specific index.
k4a_stream_result_t k4a_playback_get_next_imu_sample(k4a_playback_t playback_handle, k4a_imu_sample_t *imu_sample)
Read the next IMU sample in the recording sequence.
uint64_t k4a_playback_get_recording_length_usec(k4a_playback_t playback_handle)
Returns the length of the recording in microseconds.
k4a_image_format_t
Image format type.
Definition: k4atypes.h:332