vmeta_frame_read

Function vmeta_frame_read 

Source
pub unsafe extern "C" fn vmeta_frame_read(
    buf: *mut vmeta_buffer,
    mime_type: *const c_char,
    ret_obj: *mut *mut vmeta_frame,
) -> c_int
Expand description

Read frame metadata. This function allocates a new metadata structure, deserializing data from the provided buffer, and detecting the metadata type when possible. Providing the MIME type is mandatory for protobuf-based metadata or metadata from recording files (MP4). The pos field in the buf structure must be set to the starting position for reading (can be 0 if no previous data is present in the buffer). The size of the buffer (len field) must be sufficient to allow reading the metadata otherwise an error is returned. The ownership of the buffer stays with the caller. The allocated structure has a reference count of 1, and is converted to protobuf-based metadata when possible. @param buf: pointer to the buffer structure @param mime_type: pointer to the metadata MIME type, if known; if NULL, the type will be automatically detected when possible. @param ret_obj: pointer filled with the new vmeta_frame structure @return 0 on success, negative errno value in case of error