Azure Kinect Sensor SDK  refs/heads/master
Documentation for https://github.com/Microsoft/Azure-Kinect-Sensor-SDK

◆ k4a_record_add_custom_video_track()

k4a_result_t k4a_record_add_custom_video_track ( const k4a_record_t  recording_handle,
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 
)
related

Adds custom video tracks to the recording.

Parameters
recording_handleThe handle of a new recording, obtained by k4a_record_create().
track_nameThe name of the custom video track to be added.
codec_idA UTF8 null terminated string containing the codec ID of the track. Some of the existing formats are listed here: https://www.matroska.org/technical/specs/codecid/index.html. The codec ID can also be custom defined by the user. Video codec ID's should start with 'V_'.
codec_contextThe codec context is a codec-specific buffer that contains any required codec metadata that is only known to the codec. It is mapped to the matroska 'CodecPrivate' element.
codec_context_sizeThe size of the codec context buffer.
track_settingsAdditional metadata for the video track such as resolution and framerate.
Returns
K4A_RESULT_SUCCEEDED is returned on success
Remarks
Built-in video tracks like the DEPTH, IR, and COLOR tracks will be created automatically when the k4a_record_create() API is called. This API can be used to add additional video tracks to save custom data.
Track names must be ALL CAPS and may only contain A-Z, 0-9, '-' and '_'.
All tracks need to be added before the recording header is written.
Call k4a_record_write_custom_track_data() with the same track_name to write data to this track.