| class info |
| com.huawei.hms.mlsdk.common.MLFrame.Property |
| Frame metadata. |
| Type | Name | Desc |
| int | IMAGE_FORMAT_NV21 | Constant in NV21 format, which corresponds to the YYYYYYYY VU VU encoding format. |
| int | IMAGE_FORMAT_YV12 | Constant in YV12 format, which corresponds to the YYYYYYYY VV UU encoding format. |
| int | SCREEN_FIRST_QUADRANT | Landscape. |
| int | SCREEN_FOURTH_QUADRANT | Reverse portrait, which is 90 degrees clockwise from SCREEN_THIRD_QUADRANT. |
| int | SCREEN_SECOND_QUADRANT | Portrait, which is 90 degrees clockwise from SCREEN_FIRST_QUADRANT. |
| int | SCREEN_THIRD_QUADRANT | Reverse landscape, which is 90 degrees clockwise from SCREEN_SECOND_QUADRANT. |
| Constructor name |
| Property() Creates an empty instance of MLFrame.Property. |
| Property(MLFrame.Property property) Creates a specified instance of MLFrame.Property. |
| Return type | Method name |
| int | getFormatType() |
| int | getHeight() |
| int | getItemIdentity() |
| int | getQuadrant() |
| long | getTimestamp() |
| int | getWidth() |
| void | resetWidthAndHeight() |
| Constant |
| public static final int IMAGE_FORMAT_NV21 |
| Constant in NV21 format, which corresponds to the YYYYYYYY VU VU encoding format.The NV21 format corresponds to android.graphics.ImageFormat.NV21. |
| Constant |
| public static final int IMAGE_FORMAT_YV12 |
| Constant in YV12 format, which corresponds to the YYYYYYYY VV UU encoding format.The YV12 format corresponds to android.graphics.ImageFormat.YV12. |
| Constant |
| public static final int SCREEN_FIRST_QUADRANT |
| Landscape. Constant value: 0 |
| Constant |
| public static final int SCREEN_SECOND_QUADRANT |
| Portrait, which is 90 degrees clockwise from SCREEN_FIRST_QUADRANT. Constant value: 1 |
| Constant |
| public static final int SCREEN_THIRD_QUADRANT |
| Reverse landscape, which is 90 degrees clockwise from SCREEN_SECOND_QUADRANT. Constant value: 2 |
| Constant |
| public static final int SCREEN_FOURTH_QUADRANT |
| Reverse portrait, which is 90 degrees clockwise from SCREEN_THIRD_QUADRANT. Constant value: 3 |
| Method |
| public Property() |
| Creates an empty instance of MLFrame.Property. |
| Method |
| public Property(MLFrame.Property property) |
| Creates a specified instance of MLFrame.Property. |
Parameters
| Parameter name | Parameter desc |
| property | Frame metadata |
| Method |
| public int getFormatType() |
| Obtains the frame format. |
Return
| Type | desc |
| int | Frame format code. For details, please refer to the definition in android.graphics.Imageformat. |
| Method |
| public int getHeight() |
| Obtains the frame height, in pixels. |
Return
| Type | desc |
| int | Frame height |
| Method |
| public int getItemIdentity() |
| Obtains the ID of a frame. The camera uses a unique ID to number each generated frame in sequence by an increment of 1. |
Return
| Type | desc |
| int | Unique frame ID, which is an integer. |
| Method |
| public int getQuadrant() |
| Obtains the screen orientation of a frame. |
Return
| Type | desc |
| int | Screen orientation. The options are as follows: 0: landscape 1: portrait 2: reverse landscape 3: reverse portrait |
Return
| Type | desc |
| long | Timestamp of a frame |
| Method |
| public int getWidth() |
| Obtains the frame width, in pixels. |
Return
| Type | desc |
| int | Frame width |
| Method |
| public void resetWidthAndHeight() |
| Resets the height and width of an image in portrait mode to the corresponding height and width in landscape mode. |