Sunshine latest
Self-hosted game stream host for Moonlight.
rtsp.cpp File Reference

Definitions for RTSP streaming. More...

#include <moonlight-common-c/src/Limelight-internal.h>
#include <moonlight-common-c/src/Rtsp.h>
#include <array>
#include <cctype>
#include <set>
#include <unordered_map>
#include <utility>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include "config.h"
#include "globals.h"
#include "input.h"
#include "logging.h"
#include "network.h"
#include "rtsp.h"
#include "stream.h"
#include "sync.h"
#include "video.h"
Include dependency graph for rtsp.cpp:

Classes

struct  rtsp_stream::encrypted_rtsp_header_t
 
class  rtsp_stream::rtsp_server_t
 
class  rtsp_stream::socket_t
 

Typedefs

using rtsp_stream::cmd_func_t = std::function<void(rtsp_server_t *server, tcp::socket &, launch_session_t &, msg_t &&)>
 
using rtsp_stream::msg_t = util::safe_ptr<RTSP_MESSAGE, free_msg>
 

Functions

void rtsp_stream::cmd_announce (rtsp_server_t *server, tcp::socket &sock, launch_session_t &session, msg_t &&req)
 
void rtsp_stream::cmd_describe (rtsp_server_t *server, tcp::socket &sock, launch_session_t &session, msg_t &&req)
 
void rtsp_stream::cmd_not_found (tcp::socket &sock, launch_session_t &, msg_t &&req)
 
void rtsp_stream::cmd_option (rtsp_server_t *server, tcp::socket &sock, launch_session_t &session, msg_t &&req)
 
void rtsp_stream::cmd_play (rtsp_server_t *server, tcp::socket &sock, launch_session_t &session, msg_t &&req)
 
void rtsp_stream::cmd_setup (rtsp_server_t *server, tcp::socket &sock, launch_session_t &session, msg_t &&req)
 
void rtsp_stream::free_msg (PRTSP_MESSAGE msg)
 
void rtsp_stream::launch_session_clear (uint32_t launch_session_id)
 Clear state for the specified launch session.
 
void rtsp_stream::launch_session_raise (std::shared_ptr< launch_session_t > launch_session)
 
void rtsp_stream::print_msg (PRTSP_MESSAGE msg)
 
void rtsp_stream::respond (tcp::socket &sock, launch_session_t &session, msg_t &resp)
 
void rtsp_stream::respond (tcp::socket &sock, launch_session_t &session, POPTION_ITEM options, int statuscode, const char *status_msg, int seqn, const std::string_view &payload)
 
void rtsp_stream::rtpThread ()
 
int rtsp_stream::send (tcp::socket &sock, const std::string_view &sv)
 
int rtsp_stream::session_count ()
 Get the number of active sessions.
 
void rtsp_stream::terminate_sessions ()
 Terminates all running streaming sessions.
 

Variables

rtsp_server_t rtsp_stream::server {}
 

Detailed Description

Definitions for RTSP streaming.

Function Documentation

◆ cmd_describe()

void rtsp_stream::cmd_describe ( rtsp_server_t * server,
tcp::socket & sock,
launch_session_t & session,
msg_t && req )

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'

◆ 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.

◆ session_count()

int rtsp_stream::session_count ( )

Get the number of active sessions.

Returns
Count of active sessions.