Interface IStreamingSurface
interface IStreamingSurface
Extends com.amazon.apmf.IStandard
A high level interface for clients to queue streaming Buffers for presentation.
Streaming clients are recommended to use this interface to present their buffers.
Methods
presentBuffer()
Queues buffer for presentation. RGB and alpha values are rendered into one buffer and presented. In cases where buffers are rejected due to any reason, release and present buffer events won’t be sent to the application. PresentResult can be used to detect such scenariosPresentResultpresentBuffer(com.amazon.kepler.buffer.IBufferGroup*rgb_buffer,com.amazon.kepler.buffer.IBufferGroup?alpha_buffer,GraphicsFrameMetadata?graphics_frame_data)
Parameters
rgb_buffer
com.amazon.kepler.buffer.IBufferGroup* — Required
Buffer of RGB channels
alpha_buffer
com.amazon.kepler.buffer.IBufferGroup? — Optional
Buffer of alpha channel
graphics_frame_data
GraphicsFrameMetadata? — Optional
Frame data for both rgb_buffer and alpha_buffer- expected to have same frame data.
Returns
PresentResult
The result of present
Throws
DeviceError— if IStreamingSurface is not in valid stateNullPointerError— if any input argument is null pointer while a non-null one is expectedInvalidArgumentError— if any input argument is invalid [PresentResult]
getSurfaceControl()
Get surface control associated to current rendering surfaceISurfaceControl*getSurfaceControl()
Returns
ISurfaceControl*
ISurfaceControl The surface control object [ISurfaceControl]
Throws
DeviceError— if IStreamingSurface is not in valid state
addBufferReleaseListener()
Add buffer release listener when buffer is not used for display. The listener will continue to receive events until ISubscription#unsubscribe() is called or until the event source is destroyed.com.amazon.apmf.ISubscription*addBufferReleaseListener(IBufferReleaseListener*listener)
Parameters
listener
IBufferReleaseListener* — Required
Listener interface
Returns
com.amazon.apmf.ISubscription*
ISubscription related to this listener interface
Throws
DeviceError— if IStreamingSurface is not in valid stateNullPointerError— if any input argument is null pointer while a non-null one is expectedInvalidArgumentError— if any input argument is invalid [IBufferReleaseListener]
getId()
i64 getId()
Query the Id of current IStreamingSurface, this id is unique in all IStreamingSurfaces.
Returns
i64
id of current IStreamingSurface
Throws
DeviceError— if IStreamingSurface is not in valid state

