RTP forwarders. More...
Data Structures | |
struct | janus_rtcp_receiver |
Typedefs | |
typedef struct janus_rtcp_receiver | janus_rtcp_receiver |
Functions | |
int | janus_rtp_forwarders_init (void) |
RTP forwarders code initialization. | |
void | janus_rtp_forwarders_deinit (void) |
RTP forwarders code de-initialization. | |
janus_rtp_forwarder * | janus_rtp_forwarder_create (const char *ctx, uint32_t stream_id, int udp_fd, const char *host, int port, uint32_t ssrc, int pt, int srtp_suite, const char *srtp_crypto, gboolean simulcast, int substream, gboolean is_video, gboolean is_data) |
Helper method to create a new janus_rtp_forwarder instance. | |
int | janus_rtp_forwarder_add_rtcp (janus_rtp_forwarder *rf, int rtcp_port, void(*rtcp_callback)(janus_rtp_forwarder *rf, char *buffer, int len)) |
Helper method to add RTCP support to an existing forwarder. | |
void | janus_rtp_forwarder_send_rtp (janus_rtp_forwarder *rf, char *buffer, int len, int substream) |
Helper method to forward an RTP packet within the context of a forwarder. | |
void | janus_rtp_forwarder_send_rtp_full (janus_rtp_forwarder *rf, char *buffer, int len, int substream, uint32_t *ssrcs, char **rids, janus_videocodec vcodec, janus_mutex *rid_mutex) |
Extended version of janus_rtp_forwarder_send_rtp, to be used when the forwarder is configured to act as a simulcast receiver, and so will call janus_rtp_simulcasting_context_process_rtp. | |
void | janus_rtp_forwarder_destroy (janus_rtp_forwarder *rf) |
Helper method to free a janus_rtp_forwarder instance. | |
RTP forwarders.
Implementation of the so called RTP forwarders, that is an helper mechanism that core and/or plugins can make use of to quickly and simply forward RTP streams to a separate UDP address out of the context of any signalling. Such a mechanism can be used, for instance, for scalabiloty purposes, monitoring, or feeding external applications with media traffic handled by Janus..
typedef struct janus_rtcp_receiver janus_rtcp_receiver |
int janus_rtp_forwarder_add_rtcp | ( | janus_rtp_forwarder * | rf, |
int | rtcp_port, | ||
void(*)(janus_rtp_forwarder *rf, char *buffer, int len) | rtcp_callback ) |
Helper method to add RTCP support to an existing forwarder.
[in] | rf | The janus_rtp_forwarder instance to add RTCP to |
[in] | rtcp_port | The port to latch to for RTCP purposes |
[in] | rtcp_callback | The function to invoke when RTCP feedback is received |
janus_rtp_forwarder * janus_rtp_forwarder_create | ( | const char * | ctx, |
uint32_t | stream_id, | ||
int | udp_fd, | ||
const char * | host, | ||
int | port, | ||
uint32_t | ssrc, | ||
int | pt, | ||
int | srtp_suite, | ||
const char * | srtp_crypto, | ||
gboolean | simulcast, | ||
int | substream, | ||
gboolean | is_video, | ||
gboolean | is_data ) |
Helper method to create a new janus_rtp_forwarder instance.
[in] | ctx | The context of this forwarder (e.g., the plugin name) |
[in] | stream_id | The unique forwarder ID to assign as part of the context (0=autogenerate) |
[in] | udp_fd | The socket to use for sending RTP packets |
[in] | host | The address to forward the RTP packets to |
[in] | port | The port to forward the RTP packets to |
[in] | ssrc | The SSRC to put in outgoing RTP packets |
[in] | pt | The payload type to put in outgoing RTP packets |
[in] | srtp_suite | In case SRTP must be enabled, the SRTP suite to use |
[in] | srtp_crypto | In case SRTP must be enabled, the base64-encoded SRTP crypto material to use |
[in] | simulcast | Whether the RTP forwarder should act as a simulcast viewer (meaning it will only forward the highest quality available substream) |
[in] | substream | In case we want to forward a specific simulcast substream, which substream it is |
[in] | is_video | Whether this a video forwarder |
[in] | is_data | Whether this a data channel forwarder |
void janus_rtp_forwarder_destroy | ( | janus_rtp_forwarder * | rf | ) |
Helper method to free a janus_rtp_forwarder instance.
[in] | rf | The janus_rtp_forwarder instance to free |
void janus_rtp_forwarder_send_rtp | ( | janus_rtp_forwarder * | rf, |
char * | buffer, | ||
int | len, | ||
int | substream ) |
Helper method to forward an RTP packet within the context of a forwarder.
[in] | rf | The janus_rtp_forwarder instance to use |
[in] | buffer | The RTP packet buffer |
[in] | len | The length of the RTP packet buffer |
[in] | substream | In case the forwarder is relaying a single simulcast substream, the substream the packet belongs to (pass -1 to ignore) |
void janus_rtp_forwarder_send_rtp_full | ( | janus_rtp_forwarder * | rf, |
char * | buffer, | ||
int | len, | ||
int | substream, | ||
uint32_t * | ssrcs, | ||
char ** | rids, | ||
janus_videocodec | vcodec, | ||
janus_mutex * | rid_mutex ) |
Extended version of janus_rtp_forwarder_send_rtp, to be used when the forwarder is configured to act as a simulcast receiver, and so will call janus_rtp_simulcasting_context_process_rtp.
[in] | rf | The janus_rtp_forwarder instance to use |
[in] | buffer | The RTP packet buffer |
[in] | len | The length of the RTP packet buffer |
[in] | substream | In case the forwarder is relaying a single simulcast substream, the substream the packet belongs to (pass -1 to ignore) |
[in] | ssrcs | The simulcast SSRCs to refer to (may be updated if rids are involved) |
[in] | rids | The simulcast rids to refer to, if any |
[in] | vcodec | Video codec of the RTP payload |
[in] | rid_mutex | A mutex that must be acquired before reading the rids array, if any |
void janus_rtp_forwarders_deinit | ( | void | ) |
RTP forwarders code de-initialization.
int janus_rtp_forwarders_init | ( | void | ) |
RTP forwarders code initialization.