Skip to content

Commit

Permalink
Comment changed functions
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey jodon committed Dec 5, 2023
1 parent d097a06 commit fa52ef9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/rtsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,19 @@ namespace rtsp_stream {
_map_cmd_cb.emplace(type, std::move(cb));
}

/**
* @brief Launch a new streaming session.
* @note If the client does not begin streaming within the ping_timeout,
* the session will be discarded.
* @param launch_session Streaming session information.
*
* EXAMPLES:
* ```cpp
* launch_session_t launch_session;
* rtsp_server_t server {};
* server.session_raise(launch_session);
* ```
*/
void
session_raise(rtsp_stream::launch_session_t launch_session) {
auto now = std::chrono::steady_clock::now();
Expand All @@ -328,6 +341,15 @@ namespace rtsp_stream {

safe::event_t<rtsp_stream::launch_session_t> launch_event;

/**
* @brief Clear launch sessions.
* @param all If true, clear all sessions. Otherwise, only clear timed out and stopped sessions.
*
* EXAMPLES:
* ```cpp
* clear(false);
* ```
*/
void
clear(bool all = true) {
// if a launch event timed out --> Remove it.
Expand Down

0 comments on commit fa52ef9

Please sign in to comment.