Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
session.h File Reference

Declares the Xbox streaming session runtime. More...

#include <string>
#include "src/app/client_state.h"
#include "src/app/host_records.h"
#include "src/network/host_pairing.h"
#include "src/startup/video_mode.h"
Include dependency graph for session.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool streaming::run_stream_session (SDL_Window *window, const VIDEO_MODE &videoMode, const app::SettingsState &settings, const app::HostRecord &host, const app::HostAppRecord &app, const network::PairingIdentity &clientIdentity, std::string *statusMessage)
 Run one Xbox streaming session for the selected host app.
 

Detailed Description

Declares the Xbox streaming session runtime.

Function Documentation

◆ run_stream_session()

bool streaming::run_stream_session ( SDL_Window * window,
const VIDEO_MODE & videoMode,
const app::SettingsState & settings,
const app::HostRecord & host,
const app::HostAppRecord & app,
const network::PairingIdentity & clientIdentity,
std::string * statusMessage )

Run one Xbox streaming session for the selected host app.

The session launches or resumes the selected app on the host, starts the Moonlight transport runtime, decodes H.264 video and Opus audio with FFmpeg, forwards controller input, renders the latest decoded frame with a lightweight overlay, and returns once the user stops streaming or the host terminates the session.

Parameters
windowShared SDL window reused from the shell.
videoModeActive Xbox video mode.
settingsActive shell settings that control stream resolution, bitrate, frame rate, host audio playback, and the optional end-of-stream stats summary.
hostSelected paired host.
appSelected host app.
clientIdentityPaired client identity used for authenticated launch requests.
statusMessageOutput message describing the final session result.
Returns
True when the stream session started successfully.