Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
SDP media description. More...
#include <media_description.h>
Public Member Functions | |
MediaDescription (core::IArena &arena) | |
Initialize empty media description. More... | |
void | clear () |
Clear all fields. More... | |
MediaType | type () const |
Media type. More... | |
int | port () const |
Transport port. More... | |
int | nb_ports () const |
Number of transport port(s). More... | |
MediaTransport | transport () const |
Transport protocol. More... | |
unsigned | default_payload_id () const |
Default media payload id. More... | |
size_t | nb_payload_ids () const |
Number of payload ids. More... | |
unsigned | payload_id (size_t i) const |
Get the payload id that was listed at the i position in the media description. More... | |
size_t | nb_connection_data () const |
Number of connection data. More... | |
const ConnectionData & | connection_data (size_t i) const |
Get the reference of the i-th connection data that was listed just after the media description. More... | |
ROC_ATTR_NODISCARD bool | set_type (MediaType type) |
Set media type. More... | |
ROC_ATTR_NODISCARD bool | set_transport (MediaTransport transport) |
Set proto. More... | |
ROC_ATTR_NODISCARD bool | set_port (long port) |
Set transport port. More... | |
ROC_ATTR_NODISCARD bool | set_nb_ports (long nb_ports) |
Set number of transport port(s). More... | |
ROC_ATTR_NODISCARD bool | add_payload_id (unsigned payload_id) |
Add a media payload id. More... | |
ROC_ATTR_NODISCARD bool | add_connection_data (address::AddrFamily addrtype, const char *str, size_t str_len) |
Add a connection field from a string. More... | |
Public Member Functions inherited from roc::core::RefCounted< MediaDescription, core::ArenaAllocation > | |
RefCounted () | |
Initialize. More... | |
RefCounted (const core::ArenaAllocation &policy) | |
Initialize. More... | |
int | getref () const |
Get reference counter. More... | |
void | incref () const |
Increment reference counter. More... | |
void | decref () const |
Decrement reference counter. More... | |
Public Member Functions inherited from roc::core::ListNode< Tag > | |
ListData * | list_data () const |
Get pointer to internal data. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from roc::core::ListNode< Tag > | |
static ListNode * | list_node (ListData *data) |
Get pointer to parent node from pointer to internal data. More... | |
Protected Member Functions inherited from roc::core::ArenaAllocation | |
IArena & | arena () const |
Get arena. More... | |
ArenaAllocation (IArena &arena) | |
Initialize. More... | |
template<class T > | |
void | destroy (T &object) |
Destroy object and return memory to arena. More... | |
roc::sdp::MediaDescription::MediaDescription | ( | core::IArena & | arena | ) |
Initialize empty media description.
ROC_ATTR_NODISCARD bool roc::sdp::MediaDescription::add_connection_data | ( | address::AddrFamily | addrtype, |
const char * | str, | ||
size_t | str_len | ||
) |
Add a connection field from a string.
ROC_ATTR_NODISCARD bool roc::sdp::MediaDescription::add_payload_id | ( | unsigned | payload_id | ) |
Add a media payload id.
void roc::sdp::MediaDescription::clear | ( | ) |
Clear all fields.
const ConnectionData& roc::sdp::MediaDescription::connection_data | ( | size_t | i | ) | const |
Get the reference of the i-th connection data that was listed just after the media description.
unsigned roc::sdp::MediaDescription::default_payload_id | ( | ) | const |
Default media payload id.
size_t roc::sdp::MediaDescription::nb_connection_data | ( | ) | const |
Number of connection data.
size_t roc::sdp::MediaDescription::nb_payload_ids | ( | ) | const |
Number of payload ids.
int roc::sdp::MediaDescription::nb_ports | ( | ) | const |
Number of transport port(s).
unsigned roc::sdp::MediaDescription::payload_id | ( | size_t | i | ) | const |
Get the payload id that was listed at the i position in the media description.
int roc::sdp::MediaDescription::port | ( | ) | const |
Transport port.
ROC_ATTR_NODISCARD bool roc::sdp::MediaDescription::set_nb_ports | ( | long | nb_ports | ) |
Set number of transport port(s).
ROC_ATTR_NODISCARD bool roc::sdp::MediaDescription::set_port | ( | long | port | ) |
Set transport port.
ROC_ATTR_NODISCARD bool roc::sdp::MediaDescription::set_transport | ( | MediaTransport | transport | ) |
Set proto.
ROC_ATTR_NODISCARD bool roc::sdp::MediaDescription::set_type | ( | MediaType | type | ) |
Set media type.
MediaTransport roc::sdp::MediaDescription::transport | ( | ) | const |
Transport protocol.
MediaType roc::sdp::MediaDescription::type | ( | ) | const |
Media type.