The information of media orientation from google reference and iOS reference.
==========<Android>=========
https://developer.android.com/reference/android/media/MediaMetadataRetriever.html#METADATA_KEY_VIDEO_ROTATION
https://developer.android.com/reference/android/media/MediaMetadataRetriever.html#METADATA_KEY_VIDEO_ROTATION
METADATA_KEY_VIDEO_ROTATION
Added in API level 17
public static final int METADATA_KEY_VIDEO_ROTATION
This key retrieves the video rotation angle in degrees, if available. The video rotation angle may be 0, 90, 180, or 270 degrees.
Constant Value: 24 (0x00000018)
METADATA_KEY_IMAGE_ROTATION
Added in API level 28
public static final int METADATA_KEY_IMAGE_ROTATION
If the media contains still images, this key retrieves the rotation angle (in degrees clockwise) of the primary image. The image rotation angle must be one of 0, 90, 180, or 270 degrees.
Constant Value: 31 (0x0000001f)
---------------------------------
So Mobile Media Picker defines as following.
// Video Orientation
- API17 or higher
Unknown = -1,
Portrait = 1,
UpsideDown = 2,
LandscapeRight = 3,
LandscapeLeft = 4,
- API16
Portrait = 1,
Landscape = 0
// Image Orientation
Up = 0,
Down = 1,
Left = 2,
Right = 3,
=========<iOS>=========
// Video Orientation
UIInterfaceOrientationUnknown = UIDeviceOrientationUnknown, // 0
UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait, // 1 home button on the bottom
UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown, // 2 home button on the top
UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight, // 4 home button on the left
UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft // 3 home button on the right
// Image Orientation
UIImageOrientationUp, // default orientation
UIImageOrientationDown, // 180 deg rotation
UIImageOrientationLeft, // 90 deg CCW
UIImageOrientationRight, // 90 deg CW
UIImageOrientationUpMirrored, // as above but image mirrored along other axis. horizontal flip
UIImageOrientationDownMirrored, // horizontal flip
UIImageOrientationLeftMirrored, // vertical flip
UIImageOrientationRightMirrored, // vertical flip
======================================================
댓글 없음:
댓글 쓰기