Merged
add transform api of video decoder #4197
add transform api of video decoder #4197
Merged
zhanghongranAdd on Nov 5, 2025
Total: 2 files changed+23-0
@@ -215,6 +215,10 @@
215 "first_introduced": "9",215 "first_introduced": "9",
216 "name": "OH_MD_KEY_ROTATION"216 "name": "OH_MD_KEY_ROTATION"
217 },217 },
218+ {
219+ "first_introduced": "22",
220+ "name": "OH_MD_KEY_VIDEO_TRANSFORM_TYPE"
221+ },
218 {222 {
219 "first_introduced": "10",223 "first_introduced": "10",
220 "name": "OH_MD_KEY_CODEC_CONFIG"224 "name": "OH_MD_KEY_CODEC_CONFIG"
@@ -611,6 +611,25 @@ extern const char *OH_MD_KEY_I_FRAME_INTERVAL;
611 */611 */
612extern const char *OH_MD_KEY_ROTATION;612extern const char *OH_MD_KEY_ROTATION;
613 613 
614+/**
615+ * @brief Key for video transform type, value type is int32_t, see {@link OH_NativeBuffer_TransformType}.
616+ *
617+ * This key is used to set the surface transform for video decoders (surface mode).
618+ * If not specified, the default value is 0 ({@link NATIVEBUFFER_ROTATE_NONE}).
619+ * This key and {@link OH_MD_KEY_ROTATION} are mutually exclusive. If both are provided,
620+ * OH_MD_KEY_VIDEO_TRANSFORM_TYPE takes precedence.
621+ * Note that the degrees specified in {@link OH_NativeBuffer_TransformType} represent counter-clockwise rotation,
622+ * which are opposite to the direction of rotation defined by {@link OH_MD_KEY_ROTATION}.
623+ * The correspondence is:
624+ * - {@link NATIVEBUFFER_ROTATE_NONE} => same as OH_MD_KEY_ROTATION = 0
625+ * - {@link NATIVEBUFFER_ROTATE_90} => same as OH_MD_KEY_ROTATION = 270
626+ * - {@link NATIVEBUFFER_ROTATE_180} => same as OH_MD_KEY_ROTATION = 180
627+ * - {@link NATIVEBUFFER_ROTATE_270} => same as OH_MD_KEY_ROTATION = 90
628+ *
629+ * @since 22
630+ */
631+extern const char *OH_MD_KEY_VIDEO_TRANSFORM_TYPE;
632+ 
614/**633/**
615 * @brief Key for video YUV value range flag, value type is bool, true for full range, false for limited range.634 * @brief Key for video YUV value range flag, value type is bool, true for full range, false for limited range.
616 *635 *