mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
Refactor RTSP handling to be session-based rather than socket-based
This is required to support per-session attributes like encryption keys during RTSP message processing.
This commit is contained in:
@@ -411,6 +411,8 @@ namespace stream {
|
||||
safe::mail_raw_t::event_t<video::hdr_info_t> hdr_queue;
|
||||
} control;
|
||||
|
||||
std::uint32_t launch_session_id;
|
||||
|
||||
safe::mail_raw_t::event_t<bool> shutdown_event;
|
||||
safe::signal_t controlEnd;
|
||||
|
||||
@@ -523,6 +525,9 @@ namespace stream {
|
||||
}
|
||||
}
|
||||
|
||||
// Once the control stream connection is established, RTSP session state can be torn down
|
||||
rtsp_stream::launch_session_clear(session_p->launch_session_id);
|
||||
|
||||
session_p->control.peer = peer;
|
||||
|
||||
// Use the local address from the control connection as the source address
|
||||
@@ -1881,6 +1886,7 @@ namespace stream {
|
||||
auto mail = std::make_shared<safe::mail_raw_t>();
|
||||
|
||||
session->shutdown_event = mail->event<bool>(mail::shutdown);
|
||||
session->launch_session_id = launch_session.id;
|
||||
|
||||
session->config = config;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user