Share via


MediaFormat.KeyPcmEncoding Field

Definition

A key describing the raw audio sample encoding/format.

[Android.Runtime.Register("KEY_PCM_ENCODING", ApiSince=24)]
public const string KeyPcmEncoding;
[<Android.Runtime.Register("KEY_PCM_ENCODING", ApiSince=24)>]
val mutable KeyPcmEncoding : string

Field Value

Attributes

Remarks

A key describing the raw audio sample encoding/format.

The associated value is an integer, using one of the AudioFormat.ENCODING_PCM_ values.

This is an optional key for audio decoders and encoders specifying the desired raw audio sample format during MediaCodec#configure MediaCodec.configure(&hellip;) call. Use MediaCodec#getInputFormat MediaCodec.getInput/MediaCodec#getOutputFormat OutputFormat(&hellip;) to confirm the actual format. For the PCM decoder this key specifies both input and output sample encodings.

This key is also used by MediaExtractor to specify the sample format of audio data, if it is specified.

If this key is missing, the raw audio sample format is signed 16-bit short.

Java documentation for android.media.MediaFormat.KEY_PCM_ENCODING.

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