|
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) |
| Send data to remote participant with a custom timestamp. More...
|
|
rtp_error_t | push_frame (std::unique_ptr< uint8_t[]> data, size_t data_len, int flags) |
| Send data to remote participant with a custom timestamp. More...
|
|
rtp_error_t | push_frame (uint8_t *data, size_t data_len, uint32_t ts, int flags) |
| Send data to remote participant with a custom timestamp. More...
|
|
rtp_error_t | push_frame (std::unique_ptr< uint8_t[]> data, size_t data_len, uint32_t ts, int flags) |
| Send data to remote participant with a custom timestamp. More...
|
|
uvgrtp::frame::rtp_frame * | pull_frame () |
| Poll a frame indefinitely 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 *)) |
| Asynchronous way of getting frames. More...
|
|
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...
|
|
◆ 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_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 |
◆ 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
-
◆ install_receive_hook()
rtp_error_t uvgrtp::media_stream::install_receive_hook |
( |
void * |
arg, |
|
|
void(*)(void *, uvgrtp::frame::rtp_frame *) |
hook |
|
) |
| |
Asynchronous way of getting frames.
Receive hook is an alternative to polling frames using uvgrtp::media_stream::pull_frame(). Instead of application asking from uvgRTP if there are any new frames available, uvgRTP will notify the application when a frame has been received
The hook should not be used for media processing as it will block the receiver from reading more frames. Instead, it should only be used as an interface between uvgRTP and the calling application where the frame hand-off happens.
- Parameters
-
arg | Optional argument that is passed to the hook when it is called, can be set to nullptr |
hook | Function pointer to the receive hook that uvgRTP should call |
- Returns
- RTP error code
- Return values
-
RTP_OK | On success |
RTP_INVALID_VALUE | If hook is nullptr |
◆ pull_frame() [1/2]
uvgrtp::frame::rtp_frame* uvgrtp::media_stream::pull_frame |
( |
| ) |
|
Poll a frame indefinitely from the media stream object.
- Returns
- RTP frame
- Return values
-
uvgrtp::frame::rtp_frame* | On success |
nullptr | If an unrecoverable error happened |
◆ 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.
- Returns
- RTP frame
- Return values
-
uvgrtp::frame::rtp_frame* | On success |
nullptr | If a frame was not received within the specified time limit |
nullptr | If an unrecoverable error happened |
◆ push_frame() [1/4]
rtp_error_t uvgrtp::media_stream::push_frame |
( |
std::unique_ptr< uint8_t[]> |
data, |
|
|
size_t |
data_len, |
|
|
int |
flags |
|
) |
| |
Send data to remote participant with a custom timestamp.
If so specified either by the selected media format and/or given RTP_CTX_ENABLE_FLAGS, uvgRTP fragments the input data into RTP packets of 1500 bytes, or to any other size defined by the application using RCC_MTU_SIZE
The frame is automatically reconstructed by the receiver if all fragments have been received successfully.
- Parameters
-
data | Smart pointer to data the that should be sent |
data_len | Length of data |
ts | 32-bit timestamp value for the data |
flags | Optional flags, see RTP_FLAGS for more details |
- Returns
- RTP error code
- Return values
-
RTP_OK | On success |
RTP_INVALID_VALUE | If one of the parameters are invalid |
RTP_MEMORY_ERROR | If the data chunk is too large to be processed |
RTP_SEND_ERROR | If uvgRTP failed to send the data to remote |
RTP_GENERIC_ERROR | If an unspecified error occurred |
◆ push_frame() [2/4]
rtp_error_t uvgrtp::media_stream::push_frame |
( |
std::unique_ptr< uint8_t[]> |
data, |
|
|
size_t |
data_len, |
|
|
uint32_t |
ts, |
|
|
int |
flags |
|
) |
| |
Send data to remote participant with a custom timestamp.
If so specified either by the selected media format and/or given RTP_CTX_ENABLE_FLAGS, uvgRTP fragments the input data into RTP packets of 1500 bytes, or to any other size defined by the application using RCC_MTU_SIZE
The frame is automatically reconstructed by the receiver if all fragments have been received successfully.
If application so wishes, it may override uvgRTP's own timestamp calculations and provide timestamping information for the stream itself. This requires that the application provides a sensible value for the ts parameter. If RTCP has been enabled, uvgrtp::rtcp::set_ts_info() should have been called.
- Parameters
-
data | Smart pointer to data the that should be sent |
data_len | Length of data |
ts | 32-bit timestamp value for the data |
flags | Optional flags, see RTP_FLAGS for more details |
- Returns
- RTP error code
- Return values
-
RTP_OK | On success |
RTP_INVALID_VALUE | If one of the parameters are invalid |
RTP_MEMORY_ERROR | If the data chunk is too large to be processed |
RTP_SEND_ERROR | If uvgRTP failed to send the data to remote |
RTP_GENERIC_ERROR | If an unspecified error occurred |
◆ push_frame() [3/4]
rtp_error_t uvgrtp::media_stream::push_frame |
( |
uint8_t * |
data, |
|
|
size_t |
data_len, |
|
|
int |
flags |
|
) |
| |
Send data to remote participant with a custom timestamp.
If so specified either by the selected media format and/or given RTP_CTX_ENABLE_FLAGS, uvgRTP fragments the input data into RTP packets of 1500 bytes, or to any other size defined by the application using RCC_MTU_SIZE
The frame is automatically reconstructed by the receiver if all fragments have been received successfully.
- Parameters
-
data | Pointer to data the that should be sent |
data_len | Length of data |
ts | 32-bit timestamp value for the data |
flags | Optional flags, see RTP_FLAGS for more details |
- Returns
- RTP error code
- Return values
-
RTP_OK | On success |
RTP_INVALID_VALUE | If one of the parameters are invalid |
RTP_MEMORY_ERROR | If the data chunk is too large to be processed |
RTP_SEND_ERROR | If uvgRTP failed to send the data to remote |
RTP_GENERIC_ERROR | If an unspecified error occurred |
◆ push_frame() [4/4]
rtp_error_t uvgrtp::media_stream::push_frame |
( |
uint8_t * |
data, |
|
|
size_t |
data_len, |
|
|
uint32_t |
ts, |
|
|
int |
flags |
|
) |
| |
Send data to remote participant with a custom timestamp.
If so specified either by the selected media format and/or given RTP_CTX_ENABLE_FLAGS, uvgRTP fragments the input data into RTP packets of 1500 bytes, or to any other size defined by the application using RCC_MTU_SIZE
The frame is automatically reconstructed by the receiver if all fragments have been received successfully.
If application so wishes, it may override uvgRTP's own timestamp calculations and provide timestamping information for the stream itself. This requires that the application provides a sensible value for the ts parameter. If RTCP has been enabled, uvgrtp::rtcp::set_ts_info() should have been called.
- Parameters
-
data | Pointer to data the that should be sent |
data_len | Length of data |
ts | 32-bit timestamp value for the data |
flags | Optional flags, see RTP_FLAGS for more details |
- Returns
- RTP error code
- Return values
-
RTP_OK | On success |
RTP_INVALID_VALUE | If one of the parameters are invalid |
RTP_MEMORY_ERROR | If the data chunk is too large to be processed |
RTP_SEND_ERROR | If uvgRTP failed to send the data to remote |
RTP_GENERIC_ERROR | If an unspecified error occurred |
The documentation for this class was generated from the following file: