Skip to main content

OH_NativeBuffer_SetMetadataValue

Function OH_NativeBuffer_SetMetadataValue 

Source
pub unsafe extern "C" fn OH_NativeBuffer_SetMetadataValue(
    buffer: *mut OH_NativeBuffer,
    metadataKey: OH_NativeBuffer_MetadataKey,
    size: i32,
    metadata: *mut u8,
) -> i32
Expand description

@brief Set the metadata type of the OH_NativeBuffer.\n This interface is a non-thread-safe type interface.\n

@syscap SystemCapability.Graphic.Graphic2D.NativeBuffer @param buffer Indicates the pointer to a OH_NativeBuffer instance. @param metadataKey Indicates the metadata type of native buffer, see OH_NativeBuffer_MetadataKey. @param size Indicates the size of a uint8_t vector. @param metadata Indicates the pointer to a uint8_t vector. @return {@link NATIVE_ERROR_OK} 0 - Success. {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - buffer or metadata is NULL. {@link NATIVE_ERROR_BUFFER_STATE_INVALID} 41207000 - Incorrect metadata state. {@link NATIVE_ERROR_UNSUPPORTED} 50102000 - Unsupported metadata key. @since 12 @version 1.0