Device-related functions, including operations such as obtaining and creating a device,...
struct ob_device_t ob_device
ob_playback_status
The playback status of the media.
void(* ob_playback_status_changed_callback)(ob_playback_status status, void *user_data)
struct ob_record_device_t ob_record_device
OB_EXPORT void ob_playback_device_seek(ob_device *player, const uint64_t timestamp, ob_error **error)
Set the playback to a specified time point of the played data.
OB_EXPORT uint64_t ob_playback_device_get_position(ob_device *player, ob_error **error)
Get the current playback position of the played data.
OB_EXPORT ob_playback_status ob_playback_device_get_current_playback_status(ob_device *player, ob_error **error)
Get the current playback status of the played data.
OB_EXPORT ob_device * ob_create_playback_device(const char *file_path, ob_error **error)
Create a playback device for the specified file path.
OB_EXPORT ob_record_device * ob_create_record_device(ob_device *device, const char *file_path, bool compression_enabled, ob_error **error)
Create a recording device for the specified device with a specified file path and compression enabled...
OB_EXPORT uint64_t ob_playback_device_get_duration(ob_device *player, ob_error **error)
Get the duration of the played data.
OB_EXPORT void ob_playback_device_set_playback_rate(ob_device *player, const float rate, ob_error **error)
Set the playback to a specified time point of the played data.
OB_EXPORT void ob_playback_device_pause(ob_device *player, ob_error **error)
Pause playback on the specified playback device.
OB_EXPORT void ob_playback_device_resume(ob_device *player, ob_error **error)
Resume playback on the specified playback device.
OB_EXPORT void ob_playback_device_set_playback_status_changed_callback(ob_device *player, ob_playback_status_changed_callback callback, void *user_data, ob_error **error)
Set a callback function to receive playback status updates.
OB_EXPORT void ob_record_device_pause(ob_record_device *recorder, ob_error **error)
Pause recording on the specified recording device.
OB_EXPORT void ob_delete_record_device(ob_record_device *recorder, ob_error **error)
Delete a recording device.
OB_EXPORT void ob_record_device_resume(ob_record_device *recorder, ob_error **error)
Resume recording on the specified recording device.
The error class exposed by the SDK, users can get detailed error information according to the error.