Partager via


MediaCodec.DetachOutputSurface Method

Definition

Detach the current output surface of a codec.

[Android.Runtime.Register("detachOutputSurface", "()V", "", ApiSince=35)]
public void DetachOutputSurface ();
[<Android.Runtime.Register("detachOutputSurface", "()V", "", ApiSince=35)>]
member this.DetachOutputSurface : unit -> unit
Attributes

Remarks

Detach the current output surface of a codec.

Detaches the currently associated output Surface from the MediaCodec decoder. This allows the SurfaceView or other component holding the Surface to be safely destroyed or modified without affecting the decoder's operation. After calling this method (and after it returns), the decoder will enter detached-Surface mode and will no longer render output.

Java documentation for android.media.MediaCodec.detachOutputSurface().

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