Menu
Amazon AppStream
Developer Guide

This documentation is for an older version of Amazon AppStream. For information about the latest version, see the Amazon AppStream 2.0 Developer Guide.

Add Streaming to Your Application

The Amazon AppStream SDK provides server libraries that you build into your application and call in order to receive client sessions from Amazon AppStream and to stream input and output between your application and clients.

The following image illustrates how your application interacts with the libraries of the Amazon AppStream SDK. Your application has a handle to each of the objects that it can use to call the functions of that object. It also implements callback functions and registers them with the objects in order to receive client and session events.

The following object classes are provided by the server libraries in the Amazon AppStream SDK. Documentation for these classes are available in the Amazon AppStream SDK.

Class Description
XStxServerLibrary The top level object of the server libraries. Your application uses this object to ensure that it is calling into the version of the libraries it was compiled against and to create the XStxServerManager object.
XStxServerManager This object manages client sessions and sends events to your application when Amazon AppStream assigns your application a client session or terminates a client session. When it fires the XStxIServerManagerListenerFcnServerInitialize event, it returns a handle to the XStxServer object your application uses to stream data to the client.
XStxServer Your application uses this object to stream content to clients and to receive user input from clients.

Your application implements callback functions that adhere to the following interfaces in order to receive session and client events. Documentation for these interfaces is available in the Amazon AppStream SDK. The callback functions are invoked from different threads, so your application needs to be cautious when modifying data in the callback functions and to use thread synchronization mechanisms.

Interface Description
XStxIAudioSource Called by the XStxServer object to get audio frames from your application. If a callback function implementing this interface is not set with the XStxServerSetAudioSource function of the XStxServer object, the XStxServer object captures system audio and transmits that to clients instead.
XStxIInputMapping Maps user input from a format returned by the client to a format the application can use.
XStxIInputSink Receives user data from the XStxServer object. This can be keyboard, mouse, or touch data.
XStxIRawInputSink Receives raw user data from the XStxServer object. This is sent as a stream of bytes.
XStxIServerListener receives event messages from the XStxServer object when it establishes or loses connection to a client.
XStxIServerManagerListener receives event messages from the XStxServerManager object when Amazon AppStream creates or terminates a client session.
XStxIVideoSource Called by the XStxServer object to configure video streaming from the application. If the video mode is set to XSTX_VIDEO_MODE_PULL, the XStxServer object also uses this interface to get video frames from the application.