![]() |
Sunshine v2026.319.132152
Self-hosted game stream host for Moonlight.
|
Singleton cache for portal session data. More...
Public Member Functions | |
| int | get_or_create_session (int &pipewire_fd, int &pipewire_node, int &width, int &height) |
| Get or create a portal session. | |
| void | invalidate () noexcept |
| Invalidate the cached session. | |
Static Public Member Functions | |
| static session_cache_t & | instance () |
Singleton cache for portal session data.
This prevents creating multiple portal sessions during encoder probing, which would show multiple screen recording indicators in the system tray.
|
inline |
Get or create a portal session.
If a cached session exists and is valid, returns the cached data. Otherwise, creates a new session and caches it.
|
inlinenoexcept |
Invalidate the cached session.
Call this when the session becomes invalid (e.g., on error).