![]() |
Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
|
Implements the Xbox streaming session runtime. More...
#include "src/streaming/session.h"#include "src/logging/logger.h"#include "src/os.h"#include "src/startup/memory_stats.h"#include "src/streaming/ffmpeg_stream_backend.h"#include "src/streaming/stats_overlay.h"#include "third-party/moonlight-common-c/src/Limelight.h"#include <algorithm>#include <array>#include <atomic>#include <cctype>#include <cstdarg>#include <cstdio>#include <cstring>#include <deque>#include <mutex>#include <SDL.h>#include <SDL_ttf.h>#include <string>#include <string_view>#include <vector>#include <windows.h>Functions | |
| std::uint64_t | PltGetMicroseconds (void) |
| Return the platform monotonic clock value in microseconds. | |
| int | rand_s (unsigned int *randomValue) |
| Fill an integer with cryptographically strong random bytes on nxdk. | |
| 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. | |
Implements the Xbox streaming session runtime.
| std::uint64_t PltGetMicroseconds | ( | void | ) |
Return the platform monotonic clock value in microseconds.
| int rand_s | ( | unsigned int * | randomValue | ) |
Fill an integer with cryptographically strong random bytes on nxdk.
| randomValue | Output integer populated with secure random bits. |
| 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.
| window | Shared SDL window reused from the shell. |
| videoMode | Active Xbox video mode. |
| settings | Active shell settings that control stream resolution, bitrate, frame rate, host audio playback, and the optional end-of-stream stats summary. |
| host | Selected paired host. |
| app | Selected host app. |
| clientIdentity | Paired client identity used for authenticated launch requests. |
| statusMessage | Output message describing the final session result. |