다음을 통해 공유


MediaMetadataRetriever.GetScaledFrameAtTime Method

Definition

Overloads

GetScaledFrameAtTime(Int64, Option, Int32, Int32, MediaMetadataRetriever+BitmapParams)

This method is similar to #getScaledFrameAtTime(long, int, int, int, BitmapParams) except that the device will choose the actual Bitmap.Config to use.

GetScaledFrameAtTime(Int64, Option, Int32, Int32)

This method is similar to #getScaledFrameAtTime(long, int, int, int, BitmapParams) except that the device will choose the actual Bitmap.Config to use.

GetScaledFrameAtTime(Int64, Option, Int32, Int32, MediaMetadataRetriever+BitmapParams)

This method is similar to #getScaledFrameAtTime(long, int, int, int, BitmapParams) except that the device will choose the actual Bitmap.Config to use.

[Android.Runtime.Register("getScaledFrameAtTime", "(JIIILandroid/media/MediaMetadataRetriever$BitmapParams;)Landroid/graphics/Bitmap;", "GetGetScaledFrameAtTime_JIIILandroid_media_MediaMetadataRetriever_BitmapParams_Handler", ApiSince=30)]
public virtual Android.Graphics.Bitmap? GetScaledFrameAtTime (long timeUs, Android.Media.Option option, int dstWidth, int dstHeight, Android.Media.MediaMetadataRetriever.BitmapParams params);
[<Android.Runtime.Register("getScaledFrameAtTime", "(JIIILandroid/media/MediaMetadataRetriever$BitmapParams;)Landroid/graphics/Bitmap;", "GetGetScaledFrameAtTime_JIIILandroid_media_MediaMetadataRetriever_BitmapParams_Handler", ApiSince=30)>]
abstract member GetScaledFrameAtTime : int64 * Android.Media.Option * int * int * Android.Media.MediaMetadataRetriever.BitmapParams -> Android.Graphics.Bitmap
override this.GetScaledFrameAtTime : int64 * Android.Media.Option * int * int * Android.Media.MediaMetadataRetriever.BitmapParams -> Android.Graphics.Bitmap

Parameters

timeUs
Int64

The time position in microseconds where the frame will be retrieved. When retrieving the frame at the given time position, there is no guarantee that the data source has a frame located at the position. When this happens, a frame nearby will be returned. If timeUs is negative, time position and option will ignored, and any frame that the implementation considers as representative may be returned.

option
Option

a hint on how the frame is found. Use #OPTION_PREVIOUS_SYNC if one wants to retrieve a sync frame that has a timestamp earlier than or the same as timeUs. Use #OPTION_NEXT_SYNC if one wants to retrieve a sync frame that has a timestamp later than or the same as timeUs. Use #OPTION_CLOSEST_SYNC if one wants to retrieve a sync frame that has a timestamp closest to or the same as timeUs. Use #OPTION_CLOSEST if one wants to retrieve a frame that may or may not be a sync frame but is closest to or the same as timeUs. #OPTION_CLOSEST often has larger performance overhead compared to the other options if there is no sync frame located at timeUs.

dstWidth
Int32

expected output bitmap width

dstHeight
Int32

expected output bitmap height

Returns

A Bitmap containing a representative video frame, which can be null, if such a frame cannot be retrieved. Bitmap#getConfig() can be used to query the actual Bitmap.Config.

Attributes

Remarks

Java documentation for android.media.MediaMetadataRetriever.getScaledFrameAtTime(long, int, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetScaledFrameAtTime(Int64, Option, Int32, Int32)

This method is similar to #getScaledFrameAtTime(long, int, int, int, BitmapParams) except that the device will choose the actual Bitmap.Config to use.

[Android.Runtime.Register("getScaledFrameAtTime", "(JIII)Landroid/graphics/Bitmap;", "GetGetScaledFrameAtTime_JIIIHandler", ApiSince=27)]
public virtual Android.Graphics.Bitmap? GetScaledFrameAtTime (long timeUs, Android.Media.Option option, int dstWidth, int dstHeight);
[<Android.Runtime.Register("getScaledFrameAtTime", "(JIII)Landroid/graphics/Bitmap;", "GetGetScaledFrameAtTime_JIIIHandler", ApiSince=27)>]
abstract member GetScaledFrameAtTime : int64 * Android.Media.Option * int * int -> Android.Graphics.Bitmap
override this.GetScaledFrameAtTime : int64 * Android.Media.Option * int * int -> Android.Graphics.Bitmap

Parameters

timeUs
Int64

The time position in microseconds where the frame will be retrieved. When retrieving the frame at the given time position, there is no guarantee that the data source has a frame located at the position. When this happens, a frame nearby will be returned. If timeUs is negative, time position and option will ignored, and any frame that the implementation considers as representative may be returned.

option
Option

a hint on how the frame is found. Use #OPTION_PREVIOUS_SYNC if one wants to retrieve a sync frame that has a timestamp earlier than or the same as timeUs. Use #OPTION_NEXT_SYNC if one wants to retrieve a sync frame that has a timestamp later than or the same as timeUs. Use #OPTION_CLOSEST_SYNC if one wants to retrieve a sync frame that has a timestamp closest to or the same as timeUs. Use #OPTION_CLOSEST if one wants to retrieve a frame that may or may not be a sync frame but is closest to or the same as timeUs. #OPTION_CLOSEST often has larger performance overhead compared to the other options if there is no sync frame located at timeUs.

dstWidth
Int32

expected output bitmap width

dstHeight
Int32

expected output bitmap height

Returns

A Bitmap containing a representative video frame, which can be null, if such a frame cannot be retrieved. Bitmap#getConfig() can be used to query the actual Bitmap.Config.

Attributes

Remarks

This method is similar to #getScaledFrameAtTime(long, int, int, int, BitmapParams) except that the device will choose the actual Bitmap.Config to use.

Java documentation for android.media.MediaMetadataRetriever.getScaledFrameAtTime(long, int, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to