![]() |
Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
|
Implements video mode selection helpers. More...
Functions | |
| VIDEO_MODE | startup::choose_best_video_mode (const std::vector< VIDEO_MODE > &availableVideoModes) |
| Choose the best video mode from an already collected list. | |
| VIDEO_MODE | startup::choose_default_stream_video_mode (const std::vector< VIDEO_MODE > &availableVideoModes, const VIDEO_MODE &outputVideoMode) |
| Choose the default stream-resolution mode from detected Xbox modes. | |
| VIDEO_MODE | startup::choose_default_stream_video_mode (const VIDEO_MODE &outputVideoMode) |
| Choose the default stream-resolution mode for the current output mode. | |
| std::vector< VIDEO_MODE > | startup::filter_stream_video_modes_for_encoder_settings (const std::vector< VIDEO_MODE > &availableVideoModes, unsigned long encoderSettings) |
| Filter detected stream-resolution modes through display-aspect encoder settings. | |
| std::vector< std::string > | startup::format_video_mode_lines (const VideoModeSelection &selection) |
| Return human-readable lines describing the detected and selected video modes. | |
| bool | startup::is_preferred_video_mode (const VIDEO_MODE &candidateVideoMode, const VIDEO_MODE ¤tBestVideoMode) |
| Return whether a candidate mode should replace the current best mode. | |
| void | startup::log_video_modes (const VideoModeSelection &selection) |
| Log information about available and selected video modes. | |
| VideoModeSelection | startup::select_best_video_mode (int bpp=32, int refresh=REFRESH_DEFAULT) |
| Detect and choose the best available video mode. | |
| std::vector< VIDEO_MODE > | startup::stream_resolution_presets (int bpp=32, int refresh=60) |
| Return canonical Xbox video modes usable as stream-resolution choices. | |
Implements video mode selection helpers.
| VIDEO_MODE startup::choose_best_video_mode | ( | const std::vector< VIDEO_MODE > & | availableVideoModes | ) |
Choose the best video mode from an already collected list.
| availableVideoModes | The list of candidate modes to evaluate. |
| VIDEO_MODE startup::choose_default_stream_video_mode | ( | const std::vector< VIDEO_MODE > & | availableVideoModes, |
| const VIDEO_MODE & | outputVideoMode ) |
Choose the default stream-resolution mode from detected Xbox modes.
| availableVideoModes | Detected Xbox video modes exposed in settings. |
| outputVideoMode | Active Xbox output mode selected at startup. |
| VIDEO_MODE startup::choose_default_stream_video_mode | ( | const VIDEO_MODE & | outputVideoMode | ) |
Choose the default stream-resolution mode for the current output mode.
The default favors an SD Xbox mode to keep software decoding practical.
| outputVideoMode | Active Xbox output mode selected at startup. |
| std::vector< VIDEO_MODE > startup::filter_stream_video_modes_for_encoder_settings | ( | const std::vector< VIDEO_MODE > & | availableVideoModes, |
| unsigned long | encoderSettings ) |
Filter detected stream-resolution modes through display-aspect encoder settings.
XVideoListModes() already filters progressive and HD modes through the encoder settings. This helper applies the widescreen flag so SD wide-width modes are only exposed when the console is configured for widescreen.
| availableVideoModes | Detected Xbox video modes from XVideoListModes(). |
| encoderSettings | The value returned by XVideoGetEncoderSettings(). |
| std::vector< std::string > startup::format_video_mode_lines | ( | const VideoModeSelection & | selection | ) |
Return human-readable lines describing the detected and selected video modes.
| selection | Video-mode selection to describe. |
| bool startup::is_preferred_video_mode | ( | const VIDEO_MODE & | candidateVideoMode, |
| const VIDEO_MODE & | currentBestVideoMode ) |
Return whether a candidate mode should replace the current best mode.
A candidate must be at least as good as the current best mode in width, height, color depth, and refresh rate, while preferring 720p over 1080i.
| candidateVideoMode | The mode being evaluated. |
| currentBestVideoMode | The currently selected best mode. |
| void startup::log_video_modes | ( | const VideoModeSelection & | selection | ) |
Log information about available and selected video modes.
| selection | The selection object to log. |
| VideoModeSelection startup::select_best_video_mode | ( | int | bpp = 32, |
| int | refresh = REFRESH_DEFAULT ) |
Detect and choose the best available video mode.
| bpp | Desired bits-per-pixel color depth. Default is 32. |
| refresh | Desired refresh rate or REFRESH_DEFAULT to accept the default. |
| std::vector< VIDEO_MODE > startup::stream_resolution_presets | ( | int | bpp = 32, |
| int | refresh = 60 ) |
Return canonical Xbox video modes usable as stream-resolution choices.
Runtime code should prefer modes detected by XVideoListModes(). These values are a fallback for code paths without live video-mode detection.
| bpp | Bits-per-pixel metadata to attach to each mode. |
| refresh | Refresh-rate metadata to attach to each mode. |