Udostępnij za pośrednictwem


MediaFormat.KeyCreateInputSurfaceSuspended Field

Definition

If specified when configuring a video encoder that's in "surface-input" mode, it will instruct the encoder to put the surface source in suspended state when it's connected.

[Android.Runtime.Register("KEY_CREATE_INPUT_SURFACE_SUSPENDED", ApiSince=29)]
public const string KeyCreateInputSurfaceSuspended;
[<Android.Runtime.Register("KEY_CREATE_INPUT_SURFACE_SUSPENDED", ApiSince=29)>]
val mutable KeyCreateInputSurfaceSuspended : string

Field Value

Attributes

Remarks

If specified when configuring a video encoder that's in "surface-input" mode, it will instruct the encoder to put the surface source in suspended state when it's connected. No video frames will be accepted until a resume operation (see MediaCodec#PARAMETER_KEY_SUSPEND), optionally with timestamp specified via MediaCodec#PARAMETER_KEY_SUSPEND_TIME, is received.

The value is an integer, with 1 indicating to create with the surface source suspended, or 0 otherwise. The default value is 0.

If this key is not set or set to 0, the surface source will accept buffers as soon as it's connected to the encoder (although they may not be encoded immediately). This key can be used when the client wants to prepare the encoder session in advance, but do not want to accept buffers immediately.

Java documentation for android.media.MediaFormat.KEY_CREATE_INPUT_SURFACE_SUSPENDED.

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