diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index 5da23bba59a24e8a472940a550bea99942e1d151..80adbc0e95e2d404adea12e6fe9367230030d98f 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -431,6 +431,18 @@ "first_introduced": "20", "name": "OH_MD_KEY_SQR_FACTOR" }, + { + "first_introduced": "20", + "name": "OH_MD_KEY_REFERENCE_TRACK_IDS" + }, + { + "first_introduced": "20", + "name": "OH_MD_KEY_TRACK_REFERENCE_TYPE" + }, + { + "first_introduced": "20", + "name": "OH_MD_KEY_TRACK_DESCRIPTION" + }, { "first_introduced": "20", "name": "OH_MD_KEY_MAX_BITRATE" diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 705b0d651d53c8ce94987ad8876f725ebb211faf..924aa63610d285b4710fda21b03c90e899965deb 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1063,6 +1063,27 @@ extern const char *OH_MD_KEY_SQR_FACTOR; * @since 20 */ extern const char *OH_MD_KEY_MAX_BITRATE; +/** + * @brief Key for describing the reference relationship between tracks, value type is int32_t*. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 20 +*/ +extern const char *OH_MD_KEY_REFERENCE_TRACK_IDS; +/** + * @brief Key for describing the track reference type, value type is string. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 20 +*/ +extern const char *OH_MD_KEY_TRACK_REFERENCE_TYPE; +/** + * @brief Key for describing the track description, value type is string. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 20 +*/ +extern const char *OH_MD_KEY_TRACK_DESCRIPTION; /** * @brief Media type. @@ -1079,6 +1100,14 @@ typedef enum OH_MediaType { * @since 12 */ MEDIA_TYPE_SUBTITLE = 2, + /** track is timed meta. + * @since 20 + */ + MEDIA_TYPE_TIMED_METADATA = 5, + /** track is auxiliary. + * @since 20 + */ + MEDIA_TYPE_AUXILIARY = 6, } OH_MediaType; /** diff --git a/multimedia/media_foundation/core/libnative_media_core.ndk.json b/multimedia/media_foundation/core/libnative_media_core.ndk.json index 06942afd5f025d28a538f7950b006bf2a397b41f..50a17108d771c268c862615c7d3728d922e2f9e0 100644 --- a/multimedia/media_foundation/core/libnative_media_core.ndk.json +++ b/multimedia/media_foundation/core/libnative_media_core.ndk.json @@ -17,6 +17,7 @@ { "name": "OH_AVFormat_GetStringValue" }, { "name": "OH_AVFormat_GetBuffer" }, { "name": "OH_AVFormat_DumpInfo" }, + { "name": "OH_AVFormat_GetIntBuffer" }, { "name": "OH_AVMemory_Create" }, { "name": "OH_AVMemory_GetAddr" }, { "name": "OH_AVMemory_GetSize" }, diff --git a/multimedia/media_foundation/native_avformat.h b/multimedia/media_foundation/native_avformat.h index ac30d2d47e37ffb44167ee56b6eef7c65b8f52b0..98cc98b429ae0ba978233363292be25a886c9e54 100644 --- a/multimedia/media_foundation/native_avformat.h +++ b/multimedia/media_foundation/native_avformat.h @@ -322,6 +322,30 @@ bool OH_AVFormat_GetBuffer(struct OH_AVFormat *format, const char *key, uint8_t */ const char *OH_AVFormat_DumpInfo(struct OH_AVFormat *format); +/** + * @brief Read an array of int32_t values from an OH_AVFormat object. + * + * Note that the obtained buffer's lifetime bound to the OH_AVFormat object, + * it's automatically invalidated when the format object is destroyed.\n + * Applications must explicitly copy the data to newly allocated memory if + * the data needs to outlive the OH_AVFormat instance.\n + * + * @syscap SystemCapability.Multimedia.Media.Core + * @param format pointer to an OH_AVFormat instance + * @param key Data identifier key + * @param addr Pointer to receive the data buffer reference + * @param size Pointer to receive the element count + * @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 nullptr. + * @since 20 + */ +bool OH_AVFormat_GetIntBuffer(struct OH_AVFormat *format, const char *key, int32_t **addr, size_t *size); + #ifdef __cplusplus } #endif