Aracılığıyla paylaş


MediaCodec.CreateEncoderByType(String) Method

Definition

Instantiate the preferred encoder supporting output data of the given mime type.

[Android.Runtime.Register("createEncoderByType", "(Ljava/lang/String;)Landroid/media/MediaCodec;", "")]
public static Android.Media.MediaCodec CreateEncoderByType (string type);
[<Android.Runtime.Register("createEncoderByType", "(Ljava/lang/String;)Landroid/media/MediaCodec;", "")>]
static member CreateEncoderByType : string -> Android.Media.MediaCodec

Parameters

type
String

The desired mime type of the output data.

Returns

Attributes

Exceptions

if the codec cannot be created.

if type is not a valid mime type.

if type is null.

Remarks

Instantiate the preferred encoder supporting output data of the given mime type.

<strong>Note:</strong> It is preferred to use MediaCodecList#findEncoderForFormat and #createByCodecName to ensure that the resulting codec can handle a given format.

Java documentation for android.media.MediaCodec.createEncoderByType(java.lang.String).

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