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() {
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 12]
- - - - - + + + + +
 Nuvg_rtp
 Ccontext
 Csession
 Cmedia_stream
 Crtcp
 Nuvgrtp
 Ccontext
 Csession
 Cmedia_stream
 Crtcp
diff --git a/docs/html/classes.html b/docs/html/classes.html index 633bc67..d1d40a3 100644 --- a/docs/html/classes.html +++ b/docs/html/classes.html @@ -69,16 +69,16 @@ $(function() {
C
-
context (uvg_rtp)
+
context (uvgrtp)
M
-
media_stream (uvg_rtp)
+
media_stream (uvgrtp)
R
-
rtcp (uvg_rtp)
+
rtcp (uvgrtp)
S
-
session (uvg_rtp)
+
session (uvgrtp)
diff --git a/docs/html/classuvgrtp_1_1context-members.html b/docs/html/classuvgrtp_1_1context-members.html new file mode 100644 index 0000000..46a7219 --- /dev/null +++ b/docs/html/classuvgrtp_1_1context-members.html @@ -0,0 +1,86 @@ + + + + + + + +uvgRTP: Member List + + + + + + + + + +
+
+ + + + + + +
+
uvgRTP +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
uvgrtp::context Member List
+
+
+ +

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
+ + + + diff --git a/docs/html/classuvgrtp_1_1context.html b/docs/html/classuvgrtp_1_1context.html new file mode 100644 index 0000000..ff2495c --- /dev/null +++ b/docs/html/classuvgrtp_1_1context.html @@ -0,0 +1,261 @@ + + + + + + + +uvgRTP: uvgrtp::context Class Reference + + + + + + + + + +
+
+ + + + + + +
+
uvgRTP +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
uvgrtp::context Class Reference
+
+
+ + + + + + + + + + + + + + + + + +

+Public Member Functions

 context ()
 RTP context constructor. More...
 
 ~context ()
 RTP context destructor. More...
 
uvgrtp::sessioncreate_session (std::string addr)
 Create a new RTP session. More...
 
uvgrtp::sessioncreate_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...
 
+

Constructor & Destructor Documentation

+ +

◆ context()

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

+ +
+
+ +

◆ ~context()

+ +
+
+ + + + + + + +
uvgrtp::context::~context ()
+
+ +

RTP context destructor.

+

This does not destroy active sessions. They must be destroyed manually by calling uvgrtp::context::destroy_session()

+ +
+
+

Member Function Documentation

+ +

◆ create_session() [1/2]

+ +
+
+ + + + + + + + +
uvgrtp::session* uvgrtp::context::create_session (std::string addr)
+
+ +

Create a new RTP session.

+
Parameters
+ + +
addrIPv4 address of the remote participant
+
+
+
Returns
RTP session object
+
Return values
+ + + + +
uvgrtp::sessionOn success
nullptrIf "addr" is empty
nullptrIf memory allocation failed
+
+
+ +
+
+ +

◆ create_session() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
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

+
Parameters
+ + + +
remote_addrIPv4 address of the remote participant
local_addrIPv4 address of a local interface
+
+
+
Returns
RTP session object
+
Return values
+ + + + +
uvgrtp::sessionOn success
nullptrIf remote_addr or local_addr is empty
nullptrIf memory allocation failed
+
+
+ +
+
+ +

◆ destroy_session()

+ +
+
+ + + + + + + + +
rtp_error_t uvgrtp::context::destroy_session (uvgrtp::sessionsession)
+
+ +

Destroy RTP session and all of its media streams.

+
Parameters
+ + +
sessionPointer to the session object that should be destroyed
+
+
+
Returns
RTP error code
+
Return values
+ + + +
RTP_OKOn success
RTP_INVALID_VALUEIf session is nullptr
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/classuvgrtp_1_1media__stream-members.html b/docs/html/classuvgrtp_1_1media__stream-members.html new file mode 100644 index 0000000..34e194e --- /dev/null +++ b/docs/html/classuvgrtp_1_1media__stream-members.html @@ -0,0 +1,91 @@ + + + + + + + +uvgRTP: Member List + + + + + + + + + +
+
+ + + + + + +
+
uvgRTP +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
uvgrtp::media_stream Member List
+
+
+ +

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
+ + + + diff --git a/docs/html/classuvgrtp_1_1media__stream.html b/docs/html/classuvgrtp_1_1media__stream.html new file mode 100644 index 0000000..64cc389 --- /dev/null +++ b/docs/html/classuvgrtp_1_1media__stream.html @@ -0,0 +1,304 @@ + + + + + + + +uvgRTP: uvgrtp::media_stream Class Reference + + + + + + + + + +
+
+ + + + + + +
+
uvgRTP +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
uvgrtp::media_stream Class Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+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::rtcpget_rtcp ()
 Get pointer to the RTCP object of the media stream. More...
 
+

Member Function Documentation

+ +

◆ configure_ctx()

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

+
Returns
RTP error code
+
Return values
+ + + + + +
RTP_OKOn success
RTP_INVALID_VALUEIf the provided value is not valid for a given configuration flag
RTP_INVALID_VALUEIf the provided configuration flag is not supported
RTP_GENERIC_ERRORIf setsockopt(2) failed
+
+
+ +
+
+ +

◆ get_rtcp()

+ +
+
+ + + + + + + +
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

+
Returns
Pointer to RTCP object
+
Return values
+ + + +
uvgrtp::rtcp*If RTCP has been enabled (RCE_RTCP has been given to uvgrtp::session::create_stream())
nullptrIf RTCP has not been enabled
+
+
+ +
+
+ +

◆ install_receive_hook()

+ +
+
+ + + + + + + + + + + + + + + + + + +
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

+ +
+
+ +

◆ pull_frame() [1/2]

+ +
+
+ + + + + + + +
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

+ +
+
+ +

◆ pull_frame() [2/2]

+ +
+
+ + + + + + + + +
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

+ +
+
+ +

◆ push_frame()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
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

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/classuvgrtp_1_1rtcp-members.html b/docs/html/classuvgrtp_1_1rtcp-members.html new file mode 100644 index 0000000..033b429 --- /dev/null +++ b/docs/html/classuvgrtp_1_1rtcp-members.html @@ -0,0 +1,89 @@ + + + + + + + +uvgRTP: Member List + + + + + + + + + +
+
+ + + + + + +
+
uvgRTP +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
uvgrtp::rtcp Member List
+
+
+ +

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
+ + + + diff --git a/docs/html/classuvgrtp_1_1rtcp.html b/docs/html/classuvgrtp_1_1rtcp.html new file mode 100644 index 0000000..4626bb0 --- /dev/null +++ b/docs/html/classuvgrtp_1_1rtcp.html @@ -0,0 +1,118 @@ + + + + + + + +uvgRTP: uvgrtp::rtcp Class Reference + + + + + + + + + +
+
+ + + + + + +
+
uvgRTP +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
uvgrtp::rtcp Class Reference
+
+
+
+Inheritance diagram for uvgrtp::rtcp:
+
+
+ +
+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

+rtp_error_t send_sdes_packet (std::vector< uvgrtp::frame::rtcp_sdes_item > &items)
 
+rtp_error_t send_app_packet (char *name, uint8_t subtype, size_t payload_len, uint8_t *payload)
 
+rtp_error_t send_bye_packet (std::vector< uint32_t > ssrcs)
 
+void set_ts_info (uint64_t clock_start, uint32_t clock_rate, uint32_t rtp_ts_start)
 
+rtp_error_t install_sender_hook (void(*hook)(uvgrtp::frame::rtcp_sender_report *))
 
+rtp_error_t install_receiver_hook (void(*hook)(uvgrtp::frame::rtcp_receiver_report *))
 
+rtp_error_t install_sdes_hook (void(*hook)(uvgrtp::frame::rtcp_sdes_packet *))
 
+rtp_error_t install_app_hook (void(*hook)(uvgrtp::frame::rtcp_app_packet *))
 
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/classuvgrtp_1_1rtcp.png b/docs/html/classuvgrtp_1_1rtcp.png new file mode 100644 index 0000000..3e06e13 Binary files /dev/null and b/docs/html/classuvgrtp_1_1rtcp.png differ diff --git a/docs/html/classuvgrtp_1_1session-members.html b/docs/html/classuvgrtp_1_1session-members.html new file mode 100644 index 0000000..cfad4a2 --- /dev/null +++ b/docs/html/classuvgrtp_1_1session-members.html @@ -0,0 +1,83 @@ + + + + + + + +uvgRTP: Member List + + + + + + + + + +
+
+ + + + + + +
+
uvgRTP +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
uvgrtp::session Member List
+
+
+ +

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
+ + + + diff --git a/docs/html/classuvgrtp_1_1session.html b/docs/html/classuvgrtp_1_1session.html new file mode 100644 index 0000000..3585ca1 --- /dev/null +++ b/docs/html/classuvgrtp_1_1session.html @@ -0,0 +1,198 @@ + + + + + + + +uvgRTP: uvgrtp::session Class Reference + + + + + + + + + +
+
+ + + + + + +
+
uvgRTP +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
uvgrtp::session Class Reference
+
+
+ + + + + + + + +

+Public Member Functions

uvgrtp::media_streamcreate_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...
 
+

Member Function Documentation

+ +

◆ create_stream()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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

+
Parameters
+ + + + + +
src_portLocal port that uvgRTP listens to for incoming RTP packets
dst_portRemote port where uvgRTP sends RTP packets
fmtFormat of the media stream. see RTP_FORMAT for more details
flagsRTP context enable flags, see RTP_CTX_ENABLE_FLAGS for more details
+
+
+
Returns
RTP media stream object
+
Return values
+ + + + + + + + + +
uvgrtp::media_stream*On success
nullptrIf src_port or dst_port is 0
nullptrIf fmt is not a supported media format
nullptrIf socket initialization failed
nullptrIf ZRTP was enabled and it failed to finish handshaking
nullptrIf RCE_SRTP is given but uvgRTP has not been compiled with Crypto++ enabled
nullptrIf RCE_SRTP is given but RCE_SRTP_KMNGMNT_* flag is not given
nullptrIf memory allocation failed
+
+
+ +
+
+ +

◆ destroy_stream()

+ +
+
+ + + + + + + + +
rtp_error_t uvgrtp::session::destroy_stream (uvgrtp::media_streamstream)
+
+ +

Destroy a media stream.

+
Parameters
+ + +
streamPointer to the media stream that should be destroyed
+
+
+
Returns
RTP error code
+
Return values
+ + + + +
RTP_OKOn success
RTP_INVALID_VALUEIf stream is nullptr
RTP_NOT_FOUNDIf stream does not belong to this session
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/clock_8hh_source.html b/docs/html/clock_8hh_source.html index 8e663e2..a5555b3 100644 --- a/docs/html/clock_8hh_source.html +++ b/docs/html/clock_8hh_source.html @@ -73,7 +73,7 @@ $(function() {
2 
3 #include <chrono>
4 
-
5 namespace uvg_rtp {
+
5 namespace uvgrtp {
6  namespace clock {
7 
8  /* network time protocol */
@@ -113,6 +113,8 @@ $(function() {
42 #endif
43  };
44 };
+
45 
+
46 namespace uvg_rtp = uvgrtp;