pub unsafe extern "C" fn ob_create_frame_from_buffer(
frame_type: ob_frame_type,
format: ob_format,
buffer: *mut u8,
buffer_size: u32,
buffer_destroy_cb: ob_frame_destroy_callback,
buffer_destroy_context: *mut c_void,
error: *mut *mut ob_error,
) -> *mut ob_frameExpand description
@brief Create a frame object based on an externally created buffer.
@attention The buffer is owned by the user and will not be destroyed by the frame object. The user should ensure that the buffer is valid and not modified. @attention The frame object is created with a reference count of 1, and the reference count should be decreased by calling @ref ob_delete_frame() when it is no longer needed.
@param[in] frame_type Frame object type. @param[in] format Frame object format. @param[in] buffer Frame object buffer. @param[in] buffer_size Frame object buffer size. @param[in] buffer_destroy_cb Destroy callback, will be called when the frame object is destroyed. @param[in] buffer_destroy_context Destroy context, user-defined context to be passed to the destroy callback. @param[out] error Pointer to an error object that will be set if an error occurs. @return ob_frame* Return the frame object.