diff --git a/multimedia/media_foundation/core/libnative_media_core.ndk.json b/multimedia/media_foundation/core/libnative_media_core.ndk.json index 50a17108d771c268c862615c7d3728d922e2f9e0..47050bfe4871f0daa59647fd76ca5babfd4665a9 100644 --- a/multimedia/media_foundation/core/libnative_media_core.ndk.json +++ b/multimedia/media_foundation/core/libnative_media_core.ndk.json @@ -10,6 +10,7 @@ { "name": "OH_AVFormat_SetDoubleValue" }, { "name": "OH_AVFormat_SetStringValue" }, { "name": "OH_AVFormat_SetBuffer" }, + { "name": "OH_AVFormat_SetIntBuffer" }, { "name": "OH_AVFormat_GetIntValue" }, { "name": "OH_AVFormat_GetLongValue" }, { "name": "OH_AVFormat_GetFloatValue" }, diff --git a/multimedia/media_foundation/native_avformat.h b/multimedia/media_foundation/native_avformat.h index 021701378154c8e8dff834953a6e3fdb73e30020..95e8455a4f68ba67e643cdcaa07438c90a14ec5e 100644 --- a/multimedia/media_foundation/native_avformat.h +++ b/multimedia/media_foundation/native_avformat.h @@ -350,6 +350,25 @@ const char *OH_AVFormat_DumpInfo(struct OH_AVFormat *format); */ bool OH_AVFormat_GetIntBuffer(struct OH_AVFormat *format, const char *key, int32_t **addr, size_t *size); +/** + * @brief Write an array of int32_t values to an OH_AVFormat object. + * + * @syscap SystemCapability.Multimedia.Media.Core + * @param format pointer to an OH_AVFormat instance + * @param key Data identifier key + * @param addr Pointer to the source data buffer + * @param size Number of elements to write (in elements, not bytes) + * @return The return value is TRUE for success, FALSE for failure + * Possible failure causes: + * 1. input format is nullptr. + * 2. input format's magic error. + * 3. key is nullptr. + * 4. addr is nullptr. + * 5. size is zero. + * @since 20 + */ +bool OH_AVFormat_SetIntBuffer(struct OH_AVFormat *format, const char *key, const int32_t *addr, size_t size); + #ifdef __cplusplus } #endif