Skip to main content
Version: 10 Jul 2024

MLNativeSurfaceConfig

Module: Media Player

Configuration values for creating the Native Surface. More...

#include <ml_native_surface.h>

Public Attributes

TypeName
uint32_tversion
MLNativeSurfacePixelFormatpixel_format
uint16_tbuffer_count
uint32_twidth
uint32_theight

Detailed Description

struct MLNativeSurfaceConfig;

Configuration values for creating the Native Surface.

Deprecated

Deprecated since 1.4.0. Scheduled for removal.

API Level:

  • 20

Public Attributes Documentation

version

uint32_t version;

Version of this structure.


pixel_format

MLNativeSurfacePixelFormat pixel_format;
TypeDescription
MLNativeSurfacePixelFormatPixel format to use when creating the native surface. Used in functions MLNativeSurfaceCreate and MLNativeSurfaceTextureCreate.

Pixel format from MLNativeSurfacePixelFormat to the NativeSurface to be created.


buffer_count

uint16_t buffer_count;

Number of buffers to be acquired. Refer to MLNativeSurfaceAcquiredBufferCount for acceptable range of buffer count.


width

uint32_t width;

Default width of the buffer while dequeuing the buffer from consumer. This should be same as frame width. Invalid width (negative or 0) will result in failure to create the Surface with the error code MLResult_InvalidParam.


height

uint32_t height;

Default height of the buffer while dequeuing the buffer from consumer. This should be same as frame height. Invalid height (negative or 0) will result in failure to create the Surface with the error code MLResult_InvalidParam.