Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

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()

PresentResult presentBuffer(com.amazon.kepler.buffer.IBufferGroup* rgb_buffer, com.amazon.kepler.buffer.IBufferGroup? alpha_buffer, GraphicsFrameMetadata? graphics_frame_data)
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 scenarios

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


getSurfaceControl()

ISurfaceControl* getSurfaceControl()
Get surface control associated to current rendering surface

Returns

ISurfaceControl* ISurfaceControl The surface control object [ISurfaceControl]

Throws

  • DeviceError — if IStreamingSurface is not in valid state

addBufferReleaseListener()

com.amazon.apmf.ISubscription* addBufferReleaseListener(IBufferReleaseListener* listener)
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.

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 state
  • NullPointerError — if any input argument is null pointer while a non-null one is expected
  • InvalidArgumentError — 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

Last modified on October 29, 2026