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.

Lifecycle of a Client for Windows

Your client communicates with the application on Amazon AppStream through libraries of the Amazon AppStream SDK.

The lifecycle of a client is as follows:

  1. Create the XStxClientLibraryHandle object by calling the XStxClientLibraryCreate function to return a clientLibraryHandle. The object interacts with the client side portion of the API through the clientLibraryHandle.

  2. Create the XStxClient object by calling the XStxClientCreate function to return a XStxClientHandle client handle. The object manages the session between the client and the application.

  3. Instantiate and populate the XStxIClientListener structure. This object responds to the callback functions from the application when a session is established between the client and the application. After populating the listener structure, call the XStxClientSetListener function with the client handle and a pointer to the XStxIClientListener structure.

  4. Initialize a video module to get, decode, and render the video frames. To initialize this module, the client has to instantiate the following structures:

    • XStxIVideoDecoder Gets and decodes the video frame.

    • XStxIVideoRenderer Renders the video frame.

    • XStxIRawVideoFrameAllocator Gets and recycles the video frame.

  5. Initialize an audio module to get, decode, and render the audio frames. To initialize this module, the client has to instantiate the following structures:

    • XStxIAudioDecoder Gets and decodes the audio frame.

    • XStxIAudioRenderer Renders the audio frame.

    • XStxIRawAudioFrameAllocator Gets and recycles the audio frame.

  6. Configure a session between the client and application. Call the XStxClientSetEntitlementUrl function with the endpoint of the entitlement service to configure this session.

  7. Call the XStxClientStart function to start the session. Once the session is established, the XStxClient object will invoke the XStxIClientListenerFcnClientReady function on the XStxIClientListener structure. You can then call xStxClientLibraryRecycle to recycle the client library handle.

  8. The client sends user inputs to the application

  9. The client closes the session.