pub unsafe extern "C" fn ob_frame_update_data(
frame: *mut ob_frame,
data: *const u8,
data_size: u32,
error: *mut *mut ob_error,
)Expand description
@brief Update the data of a frame. @brief The data will be memcpy to the frame data buffer. @brief The frame data size will be also updated as the input data size.
@attention It is not recommended to update the frame data if the frame was not created by the user. If you must update it, ensure that the frame is not being used in other threads. @attention The size of the new data should be equal to or less than the current data size of the frame. Exceeding the original size may cause memory exceptions.
@param[in] frame The frame object to update. @param[in] data The new data to update the frame with. @param[in] data_size The size of the new data. @param[out] error Pointer to an error object that will be set if an error occurs.