Condividi tramite


MediaCodec.SetOutputSurface(Surface) Method

Definition

Dynamically sets the output surface of a codec.

[Android.Runtime.Register("setOutputSurface", "(Landroid/view/Surface;)V", "", ApiSince=23)]
public void SetOutputSurface (Android.Views.Surface surface);
[<Android.Runtime.Register("setOutputSurface", "(Landroid/view/Surface;)V", "", ApiSince=23)>]
member this.SetOutputSurface : Android.Views.Surface -> unit

Parameters

surface
Surface

the output surface to use. It must not be null.

Attributes

Remarks

Dynamically sets the output surface of a codec.

This can only be used if the codec was configured with an output surface. The new output surface should have a compatible usage type to the original output surface. E.g. codecs may not support switching from a SurfaceTexture (GPU readable) output to ImageReader (software readable) output.

Java documentation for android.media.MediaCodec.setOutputSurface(android.view.Surface).

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