18namespace rtsp_stream {
37 return (uint8_t *) (
this + 1);
65 std::array<std::uint8_t, 16>
tag;
Declarations for cryptography functions.
std::vector< std::uint8_t > aes_t
Byte buffer containing AES key material.
Definition crypto.h:43
void terminate_sessions()
Terminates all running streaming sessions.
Definition rtsp.cpp:711
void launch_session_clear(uint32_t launch_session_id)
Clear state for the specified launch session.
Definition rtsp.cpp:700
int session_count()
Get the number of active sessions.
Definition rtsp.cpp:704
void terminate_sessions_by_cert(std::string_view cert)
Terminate active sessions associated with a client certificate.
Definition rtsp.cpp:719
void launch_session_raise(std::shared_ptr< launch_session_t > launch_session)
Queue a launch session until the RTSP client connects.
Definition rtsp.cpp:696
void start()
Runs the RTSP server loop.
Definition rtsp.cpp:1402
constexpr auto RTSP_SETUP_PORT
GameStream base-port offset used for the RTSP setup listener.
Definition rtsp.h:19
Audio-related capabilities and codec choice exchanged during RTSP setup.
Definition rtsp.h:80
bool continuous_audio
Whether audio packets continue during silence.
Definition rtsp.h:81
std::string codec_offered
Dolby codec offered to the client, or empty when using Opus.
Definition rtsp.h:82
RTSP launch session state shared with stream setup.
Definition rtsp.h:76
bool host_audio
Whether host audio should be played locally.
Definition rtsp.h:93
std::string av_ping_payload
AV ping payload.
Definition rtsp.h:90
int gcmap
Game controller mapping requested by the client.
Definition rtsp.h:98
crypto::aes_t gcm_key
AES-GCM key negotiated for encrypted RTSP messages.
Definition rtsp.h:87
std::string client_name
Friendly client name from initial pairing.
Definition rtsp.h:105
int appid
Application ID requested for launch or resume.
Definition rtsp.h:99
bool enable_hdr
Whether HDR streaming is requested.
Definition rtsp.h:103
std::string unique_id
Moonlight client unique identifier for this launch request.
Definition rtsp.h:94
int fps
Requested video frame rate.
Definition rtsp.h:97
std::optional< crypto::cipher::gcm_t > rtsp_cipher
AES-GCM cipher used once encrypted RTSP is negotiated.
Definition rtsp.h:107
int height
Frame or display height in pixels.
Definition rtsp.h:96
uint32_t rtsp_iv_counter
Counter value mixed into encrypted RTSP IVs.
Definition rtsp.h:109
std::string client_cert
PEM certificate for the paired Moonlight client.
Definition rtsp.h:110
std::string surround_params
Client-provided surround-sound layout parameters.
Definition rtsp.h:101
uint32_t control_connect_data
Client-provided token used when connecting the control channel.
Definition rtsp.h:91
std::string rtsp_url_scheme
URL scheme selected by the RTSP SETUP flow.
Definition rtsp.h:108
int width
Frame or display width in pixels.
Definition rtsp.h:95
int surround_info
Encoded GameStream surround-sound capability flags.
Definition rtsp.h:100
uint32_t id
RTSP launch-session identifier assigned before stream startup.
Definition rtsp.h:85
audio_negotiation_t audio_negotiation
Audio stream negotiation state.
Definition rtsp.h:102
bool enable_sops
Whether sequence output protection is requested.
Definition rtsp.h:104
crypto::aes_t iv
Initial RTSP AES-GCM IV supplied by the client.
Definition rtsp.h:88
Declarations for thread-safe data structures.
auto big(T x)
Convert a value to or from big-endian byte order.
Definition utility.h:1810