Share via


MediaRecorder.SetInputSurface(Surface) Method

Definition

Configures the recorder to use a persistent surface when using SURFACE video source.

[Android.Runtime.Register("setInputSurface", "(Landroid/view/Surface;)V", "GetSetInputSurface_Landroid_view_Surface_Handler", ApiSince=23)]
public virtual void SetInputSurface (Android.Views.Surface surface);
[<Android.Runtime.Register("setInputSurface", "(Landroid/view/Surface;)V", "GetSetInputSurface_Landroid_view_Surface_Handler", ApiSince=23)>]
abstract member SetInputSurface : Android.Views.Surface -> unit
override this.SetInputSurface : Android.Views.Surface -> unit

Parameters

surface
Surface

a persistent input surface created by MediaCodec#createPersistentInputSurface

Attributes

Remarks

Configures the recorder to use a persistent surface when using SURFACE video source.

May only be called before #prepare. If called, #getSurface should not be used and will throw IllegalStateException. Frames rendered to the Surface before #start will be discarded.

Java documentation for android.media.MediaRecorder.setInputSurface(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