diff --git a/docs/html/annotated.html b/docs/html/annotated.html index e5b757e..ca2330c 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -67,11 +67,11 @@ $(function() {
| ▼Nuvg_rtp | |
| Ccontext | |
| Csession | |
| Cmedia_stream | |
| Crtcp | |
| ▼Nuvgrtp | |
| Ccontext | |
| Csession | |
| Cmedia_stream | |
| Crtcp |
|
+ uvgRTP
+
+ |
+
This is the complete list of members for uvgrtp::context, including all inherited members.
+| context() | uvgrtp::context | |
| create_session(std::string addr) | uvgrtp::context | |
| create_session(std::string remote_addr, std::string local_addr) | uvgrtp::context | |
| destroy_session(uvgrtp::session *session) | uvgrtp::context | |
| ~context() | uvgrtp::context |
|
+ uvgRTP
+
+ |
+
+Public Member Functions | |
| context () | |
| RTP context constructor. More... | |
| ~context () | |
| RTP context destructor. More... | |
| uvgrtp::session * | create_session (std::string addr) |
| Create a new RTP session. More... | |
| uvgrtp::session * | create_session (std::string remote_addr, std::string local_addr) |
| Create a new RTP session. More... | |
| rtp_error_t | destroy_session (uvgrtp::session *session) |
| Destroy RTP session and all of its media streams. More... | |
| uvgrtp::context::context | +( | +) | ++ |
RTP context constructor.
+Most of the time one RTP context per application is enough. If CNAME namespace isolation is required, multiple context objects can be created.
+ +| uvgrtp::context::~context | +( | +) | ++ |
RTP context destructor.
+This does not destroy active sessions. They must be destroyed manually by calling uvgrtp::context::destroy_session()
+ +| uvgrtp::session* uvgrtp::context::create_session | +( | +std::string | +addr | ) | ++ |
Create a new RTP session.
+| addr | IPv4 address of the remote participant |
| uvgrtp::session | On success |
| nullptr | If "addr" is empty |
| nullptr | If memory allocation failed |
| uvgrtp::session* uvgrtp::context::create_session | +( | +std::string | +remote_addr, | +
| + | + | std::string | +local_addr | +
| + | ) | ++ |
Create a new RTP session.
+If UDP holepunching should be utilized, in addition to remote IP address, the caller must also provide local IP address where uvgRTP should bind itself to. If you are using uvgRTP for unidirectional streaming, please take a look at RCE_HOLEPUNCH_KEEPALIVE
+| remote_addr | IPv4 address of the remote participant |
| local_addr | IPv4 address of a local interface |
| uvgrtp::session | On success |
| nullptr | If remote_addr or local_addr is empty |
| nullptr | If memory allocation failed |
| rtp_error_t uvgrtp::context::destroy_session | +( | +uvgrtp::session * | +session | ) | ++ |
Destroy RTP session and all of its media streams.
+| session | Pointer to the session object that should be destroyed |
| RTP_OK | On success |
| RTP_INVALID_VALUE | If session is nullptr |
|
+ uvgRTP
+
+ |
+
This is the complete list of members for uvgrtp::media_stream, including all inherited members.
+| add_srtp_ctx(uint8_t *key, uint8_t *salt) (defined in uvgrtp::media_stream) | uvgrtp::media_stream | |
| configure_ctx(int flag, ssize_t value) | uvgrtp::media_stream | |
| get_rtcp() | uvgrtp::media_stream | |
| install_receive_hook(void *arg, void(*hook)(void *, uvgrtp::frame::rtp_frame *)) | uvgrtp::media_stream | |
| pull_frame() | uvgrtp::media_stream | |
| pull_frame(size_t timeout) | uvgrtp::media_stream | |
| push_frame(uint8_t *data, size_t data_len, int flags) | uvgrtp::media_stream | |
| push_frame(uint8_t *data, size_t data_len, uint32_t ts, int flags) (defined in uvgrtp::media_stream) | uvgrtp::media_stream | |
| push_frame(std::unique_ptr< uint8_t[]> data, size_t data_len, int flags) (defined in uvgrtp::media_stream) | uvgrtp::media_stream | |
| push_frame(std::unique_ptr< uint8_t[]> data, size_t data_len, uint32_t ts, int flags) (defined in uvgrtp::media_stream) | uvgrtp::media_stream |
|
+ uvgRTP
+
+ |
+
+Public Member Functions | |
| +rtp_error_t | add_srtp_ctx (uint8_t *key, uint8_t *salt) |
| rtp_error_t | push_frame (uint8_t *data, size_t data_len, int flags) |
| +rtp_error_t | push_frame (uint8_t *data, size_t data_len, uint32_t ts, int flags) |
| +rtp_error_t | push_frame (std::unique_ptr< uint8_t[]> data, size_t data_len, int flags) |
| +rtp_error_t | push_frame (std::unique_ptr< uint8_t[]> data, size_t data_len, uint32_t ts, int flags) |
| uvgrtp::frame::rtp_frame * | pull_frame () |
| Poll a frame indefinetily from the media stream object. More... | |
| uvgrtp::frame::rtp_frame * | pull_frame (size_t timeout) |
| Poll a frame for a specified time from the media stream object. More... | |
| rtp_error_t | install_receive_hook (void *arg, void(*hook)(void *, uvgrtp::frame::rtp_frame *)) |
| rtp_error_t | configure_ctx (int flag, ssize_t value) |
| Configure the media stream, see RTP_CTX_CONFIGURATION_FLAGS for more details. More... | |
| uvgrtp::rtcp * | get_rtcp () |
| Get pointer to the RTCP object of the media stream. More... | |
| rtp_error_t uvgrtp::media_stream::configure_ctx | +( | +int | +flag, | +
| + | + | ssize_t | +value | +
| + | ) | ++ |
Configure the media stream, see RTP_CTX_CONFIGURATION_FLAGS for more details.
+| RTP_OK | On success |
| RTP_INVALID_VALUE | If the provided value is not valid for a given configuration flag |
| RTP_INVALID_VALUE | If the provided configuration flag is not supported |
| RTP_GENERIC_ERROR | If setsockopt(2) failed |
| uvgrtp::rtcp* uvgrtp::media_stream::get_rtcp | +( | +) | ++ |
Get pointer to the RTCP object of the media stream.
+This object is used to control all RTCP-related functionality and RTCP documentation can be found from uvgrtp::rtcp
+| uvgrtp::rtcp* | If RTCP has been enabled (RCE_RTCP has been given to uvgrtp::session::create_stream()) |
| nullptr | If RTCP has not been enabled |
| rtp_error_t uvgrtp::media_stream::install_receive_hook | +( | +void * | +arg, | +
| + | + | void(*)(void *, uvgrtp::frame::rtp_frame *) | +hook | +
| + | ) | ++ |
Alternative to pull_frame(). The provided hook is called when a frame is received.
+"arg" is optional argument that is passed to hook when it is called. It may be nullptr
+NOTE: Hook should not be used to process the frame but it should be a place where the frame handout happens from uvgRTP to application
+Return RTP_OK on success Return RTP_INVALID_VALUE if "hook" is nullptr
+ +| uvgrtp::frame::rtp_frame* uvgrtp::media_stream::pull_frame | +( | +) | ++ |
Poll a frame indefinetily from the media stream object.
+When a frame is received, it is put into the frame vector of the receiver Calling application can poll frames by calling pull_frame().
+NOTE: pull_frame() is a blocking operation and a separate thread should be spawned for it!
+You can specify for how long should pull_frame() block by giving "timeout" parameter that denotes how long pull_frame() will wait for an incoming frame in milliseconds
+Return pointer to RTP frame on success
+ +| uvgrtp::frame::rtp_frame* uvgrtp::media_stream::pull_frame | +( | +size_t | +timeout | ) | ++ |
Poll a frame for a specified time from the media stream object.
+When a frame is received, it is put into the frame vector of the receiver Calling application can poll frames by calling pull_frame().
+NOTE: pull_frame() is a blocking operation and a separate thread should be spawned for it!
+You can specify for how long should pull_frame() block by giving "timeout" parameter that denotes how long pull_frame() will wait for an incoming frame in milliseconds
+Return pointer to RTP frame on success
+ +| rtp_error_t uvgrtp::media_stream::push_frame | +( | +uint8_t * | +data, | +
| + | + | size_t | +data_len, | +
| + | + | int | +flags | +
| + | ) | ++ |
Split "data" into 1500 byte chunks and send them to remote
+NOTE: If SCD has been enabled, calling this version of push_frame() requires either that the caller has given a deallocation callback to SCD OR that "flags" contains flags "RTP_COPY"
+NOTE: Each push_frame() sends one discrete frame of data. If the input frame is fragmented, calling application should call push_frame() with RTP_MORE and RTP_SLICE flags to prevent uvgRTP from flushing the frame queue after push_frame().
+push_frame(..., RTP_MORE | RTP_SLICE); // more data coming in, do not flush queue push_frame(..., RTP_MORE | RTP_SLICE); // more data coming in, do not flush queue push_frame(..., RTP_SLICE); // no more data coming in, flush queue
+If user wishes to manage RTP timestamps himself, he may pass "ts" to push_frame() which forces uvgRTP to use that timestamp for all RTP packets of "data".
+Return RTP_OK success Return RTP_INVALID_VALUE if one of the parameters are invalid Return RTP_MEMORY_ERROR if the data chunk is too large to be processed Return RTP_SEND_ERROR if uvgRTP failed to send the data to remote Return RTP_GENERIC_ERROR for any other error condition
+ +|
+ uvgRTP
+
+ |
+
This is the complete list of members for uvgrtp::rtcp, including all inherited members.
+| install_app_hook(void(*hook)(uvgrtp::frame::rtcp_app_packet *)) (defined in uvgrtp::rtcp) | uvgrtp::rtcp | |
| install_receiver_hook(void(*hook)(uvgrtp::frame::rtcp_receiver_report *)) (defined in uvgrtp::rtcp) | uvgrtp::rtcp | |
| install_sdes_hook(void(*hook)(uvgrtp::frame::rtcp_sdes_packet *)) (defined in uvgrtp::rtcp) | uvgrtp::rtcp | |
| install_sender_hook(void(*hook)(uvgrtp::frame::rtcp_sender_report *)) (defined in uvgrtp::rtcp) | uvgrtp::rtcp | |
| send_app_packet(char *name, uint8_t subtype, size_t payload_len, uint8_t *payload) (defined in uvgrtp::rtcp) | uvgrtp::rtcp | |
| send_bye_packet(std::vector< uint32_t > ssrcs) (defined in uvgrtp::rtcp) | uvgrtp::rtcp | |
| send_sdes_packet(std::vector< uvgrtp::frame::rtcp_sdes_item > &items) (defined in uvgrtp::rtcp) | uvgrtp::rtcp | |
| set_ts_info(uint64_t clock_start, uint32_t clock_rate, uint32_t rtp_ts_start) (defined in uvgrtp::rtcp) | uvgrtp::rtcp |
|
+ uvgRTP
+
+ |
+
+ |
+ uvgRTP
+
+ |
+
This is the complete list of members for uvgrtp::session, including all inherited members.
+| create_stream(int src_port, int dst_port, rtp_format_t fmt, int flags) | uvgrtp::session | |
| destroy_stream(uvgrtp::media_stream *stream) | uvgrtp::session |
|
+ uvgRTP
+
+ |
+
+Public Member Functions | |
| uvgrtp::media_stream * | create_stream (int src_port, int dst_port, rtp_format_t fmt, int flags) |
| Create a bidirectional media stream for an RTP session. More... | |
| rtp_error_t | destroy_stream (uvgrtp::media_stream *stream) |
| Destroy a media stream. More... | |
| uvgrtp::media_stream* uvgrtp::session::create_stream | +( | +int | +src_port, | +
| + | + | int | +dst_port, | +
| + | + | rtp_format_t | +fmt, | +
| + | + | int | +flags | +
| + | ) | ++ |
Create a bidirectional media stream for an RTP session.
+If local_addr was provided when uvgrtp::session was created, uvgRTP binds itself to local_addr:src_port, otherwise to INADDR_ANY:src_port
+This object is used for both sending and receiving media, see documentation for uvgrtp::media_stream for more details.
+User can enable and disable functionality of uvgRTP by OR'ing RCE_* flags together and passing them using the flags parameter
+| src_port | Local port that uvgRTP listens to for incoming RTP packets |
| dst_port | Remote port where uvgRTP sends RTP packets |
| fmt | Format of the media stream. see RTP_FORMAT for more details |
| flags | RTP context enable flags, see RTP_CTX_ENABLE_FLAGS for more details |
| uvgrtp::media_stream* | On success |
| nullptr | If src_port or dst_port is 0 |
| nullptr | If fmt is not a supported media format |
| nullptr | If socket initialization failed |
| nullptr | If ZRTP was enabled and it failed to finish handshaking |
| nullptr | If RCE_SRTP is given but uvgRTP has not been compiled with Crypto++ enabled |
| nullptr | If RCE_SRTP is given but RCE_SRTP_KMNGMNT_* flag is not given |
| nullptr | If memory allocation failed |
| rtp_error_t uvgrtp::session::destroy_stream | +( | +uvgrtp::media_stream * | +stream | ) | ++ |
Destroy a media stream.
+| stream | Pointer to the media stream that should be destroyed |
| RTP_OK | On success |
| RTP_INVALID_VALUE | If stream is nullptr |
| RTP_NOT_FOUND | If stream does not belong to this session |
|
+ uvgRTP
+
+ |
+
|
+ uvgRTP
+
+ |
+
| Cuvg_rtp::context | |
| Cuvg_rtp::media_stream | |
| Cuvgrtp::context | |
| Cuvgrtp::media_stream | |
| ▼Crunner | |
| Cuvg_rtp::rtcp | |
| Cuvg_rtp::session | |
| Cuvgrtp::rtcp | |
| Cuvgrtp::session |
To use uvgRTP, you must first create uvgrtp::context object
+Then you need to allocate a uvgrtp::session object from the context object.
+Finally, you need to allocate a uvgrtp::media_stream object from the allocated session object.
+This object is used for both sending and receiving, see documentation for uvgrtp::media_stream::push_frame(), uvgrtp::media_stream::pull_frame() and uvgrtp::media_stream::install_receive_hook() for more details.
+RTP context configuration flags.
-These flags are given to uvg_rtp::media_stream::configure_ctx
+These flags are given to uvgrtp::media_stream::configure_ctx
| Enumerator | |
|---|---|
| RCC_UDP_RCV_BUF_SIZE | How large is the receiver UDP buffer size Default value is 4 MB @@ -265,7 +265,7 @@ Enumerations |
| Enumerator | |
|---|---|
| RTP_NO_FLAGS | No flags |
These flags are given to uvg_rtp::session::create_stream()
+These flags are given to uvgrtp::session::create_stream()