Capture Replay¶
PCAP capture file replay. Functions are not thread safe, and should only be called from the main thread.
-
int
cepton_sdk_capture_replay_is_open(void)¶ Returns whether capture replay is open.
-
CeptonSensorErrorCode
cepton_sdk_capture_replay_open(const char *const path)¶ Opens capture replay.
Must be called before any other replay functions listed below.
- Parameters
path: Path to PCAP capture file.
-
CeptonSensorErrorCode
cepton_sdk_capture_replay_close(void)¶ Closes capture replay.
-
const char *
cepton_sdk_capture_replay_get_filename(void)¶ Returns capture replay file name.
-
int64_t
cepton_sdk_capture_replay_get_start_time(void)¶ Returns capture start Unix timestamp [microseconds].
-
float
cepton_sdk_capture_replay_get_position(void)¶ Returns capture file position [seconds].
-
float
cepton_sdk_capture_replay_get_length(void)¶ Returns capture file length [seconds].
-
int
cepton_sdk_capture_replay_is_end(void)¶ Returns whether at end of capture file.
This is only relevant when using
resume_blockingmethods.
-
CeptonSensorErrorCode
cepton_sdk_capture_replay_seek(float position)¶ Seek to capture file position [seconds].
- Parameters
position: Seek position in range [0.0, capture length).
-
CeptonSensorErrorCode
cepton_sdk_capture_replay_set_enable_loop(int enable_loop)¶ Sets capture replay looping.
If enabled, replay will automatically rewind at end.
-
int
cepton_sdk_capture_replay_get_enable_loop(void)¶ Returns whether capture replay looping is enabled.
-
CeptonSensorErrorCode
cepton_sdk_capture_replay_set_speed(float speed)¶ Sets speed multiplier for asynchronous replay.
-
float
cepton_sdk_capture_replay_get_speed(void)¶ Returns capture replay speed.
-
CeptonSensorErrorCode
cepton_sdk_capture_replay_resume_blocking_once(void)¶ Replay next packet in current thread without sleeping.
Pauses replay thread if running.
-
CeptonSensorErrorCode
cepton_sdk_capture_replay_resume_blocking(float duration)¶ Replay multiple packets synchronously.
No sleep between packets. Pauses replay thread if running.
- Parameters
duration: Duration to replay. Must be non-negative.
-
int
cepton_sdk_capture_replay_is_running(void)¶ Returns true if replay thread is running.
-
CeptonSensorErrorCode
cepton_sdk_capture_replay_resume(void)¶ Resumes asynchronous replay thread.
Packets are replayed in realtime. Replay thread sleeps in between packets.
-
CeptonSensorErrorCode
cepton_sdk_capture_replay_pause(void)¶ Pauses asynchronous replay thread.