Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
rtsp.h File Reference

Declarations for RTSP streaming. More...

#include <atomic>
#include <list>
#include <memory>
#include <mutex>
#include <optional>
#include <string>
#include "crypto.h"
#include "thread_safe.h"
#include "uuid.h"
Include dependency graph for rtsp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rtsp_stream::launch_session_t

Functions

bool rtsp_stream::launch_session_raise (std::shared_ptr< launch_session_t > launch_session)
void rtsp_stream::launch_session_clear (uint32_t launch_session_id)
 Clear state for the specified launch session.
bool rtsp_stream::cancel_pending_launch (const std::string_view &uuid)
int rtsp_stream::session_count ()
 Get the number of active sessions.
int rtsp_stream::shared_session_count ()
std::string_view rtsp_stream::last_termination_reason ()
 Get a short identifier for why the most recent session ended.
std::shared_ptr< stream::session_t > rtsp_stream::find_session (const std::string_view &uuid)
std::optional< bool > rtsp_stream::session_is_isolated (const std::string_view &uuid)
std::list< std::string > rtsp_stream::get_all_session_uuids ()
bool rtsp_stream::terminate_session (const std::string_view &uuid)
void rtsp_stream::terminate_shared_sessions ()
void rtsp_stream::terminate_sessions ()
 Terminates all running streaming sessions.
void rtsp_stream::start ()
 Runs the RTSP server loop.
std::string rtsp_stream::surround_params (int config)
 The surround-params value the RTSP DESCRIBE reply advertises for an audio layout.

Variables

constexpr auto rtsp_stream::RTSP_SETUP_PORT = 21

Detailed Description

Declarations for RTSP streaming.

Definition in file rtsp.h.

Function Documentation

◆ cancel_pending_launch()

bool rtsp_stream::cancel_pending_launch ( const std::string_view & uuid)

Cancel a pending RTSP launch for one paired client without touching any other client's handshake.

Definition at line 769 of file rtsp.cpp.

◆ find_session()

std::shared_ptr< stream::session_t > rtsp_stream::find_session ( const std::string_view & uuid)

Definition at line 789 of file rtsp.cpp.

◆ get_all_session_uuids()

std::list< std::string > rtsp_stream::get_all_session_uuids ( )

Definition at line 801 of file rtsp.cpp.

◆ last_termination_reason()

std::string_view rtsp_stream::last_termination_reason ( )

Get a short identifier for why the most recent session ended.

Returns
e.g. "client_quit", "client_lost", "server_stopped", "unknown".

Definition at line 785 of file rtsp.cpp.

◆ launch_session_clear()

void rtsp_stream::launch_session_clear ( uint32_t launch_session_id)

Clear state for the specified launch session.

Parameters
launch_session_idThe ID of the session to clear.

Definition at line 765 of file rtsp.cpp.

◆ launch_session_raise()

bool rtsp_stream::launch_session_raise ( std::shared_ptr< launch_session_t > launch_session)

Publish a launch for the RTSP handshake.

Returns
false when another handshake is already pending.

Definition at line 761 of file rtsp.cpp.

◆ session_count()

int rtsp_stream::session_count ( )

Get the number of active sessions.

Returns
Count of active sessions.

Definition at line 773 of file rtsp.cpp.

◆ session_is_isolated()

std::optional< bool > rtsp_stream::session_is_isolated ( const std::string_view & uuid)

Definition at line 793 of file rtsp.cpp.

◆ shared_session_count()

int rtsp_stream::shared_session_count ( )

Definition at line 780 of file rtsp.cpp.

◆ start()

void rtsp_stream::start ( )

Runs the RTSP server loop.

Definition at line 1413 of file rtsp.cpp.

◆ surround_params()

std::string rtsp_stream::surround_params ( int config)

The surround-params value the RTSP DESCRIBE reply advertises for an audio layout.

Channel count, stream count, coupled-stream count, then the channel mapping, with the normal-quality 5.1 and 7.1 mappings rotated to undo the rotation Moonlight applies to them.

Parameters
configAn audio::stream_config_e value.

GFE advertises incorrect mapping for normal quality configurations, as a result, Moonlight rotates all channels from index '3' to the right To work around this, rotate channels to the left from index '3', over the channels of this layout: 6 for 5.1, 8 for 7.1.

Definition at line 924 of file rtsp.cpp.

◆ terminate_session()

bool rtsp_stream::terminate_session ( const std::string_view & uuid)

Terminates only the session associated with a paired client.

Definition at line 805 of file rtsp.cpp.

◆ terminate_sessions()

void rtsp_stream::terminate_sessions ( )

Terminates all running streaming sessions.

Definition at line 813 of file rtsp.cpp.

◆ terminate_shared_sessions()

void rtsp_stream::terminate_shared_sessions ( )

Terminates only shared-host streaming sessions.

Definition at line 809 of file rtsp.cpp.

Variable Documentation

◆ RTSP_SETUP_PORT

auto rtsp_stream::RTSP_SETUP_PORT = 21
constexpr

Definition at line 27 of file rtsp.h.