MediaCodec.CreateInputSurface Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Requests a Surface to use as the input to an encoder, in place of input buffers.
[Android.Runtime.Register("createInputSurface", "()Landroid/view/Surface;", "")]
public Android.Views.Surface CreateInputSurface ();
[<Android.Runtime.Register("createInputSurface", "()Landroid/view/Surface;", "")>]
member this.CreateInputSurface : unit -> Android.Views.Surface
Returns
- Attributes
Exceptions
if not in the Configured state.
Remarks
Requests a Surface to use as the input to an encoder, in place of input buffers. This may only be called after #configure
and before #start
.
The application is responsible for calling release() on the Surface when done.
The Surface must be rendered with a hardware-accelerated API, such as OpenGL ES. android.view.Surface#lockCanvas(android.graphics.Rect)
may fail or produce unexpected results.
Java documentation for android.media.MediaCodec.createInputSurface()
.
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.