MLNativeSurfaceOnFrameAvailableCallback
Module: Media Player
Callbacks for notifying when an output frame is available for consumption. More...
#include <ml_native_surface.h>
Public Attributes
Type | Name |
---|---|
uint32_t | version |
void()(MLHandle handle, const MLNativeSurfaceFrameAvailableInfo info) | on_frame_available This callback is invoked when the raw video frame is available for consumption on client side. |
Detailed Description
struct MLNativeSurfaceOnFrameAvailableCallback;
Callbacks for notifying when an output frame is available for consumption.
Deprecated
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
Public Attributes Documentation
version
uint32_t version;
Version of this structure.
on_frame_available
void(*)(MLHandle handle, const MLNativeSurfaceFrameAvailableInfo *info) on_frame_available;
This callback is invoked when the raw video frame is available for consumption on client side.
Type | Description |
---|---|
void()(MLHandle handle, const MLNativeSurfaceFrameAvailableInfo info) | )(MLHandle handle, const MLNativeSurfaceFrameAvailableInfo *info) |
Parameters
handle | MLNativeSurface or MLNativeSurfaceTexture handle for which callback was called. | |
info | Output Frame availability info as MLNativeSurfaceFrameAvailableInfo. |
Client should implement this callback when they want to use raw video frame as a texture mapped to 3D geometry, for example.
This callback is typically fired when the when a raw frame is available for consumption, such as when the decoded output buffer has been released by the decoder OR camera produces a frame.