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:
Cameron Gutman
2024-02-02 20:05:56 -06:00
parent e62d6915db
commit ca29eac53a
6 changed files with 130 additions and 104 deletions

View File

@@ -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;