Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
rtsp_stream::rtsp_server_t Class Reference
Collaboration diagram for rtsp_stream::rtsp_server_t:
[legend]

Public Member Functions

int bind (net::af_e af, std::uint16_t port, boost::system::error_code &ec)
void handle_msg (tcp::socket &sock, launch_session_t &session, msg_t &&req)
void handle_accept (const boost::system::error_code &ec)
void map (const std::string_view &type, cmd_func_t cb)
bool session_raise (std::shared_ptr< launch_session_t > launch_session)
 Launch a new streaming session.
void session_clear (uint32_t launch_session_id)
 Clear state for the oldest launch session.
bool cancel_pending_launch (const std::string_view &uuid)
int session_count ()
 Get the number of active sessions.
int shared_session_count ()
void clear (bool all=true)
 Clear launch sessions.
void remove (const std::shared_ptr< stream::session_t > &session)
 Removes the provided session from the set of sessions.
void insert (const std::shared_ptr< stream::session_t > &session)
 Inserts the provided session into the set of sessions.
void iterate ()
 Runs an iteration of the RTSP server loop.
void stop ()
 Stop the RTSP server.
std::shared_ptr< stream::session_t > find_session (const std::string_view &uuid)
std::list< std::string > get_all_session_uuids ()
bool terminate_session (const std::string_view &uuid)
void terminate_shared_sessions ()

Public Attributes

safe::event_t< std::shared_ptr< launch_session_t > > launch_event

Detailed Description

Definition at line 424 of file rtsp.cpp.

Constructor & Destructor Documentation

◆ ~rtsp_server_t()

rtsp_stream::rtsp_server_t::~rtsp_server_t ( )
inline

Definition at line 426 of file rtsp.cpp.

Member Function Documentation

◆ bind()

int rtsp_stream::rtsp_server_t::bind ( net::af_e af,
std::uint16_t port,
boost::system::error_code & ec )
inline

Definition at line 430 of file rtsp.cpp.

◆ cancel_pending_launch()

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

Definition at line 583 of file rtsp.cpp.

◆ clear()

void rtsp_stream::rtsp_server_t::clear ( bool all = true)
inline

Clear launch sessions.

Parameters
allIf true, clear all sessions. Otherwise, only clear timed out and stopped sessions.

Examples

clear(false);
void clear(bool all=true)
Clear launch sessions.
Definition rtsp.cpp:631

Definition at line 631 of file rtsp.cpp.

◆ find_session()

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

Definition at line 694 of file rtsp.cpp.

◆ get_all_session_uuids()

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

Definition at line 707 of file rtsp.cpp.

◆ handle_accept()

void rtsp_stream::rtsp_server_t::handle_accept ( const boost::system::error_code & ec)
inline

Definition at line 494 of file rtsp.cpp.

◆ handle_msg()

void rtsp_stream::rtsp_server_t::handle_msg ( tcp::socket & sock,
launch_session_t & session,
msg_t && req )
inline

Definition at line 459 of file rtsp.cpp.

◆ insert()

void rtsp_stream::rtsp_server_t::insert ( const std::shared_ptr< stream::session_t > & session)
inline

Inserts the provided session into the set of sessions.

Parameters
sessionThe session to insert.

Definition at line 660 of file rtsp.cpp.

◆ iterate()

void rtsp_stream::rtsp_server_t::iterate ( )
inline

Runs an iteration of the RTSP server loop.

Definition at line 674 of file rtsp.cpp.

◆ map()

void rtsp_stream::rtsp_server_t::map ( const std::string_view & type,
cmd_func_t cb )
inline

Definition at line 528 of file rtsp.cpp.

◆ remove()

void rtsp_stream::rtsp_server_t::remove ( const std::shared_ptr< stream::session_t > & session)
inline

Removes the provided session from the set of sessions.

Parameters
sessionThe session to remove.

Definition at line 651 of file rtsp.cpp.

◆ session_clear()

void rtsp_stream::rtsp_server_t::session_clear ( uint32_t launch_session_id)
inline

Clear state for the oldest launch session.

Parameters
launch_session_idThe ID of the session to clear.

Definition at line 566 of file rtsp.cpp.

◆ session_count()

int rtsp_stream::rtsp_server_t::session_count ( )
inline

Get the number of active sessions.

Returns
Count of active sessions.

Definition at line 606 of file rtsp.cpp.

◆ session_raise()

bool rtsp_stream::rtsp_server_t::session_raise ( std::shared_ptr< launch_session_t > launch_session)
inline

Launch a new streaming session.

Note
If the client does not begin streaming within the ping_timeout, the session will be discarded.
Parameters
launch_sessionStreaming session information.

Definition at line 538 of file rtsp.cpp.

◆ shared_session_count()

int rtsp_stream::rtsp_server_t::shared_session_count ( )
inline

Definition at line 611 of file rtsp.cpp.

◆ stop()

void rtsp_stream::rtsp_server_t::stop ( )
inline

Stop the RTSP server.

Definition at line 687 of file rtsp.cpp.

◆ terminate_session()

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

Definition at line 718 of file rtsp.cpp.

◆ terminate_shared_sessions()

void rtsp_stream::rtsp_server_t::terminate_shared_sessions ( )
inline

Definition at line 733 of file rtsp.cpp.

Member Data Documentation

◆ launch_event

safe::event_t<std::shared_ptr<launch_session_t> > rtsp_stream::rtsp_server_t::launch_event

Definition at line 622 of file rtsp.cpp.


The documentation for this class was generated from the following file: