Sunshine v2025.118.151840
Self-hosted game stream host for Moonlight.
rtsp.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <atomic>
8
9#include "crypto.h"
10#include "thread_safe.h"
11
12namespace rtsp_stream {
13 constexpr auto RTSP_SETUP_PORT = 21;
14
16 uint32_t id;
17
18 crypto::aes_t gcm_key;
19 crypto::aes_t iv;
20
21 std::string av_ping_payload;
22 uint32_t control_connect_data;
23
24 bool host_audio;
25 std::string unique_id;
26 int width;
27 int height;
28 int fps;
29 int gcmap;
30 int appid;
31 int surround_info;
32 std::string surround_params;
33 bool enable_hdr;
34 bool enable_sops;
35
36 std::optional<crypto::cipher::gcm_t> rtsp_cipher;
37 std::string rtsp_url_scheme;
38 uint32_t rtsp_iv_counter;
39 };
40
41 void
42 launch_session_raise(std::shared_ptr<launch_session_t> launch_session);
43
48 void
49 launch_session_clear(uint32_t launch_session_id);
50
55 int
57
61 void
63
64 void
65 rtpThread();
66
67} // namespace rtsp_stream
Declarations for cryptography functions.
void terminate_sessions()
Terminates all running streaming sessions.
Definition rtsp.cpp:648
void launch_session_clear(uint32_t launch_session_id)
Clear state for the specified launch session.
Definition rtsp.cpp:635
int session_count()
Get the number of active sessions.
Definition rtsp.cpp:640
Definition rtsp.h:15
Declarations for thread-safe data structures.