Loading...
Searching...
No Matches
rtp.h
Go to the documentation of this file.
#ifndef JANUS_RTP_H
#define JANUS_RTP_H
#include <arpa/inet.h>
#if defined (__MACH__) || defined(__FreeBSD__)
#include <machine/endian.h>
#define __BYTE_ORDER BYTE_ORDER
#define __BIG_ENDIAN BIG_ENDIAN
#define __LITTLE_ENDIAN LITTLE_ENDIAN
#else
#include <endian.h>
#endif
#include <inttypes.h>
#include <string.h>
#include <glib.h>
#include <jansson.h>
#include "plugins/plugin.h"
#include "utils.h"
#define RTP_HEADER_SIZE 12
typedef struct rtp_header
{
#if __BYTE_ORDER == __BIG_ENDIAN
uint16_t version:2;
uint16_t padding:1;
uint16_t extension:1;
uint16_t csrccount:4;
uint16_t markerbit:1;
uint16_t type:7;
#elif __BYTE_ORDER == __LITTLE_ENDIAN
uint16_t csrccount:4;
uint16_t extension:1;
uint16_t padding:1;
uint16_t version:2;
uint16_t type:7;
uint16_t markerbit:1;
#endif
uint16_t seq_number;
uint32_t timestamp;
uint32_t ssrc;
uint32_t csrc[0];
} rtp_header;
typedef rtp_header janus_rtp_header;
typedef struct janus_rtp_packet {
char *data;
gint length;
gint64 created;
gint64 last_retransmit;
gint64 current_backoff;
janus_plugin_rtp_extensions extensions;
} janus_rtp_packet;
typedef struct janus_rtp_header_extension {
uint16_t type;
uint16_t length;
} janus_rtp_header_extension;
typedef struct janus_rtp_rfc2833_payload {
#if __BYTE_ORDER == __BIG_ENDIAN
uint8_t event;
uint8_t end:1;
uint8_t reserved:1;
uint8_t volume:6;
uint16_t duration;
#elif __BYTE_ORDER == __LITTLE_ENDIAN
uint8_t event;
uint8_t volume:6;
uint8_t reserved:1;
uint8_t end:1;
uint16_t duration;
#endif
} janus_rtp_rfc2833_payload;
#define JANUS_RTP_EXTMAP_AUDIO_LEVEL "urn:ietf:params:rtp-hdrext:ssrc-audio-level"
#define JANUS_RTP_EXTMAP_TOFFSET "urn:ietf:params:rtp-hdrext:toffset"
#define JANUS_RTP_EXTMAP_ABS_SEND_TIME "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"
#define JANUS_RTP_EXTMAP_ABS_CAPTURE_TIME "http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time"
#define JANUS_RTP_EXTMAP_VIDEO_ORIENTATION "urn:3gpp:video-orientation"
#define JANUS_RTP_EXTMAP_TRANSPORT_WIDE_CC "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01"
#define JANUS_RTP_EXTMAP_PLAYOUT_DELAY "http://www.webrtc.org/experiments/rtp-hdrext/playout-delay"
#define JANUS_RTP_EXTMAP_MID "urn:ietf:params:rtp-hdrext:sdes:mid"
#define JANUS_RTP_EXTMAP_RID "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id"
#define JANUS_RTP_EXTMAP_REPAIRED_RID "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"
#define JANUS_RTP_EXTMAP_DEPENDENCY_DESC "https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension"
#define JANUS_RTP_EXTMAP_VIDEO_LAYERS "http://www.webrtc.org/experiments/rtp-hdrext/video-layers-allocation00"
#define JANUS_RTP_EXTMAP_ENCRYPTED "urn:ietf:params:rtp-hdrext:encrypt"
int janus_rtp_extension_id(const char *type);
typedef enum janus_audiocodec {
JANUS_AUDIOCODEC_NONE,
JANUS_AUDIOCODEC_OPUS,
JANUS_AUDIOCODEC_MULTIOPUS,
JANUS_AUDIOCODEC_OPUSRED,
JANUS_AUDIOCODEC_PCMU,
JANUS_AUDIOCODEC_PCMA,
JANUS_AUDIOCODEC_G722,
JANUS_AUDIOCODEC_ISAC_32K,
JANUS_AUDIOCODEC_ISAC_16K,
JANUS_AUDIOCODEC_L16_48K,
JANUS_AUDIOCODEC_L16_16K
} janus_audiocodec;
const char *janus_audiocodec_name(janus_audiocodec acodec);
janus_audiocodec janus_audiocodec_from_name(const char *name);
int janus_audiocodec_pt(janus_audiocodec acodec);
typedef enum janus_videocodec {
JANUS_VIDEOCODEC_NONE,
JANUS_VIDEOCODEC_VP8,
JANUS_VIDEOCODEC_VP9,
JANUS_VIDEOCODEC_H264,
JANUS_VIDEOCODEC_AV1,
JANUS_VIDEOCODEC_H265
} janus_videocodec;
const char *janus_videocodec_name(janus_videocodec vcodec);
janus_videocodec janus_videocodec_from_name(const char *name);
int janus_videocodec_pt(janus_videocodec vcodec);
gboolean janus_is_rtp(char *buf, guint len);
char *janus_rtp_payload(char *buf, int len, int *plen);
int janus_rtp_header_extension_get_id(const char *sdp, const char *extension);
const char *janus_rtp_header_extension_get_from_id(const char *sdp, int id);
int janus_rtp_header_extension_parse_audio_level(char *buf, int len, int id, gboolean *vad, int *level);
int janus_rtp_header_extension_parse_video_orientation(char *buf, int len, int id,
gboolean *c, gboolean *f, gboolean *r1, gboolean *r0);
int janus_rtp_header_extension_parse_playout_delay(char *buf, int len, int id,
uint16_t *min_delay, uint16_t *max_delay);
int janus_rtp_header_extension_parse_mid(char *buf, int len, int id,
char *sdes_item, int sdes_len);
int janus_rtp_header_extension_parse_rid(char *buf, int len, int id,
char *sdes_item, int sdes_len);
int janus_rtp_header_extension_parse_dependency_desc(char *buf, int len, int id,
uint8_t *dd_item, int *dd_len);
int janus_rtp_header_extension_parse_abs_send_time(char *buf, int len, int id, uint32_t *abs_ts);
int janus_rtp_header_extension_set_abs_send_time(char *buf, int len, int id, uint32_t abs_ts);
int janus_rtp_header_extension_parse_abs_capture_time(char *buf, int len, int id, uint64_t *abs_ts);
int janus_rtp_header_extension_set_abs_capture_time(char *buf, int len, int id, uint64_t abs_ts);
int janus_rtp_header_extension_parse_transport_wide_cc(char *buf, int len, int id, uint16_t *transSeqNum);
int janus_rtp_header_extension_set_transport_wide_cc(char *buf, int len, int id, uint16_t transSeqNum);
int janus_rtp_header_extension_parse_video_layers_allocation(char *buf, int len, int id,
int8_t *spatial_layers, int8_t *temporal_layers);
int janus_rtp_header_extension_replace_id(char *buf, int len, int id, int new_id);
typedef struct janus_rtp_switching_context {
uint32_t last_ssrc, last_ts, base_ts, base_ts_prev, prev_ts, target_ts, start_ts;
uint16_t last_seq, prev_seq, base_seq, base_seq_prev;
gboolean ts_reset, seq_reset, new_ssrc;
gint16 seq_offset;
gint32 prev_delay, active_delay, ts_offset;
gint64 last_time, reference_time, start_time, evaluating_start_time;
} janus_rtp_switching_context;
void janus_rtp_switching_context_reset(janus_rtp_switching_context *context);
void janus_rtp_header_update(janus_rtp_header *header, janus_rtp_switching_context *context, gboolean video, int step);
#define RTP_AUDIO_SKEW_TH_MS 120
#define RTP_VIDEO_SKEW_TH_MS 120
#define SKEW_DETECTION_WAIT_TIME_SECS 10
int janus_rtp_skew_compensate_audio(janus_rtp_header *header, janus_rtp_switching_context *context, gint64 now);
int janus_rtp_skew_compensate_video(janus_rtp_header *header, janus_rtp_switching_context *context, gint64 now);
typedef struct janus_av1_svc_context {
uint8_t tcnt;
uint8_t tioff;
GHashTable *templates;
int spatial_layers, temporal_layers;
gboolean updated;
} janus_av1_svc_context;
typedef struct janus_av1_svc_template {
uint8_t id;
int spatial;
int temporal;
} janus_av1_svc_template;
void janus_av1_svc_context_reset(janus_av1_svc_context *context);
gboolean janus_av1_svc_context_process_dd(janus_av1_svc_context *context,
uint8_t *dd, int dd_len, uint8_t *template_id, uint8_t *ebit);
typedef struct janus_rtp_simulcasting_context {
gint rid_ext_id;
janus_av1_svc_context av1_context[3];
int substream;
int substream_target, substream_target_temp;
int templayer;
int templayer_target;
guint32 drop_trigger;
gint64 last_relayed;
gboolean changed_substream;
gboolean changed_temporal;
gboolean need_pli;
} janus_rtp_simulcasting_context;
void janus_rtp_simulcasting_context_reset(janus_rtp_simulcasting_context *context);
void janus_rtp_simulcasting_prepare(json_t *simulcast, int *rid_ext_id, uint32_t *ssrcs, char **rids);
void janus_rtp_simulcasting_cleanup(int *rid_ext_id, uint32_t *ssrcs, char **rids, janus_mutex *rid_mutex);
gboolean janus_rtp_simulcasting_context_process_rtp(janus_rtp_simulcasting_context *context,
char *buf, int len, uint8_t *dd_content, int dd_len, uint32_t *ssrcs, char **rids,
janus_videocodec vcodec, janus_rtp_switching_context *sc, janus_mutex *rid_mutex);
typedef struct janus_rtp_svc_context {
struct janus_av1_svc_context dd_context;
int spatial;
int spatial_target;
int temporal;
int temporal_target;
guint32 drop_trigger;
gint64 last_spatial_layer[3];
gboolean changed_spatial;
gboolean changed_temporal;
gboolean need_pli;
} janus_rtp_svc_context;
void janus_rtp_svc_context_reset(janus_rtp_svc_context *context);
gboolean janus_rtp_svc_context_process_rtp(janus_rtp_svc_context *context,
char *buf, int len, uint8_t *dd_content, int dd_len,
janus_videocodec vcodec, janus_vp9_svc_info *info, janus_rtp_switching_context *sc);
#endif
janus_mutex
GMutex janus_mutex
Janus mutex implementation.
Definition mutex.h:73
plugin.h
Plugin-Core communication (implementation).
json_t
struct json_t json_t
Definition plugin.h:236
janus_videocodec_name
const char * janus_videocodec_name(janus_videocodec vcodec)
Definition rtp.c:1084
janus_rtp_header_extension_set_abs_send_time
int janus_rtp_header_extension_set_abs_send_time(char *buf, int len, int id, uint32_t abs_ts)
Helper to set an abs-send-time RTP extension (http://www.webrtc.org/experiments/rtp-hdrext/abs-send-t...
Definition rtp.c:369
janus_rtp_skew_compensate_audio
int janus_rtp_skew_compensate_audio(janus_rtp_header *header, janus_rtp_switching_context *context, gint64 now)
Use the context info to compensate for audio source skew, if needed.
Definition rtp.c:614
janus_rtp_header_update
void janus_rtp_header_update(janus_rtp_header *header, janus_rtp_switching_context *context, gboolean video, int step)
Use the context info to update the RTP header of a packet, if needed.
Definition rtp.c:844
janus_av1_svc_context_reset
void janus_av1_svc_context_reset(janus_av1_svc_context *context)
Set (or reset) the context fields to their default values.
Definition rtp.c:1678
janus_av1_svc_context_process_dd
gboolean janus_av1_svc_context_process_dd(janus_av1_svc_context *context, uint8_t *dd, int dd_len, uint8_t *template_id, uint8_t *ebit)
Process a Dependency Descriptor payload, updating the SVC context accordingly.
Definition rtp.c:1687
janus_rtp_switching_context_reset
void janus_rtp_switching_context_reset(janus_rtp_switching_context *context)
Set (or reset) the context fields to their default values.
Definition rtp.c:607
janus_audiocodec
janus_audiocodec
Definition rtp.h:122
JANUS_AUDIOCODEC_PCMU
@ JANUS_AUDIOCODEC_PCMU
Definition rtp.h:127
JANUS_AUDIOCODEC_MULTIOPUS
@ JANUS_AUDIOCODEC_MULTIOPUS
Definition rtp.h:125
JANUS_AUDIOCODEC_L16_48K
@ JANUS_AUDIOCODEC_L16_48K
Definition rtp.h:132
JANUS_AUDIOCODEC_OPUSRED
@ JANUS_AUDIOCODEC_OPUSRED
Definition rtp.h:126
JANUS_AUDIOCODEC_NONE
@ JANUS_AUDIOCODEC_NONE
Definition rtp.h:123
JANUS_AUDIOCODEC_ISAC_32K
@ JANUS_AUDIOCODEC_ISAC_32K
Definition rtp.h:130
JANUS_AUDIOCODEC_L16_16K
@ JANUS_AUDIOCODEC_L16_16K
Definition rtp.h:133
JANUS_AUDIOCODEC_G722
@ JANUS_AUDIOCODEC_G722
Definition rtp.h:129
JANUS_AUDIOCODEC_OPUS
@ JANUS_AUDIOCODEC_OPUS
Definition rtp.h:124
JANUS_AUDIOCODEC_PCMA
@ JANUS_AUDIOCODEC_PCMA
Definition rtp.h:128
JANUS_AUDIOCODEC_ISAC_16K
@ JANUS_AUDIOCODEC_ISAC_16K
Definition rtp.h:131
janus_rtp_simulcasting_context_reset
void janus_rtp_simulcasting_context_reset(janus_rtp_simulcasting_context *context)
Set (or reset) the context fields to their default values.
Definition rtp.c:1139
janus_audiocodec_from_name
janus_audiocodec janus_audiocodec_from_name(const char *name)
Definition rtp.c:1028
janus_rtp_header_extension_parse_dependency_desc
int janus_rtp_header_extension_parse_dependency_desc(char *buf, int len, int id, uint8_t *dd_item, int *dd_len)
Helper to parse a dependency descriptor RTP extension (https://aomediacodec.github....
Definition rtp.c:329
janus_rtp_simulcasting_cleanup
void janus_rtp_simulcasting_cleanup(int *rid_ext_id, uint32_t *ssrcs, char **rids, janus_mutex *rid_mutex)
Helper method to cleanup some or all of the simulcasting info (rids and/or SSRCs) we may have prepare...
Definition rtp.c:1183
janus_rtp_header_extension_replace_id
int janus_rtp_header_extension_replace_id(char *buf, int len, int id, int new_id)
Helper to replace the ID of an RTP extension with a different one (e.g., to turn a repaired-rtp-strea...
Definition rtp.c:515
janus_rtp_svc_context_process_rtp
gboolean janus_rtp_svc_context_process_rtp(janus_rtp_svc_context *context, char *buf, int len, uint8_t *dd_content, int dd_len, janus_videocodec vcodec, janus_vp9_svc_info *info, janus_rtp_switching_context *sc)
Process an RTP packet, and decide whether this should be relayed or not, updating the context accordi...
Definition rtp.c:1443
janus_rtp_header_extension_set_transport_wide_cc
int janus_rtp_header_extension_set_transport_wide_cc(char *buf, int len, int id, uint16_t transSeqNum)
Helper to set a transport wide sequence number (https://tools.ietf.org/html/draft-holmer-rmcat-transp...
Definition rtp.c:434
janus_rtp_header_extension_parse_video_layers_allocation
int janus_rtp_header_extension_parse_video_layers_allocation(char *buf, int len, int id, int8_t *spatial_layers, int8_t *temporal_layers)
Helper to parse a video layers allocation (http://www.webrtc.org/experiments/rtp-hdrext/video-layers-...
Definition rtp.c:448
janus_videocodec
janus_videocodec
Definition rtp.h:139
JANUS_VIDEOCODEC_NONE
@ JANUS_VIDEOCODEC_NONE
Definition rtp.h:140
JANUS_VIDEOCODEC_H264
@ JANUS_VIDEOCODEC_H264
Definition rtp.h:143
JANUS_VIDEOCODEC_AV1
@ JANUS_VIDEOCODEC_AV1
Definition rtp.h:144
JANUS_VIDEOCODEC_VP9
@ JANUS_VIDEOCODEC_VP9
Definition rtp.h:142
JANUS_VIDEOCODEC_VP8
@ JANUS_VIDEOCODEC_VP8
Definition rtp.h:141
JANUS_VIDEOCODEC_H265
@ JANUS_VIDEOCODEC_H265
Definition rtp.h:145
janus_rtp_header_extension_get_from_id
const char * janus_rtp_header_extension_get_from_id(const char *sdp, int id)
Ugly and dirty helper to quickly get the RTP extension namespace associated with an id (extmap) in an...
Definition rtp.c:93
janus_videocodec_pt
int janus_videocodec_pt(janus_videocodec vcodec)
Definition rtp.c:1119
janus_rtp_header_extension_parse_playout_delay
int janus_rtp_header_extension_parse_playout_delay(char *buf, int len, int id, uint16_t *min_delay, uint16_t *max_delay)
Helper to parse a playout-delay RTP extension (https://webrtc.org/experiments/rtp-hdrext/playout-dela...
Definition rtp.c:267
janus_rtp_header_extension_parse_transport_wide_cc
int janus_rtp_header_extension_parse_transport_wide_cc(char *buf, int len, int id, uint16_t *transSeqNum)
Helper to parse a transport wide sequence number (https://tools.ietf.org/html/draft-holmer-rmcat-tran...
Definition rtp.c:414
janus_rtp_payload
char * janus_rtp_payload(char *buf, int len, int *plen)
Helper to quickly access the RTP payload, skipping header and extensions.
Definition rtp.c:38
janus_rtp_header
rtp_header janus_rtp_header
Definition rtp.h:58
janus_rtp_header_extension_parse_mid
int janus_rtp_header_extension_parse_mid(char *buf, int len, int id, char *sdes_item, int sdes_len)
Helper to parse a sdes-mid RTP extension (https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-ne...
Definition rtp.c:286
janus_rtp_header_extension_parse_abs_capture_time
int janus_rtp_header_extension_parse_abs_capture_time(char *buf, int len, int id, uint64_t *abs_ts)
Helper to parse an abs-capture-time RTP extension (http://www.webrtc.org/experiments/rtp-hdrext/abs-c...
Definition rtp.c:383
janus_videocodec_from_name
janus_videocodec janus_videocodec_from_name(const char *name)
Definition rtp.c:1103
janus_rtp_header_extension_set_abs_capture_time
int janus_rtp_header_extension_set_abs_capture_time(char *buf, int len, int id, uint64_t abs_ts)
Helper to set an abs-capture-time RTP extension (http://www.webrtc.org/experiments/rtp-hdrext/abs-cap...
Definition rtp.c:400
janus_rtp_header_extension_parse_rid
int janus_rtp_header_extension_parse_rid(char *buf, int len, int id, char *sdes_item, int sdes_len)
Helper to parse a rtp-stream-id RTP extension (https://tools.ietf.org/html/draft-ietf-avtext-rid-09).
Definition rtp.c:307
janus_rtp_header_extension_parse_video_orientation
int janus_rtp_header_extension_parse_video_orientation(char *buf, int len, int id, gboolean *c, gboolean *f, gboolean *r1, gboolean *r0)
Helper to parse a video-orientation RTP extension (http://www.3gpp.org/ftp/Specs/html-info/26114....
Definition rtp.c:245
janus_rtp_simulcasting_prepare
void janus_rtp_simulcasting_prepare(json_t *simulcast, int *rid_ext_id, uint32_t *ssrcs, char **rids)
Helper method to prepare the simulcasting info (rids and/or SSRCs) from the simulcast object the core...
Definition rtp.c:1153
janus_audiocodec_name
const char * janus_audiocodec_name(janus_audiocodec acodec)
Definition rtp.c:999
janus_rtp_header_extension_parse_abs_send_time
int janus_rtp_header_extension_parse_abs_send_time(char *buf, int len, int id, uint32_t *abs_ts)
Helper to parse an abs-send-time RTP extension (http://www.webrtc.org/experiments/rtp-hdrext/abs-send...
Definition rtp.c:352
janus_audiocodec_pt
int janus_audiocodec_pt(janus_audiocodec acodec)
Definition rtp.c:1054
janus_is_rtp
gboolean janus_is_rtp(char *buf, guint len)
Helper method to demultiplex RTP from other protocols.
Definition rtp.c:31
janus_rtp_header_extension_get_id
int janus_rtp_header_extension_get_id(const char *sdp, const char *extension)
Ugly and dirty helper to quickly get the id associated with an RTP extension (extmap) in an SDP.
Definition rtp.c:64
janus_rtp_svc_context_reset
void janus_rtp_svc_context_reset(janus_rtp_svc_context *context)
Set (or reset) the context fields to their default values.
Definition rtp.c:1433
janus_rtp_header_extension_parse_audio_level
int janus_rtp_header_extension_parse_audio_level(char *buf, int len, int id, gboolean *vad, int *level)
Helper to parse a ssrc-audio-level RTP extension (https://tools.ietf.org/html/rfc6464).
Definition rtp.c:230
janus_rtp_simulcasting_context_process_rtp
gboolean janus_rtp_simulcasting_context_process_rtp(janus_rtp_simulcasting_context *context, char *buf, int len, uint8_t *dd_content, int dd_len, uint32_t *ssrcs, char **rids, janus_videocodec vcodec, janus_rtp_switching_context *sc, janus_mutex *rid_mutex)
Process an RTP packet, and decide whether this should be relayed or not, updating the context accordi...
Definition rtp.c:1203
janus_rtp_extension_id
int janus_rtp_extension_id(const char *type)
Definition rtp.c:580
janus_rtp_skew_compensate_video
int janus_rtp_skew_compensate_video(janus_rtp_header *header, janus_rtp_switching_context *context, gint64 now)
Use the context info to compensate for video source skew, if needed.
Definition rtp.c:730
janus_av1_svc_context
Helper struct for processing and tracking AV1-SVC streams.
Definition rtp.h:350
janus_av1_svc_context::tcnt
uint8_t tcnt
Number of templates advertised via Dependency Descriptor.
Definition rtp.h:352
janus_av1_svc_context::spatial_layers
int spatial_layers
How many spatial and temporal layers are available.
Definition rtp.h:358
janus_av1_svc_context::templates
GHashTable * templates
Map of templates advertised via Dependency Descriptor, indexed by ID.
Definition rtp.h:356
janus_av1_svc_context::updated
gboolean updated
Whether this context changed since the last update.
Definition rtp.h:360
janus_av1_svc_context::tioff
uint8_t tioff
Template ID offset, as advertised via Dependency Descriptor.
Definition rtp.h:354
janus_av1_svc_context::temporal_layers
int temporal_layers
Definition rtp.h:358
janus_av1_svc_template
Helper struct to track SVC templates.
Definition rtp.h:366
janus_av1_svc_template::id
uint8_t id
Template ID.
Definition rtp.h:368
janus_av1_svc_template::spatial
int spatial
Spatial layer associated to this template.
Definition rtp.h:370
janus_av1_svc_template::temporal
int temporal
Temporal layer associated to this template.
Definition rtp.h:372
janus_plugin_rtp_extensions
Janus plugin RTP extensions.
Definition plugin.h:562
janus_rtp_header_extension
RTP extension.
Definition rtp.h:71
janus_rtp_header_extension::length
uint16_t length
Definition rtp.h:73
janus_rtp_header_extension::type
uint16_t type
Definition rtp.h:72
janus_rtp_packet
RTP packet.
Definition rtp.h:61
janus_rtp_packet::current_backoff
gint64 current_backoff
Definition rtp.h:66
janus_rtp_packet::data
char * data
Definition rtp.h:62
janus_rtp_packet::last_retransmit
gint64 last_retransmit
Definition rtp.h:65
janus_rtp_packet::length
gint length
Definition rtp.h:63
janus_rtp_packet::created
gint64 created
Definition rtp.h:64
janus_rtp_packet::extensions
janus_plugin_rtp_extensions extensions
Definition rtp.h:67
janus_rtp_rfc2833_payload
RTP RFC2833 payload.
Definition rtp.h:77
janus_rtp_rfc2833_payload::end
uint8_t end
Definition rtp.h:80
janus_rtp_rfc2833_payload::duration
uint16_t duration
Definition rtp.h:83
janus_rtp_rfc2833_payload::event
uint8_t event
Definition rtp.h:79
janus_rtp_rfc2833_payload::reserved
uint8_t reserved
Definition rtp.h:81
janus_rtp_rfc2833_payload::volume
uint8_t volume
Definition rtp.h:82
janus_rtp_simulcasting_context
Helper struct for processing and tracking simulcast streams.
Definition rtp.h:398
janus_rtp_simulcasting_context::changed_temporal
gboolean changed_temporal
Whether the temporal layer has changed after processing a packet.
Definition rtp.h:418
janus_rtp_simulcasting_context::templayer_target
int templayer_target
As above, but to handle transitions (e.g., wait for keyframe).
Definition rtp.h:410
janus_rtp_simulcasting_context::substream_target
int substream_target
As above, but to handle transitions (e.g., wait for keyframe, or get this if available).
Definition rtp.h:406
janus_rtp_simulcasting_context::rid_ext_id
gint rid_ext_id
RTP Stream extension ID, if any.
Definition rtp.h:400
janus_rtp_simulcasting_context::changed_substream
gboolean changed_substream
Whether the substream has changed after processing a packet.
Definition rtp.h:416
janus_rtp_simulcasting_context::drop_trigger
guint32 drop_trigger
How much time (in us, default 250000) without receiving packets will make us drop to the substream be...
Definition rtp.h:412
janus_rtp_simulcasting_context::substream_target_temp
int substream_target_temp
Definition rtp.h:406
janus_rtp_simulcasting_context::templayer
int templayer
Which simulcast temporal layer we should forward back.
Definition rtp.h:408
janus_rtp_simulcasting_context::substream
int substream
Which simulcast substream we should forward back.
Definition rtp.h:404
janus_rtp_simulcasting_context::need_pli
gboolean need_pli
Whether we need to send the user a keyframe request (PLI).
Definition rtp.h:420
janus_rtp_simulcasting_context::av1_context
janus_av1_svc_context av1_context[3]
Dependency Descriptors contexts, if any.
Definition rtp.h:402
janus_rtp_simulcasting_context::last_relayed
gint64 last_relayed
When we relayed the last packet (used to detect when substreams become unavailable).
Definition rtp.h:414
janus_rtp_svc_context
Helper struct for processing and tracking VP9-SVC streams.
Definition rtp.h:466
janus_rtp_svc_context::drop_trigger
guint32 drop_trigger
How much time (in us, default 250000) without receiving packets will make us drop to the substream be...
Definition rtp.h:478
janus_rtp_svc_context::changed_spatial
gboolean changed_spatial
Whether the spatial layer has changed after processing a packet.
Definition rtp.h:482
janus_rtp_svc_context::temporal_target
int temporal_target
As above, but to handle transitions (e.g., wait for keyframe).
Definition rtp.h:476
janus_rtp_svc_context::changed_temporal
gboolean changed_temporal
Whether the temporal layer has changed after processing a packet.
Definition rtp.h:484
janus_rtp_svc_context::dd_context
struct janus_av1_svc_context dd_context
Dependency Descriptor context, in case it's needed.
Definition rtp.h:468
janus_rtp_svc_context::temporal
int temporal
Which SVC temporal layer we should forward back.
Definition rtp.h:474
janus_rtp_svc_context::spatial_target
int spatial_target
As above, but to handle transitions (e.g., wait for keyframe, or get this if available).
Definition rtp.h:472
janus_rtp_svc_context::spatial
int spatial
Which SVC spatial layer we should forward back.
Definition rtp.h:470
janus_rtp_svc_context::need_pli
gboolean need_pli
Whether we need to send the user a keyframe request (PLI).
Definition rtp.h:486
janus_rtp_svc_context::last_spatial_layer
gint64 last_spatial_layer[3]
When we relayed the last packet (used to detect when layers become unavailable).
Definition rtp.h:480
janus_rtp_switching_context
RTP context, in order to make sure SSRC changes result in coherent seq/ts increases.
Definition rtp.h:308
janus_rtp_switching_context::prev_ts
uint32_t prev_ts
Definition rtp.h:309
janus_rtp_switching_context::last_ssrc
uint32_t last_ssrc
Definition rtp.h:309
janus_rtp_switching_context::reference_time
gint64 reference_time
Definition rtp.h:314
janus_rtp_switching_context::start_ts
uint32_t start_ts
Definition rtp.h:309
janus_rtp_switching_context::base_seq
uint16_t base_seq
Definition rtp.h:310
janus_rtp_switching_context::target_ts
uint32_t target_ts
Definition rtp.h:309
janus_rtp_switching_context::evaluating_start_time
gint64 evaluating_start_time
Definition rtp.h:314
janus_rtp_switching_context::ts_reset
gboolean ts_reset
Definition rtp.h:311
janus_rtp_switching_context::base_ts
uint32_t base_ts
Definition rtp.h:309
janus_rtp_switching_context::prev_seq
uint16_t prev_seq
Definition rtp.h:310
janus_rtp_switching_context::last_seq
uint16_t last_seq
Definition rtp.h:310
janus_rtp_switching_context::new_ssrc
gboolean new_ssrc
Definition rtp.h:311
janus_rtp_switching_context::prev_delay
gint32 prev_delay
Definition rtp.h:313
janus_rtp_switching_context::active_delay
gint32 active_delay
Definition rtp.h:313
janus_rtp_switching_context::last_ts
uint32_t last_ts
Definition rtp.h:309
janus_rtp_switching_context::seq_offset
gint16 seq_offset
Definition rtp.h:312
janus_rtp_switching_context::start_time
gint64 start_time
Definition rtp.h:314
janus_rtp_switching_context::last_time
gint64 last_time
Definition rtp.h:314
janus_rtp_switching_context::base_ts_prev
uint32_t base_ts_prev
Definition rtp.h:309
janus_rtp_switching_context::seq_reset
gboolean seq_reset
Definition rtp.h:311
janus_rtp_switching_context::base_seq_prev
uint16_t base_seq_prev
Definition rtp.h:310
janus_rtp_switching_context::ts_offset
gint32 ts_offset
Definition rtp.h:313
janus_vp9_svc_info
VP9 SVC info, as parsed from a payload descriptor.
Definition utils.h:417
rtp_header
RTP Header (http://tools.ietf.org/html/rfc3550#section-5.1).
Definition rtp.h:37
rtp_header::csrc
uint32_t csrc[0]
Definition rtp.h:56
rtp_header::extension
uint16_t extension
Definition rtp.h:41
rtp_header::timestamp
uint32_t timestamp
Definition rtp.h:54
rtp_header::padding
uint16_t padding
Definition rtp.h:40
rtp_header::csrccount
uint16_t csrccount
Definition rtp.h:42
rtp_header::type
uint16_t type
Definition rtp.h:44
rtp_header::ssrc
uint32_t ssrc
Definition rtp.h:55
rtp_header::seq_number
uint16_t seq_number
Definition rtp.h:53
rtp_header::version
uint16_t version
Definition rtp.h:39
rtp_header::markerbit
uint16_t markerbit
Definition rtp.h:43
utils.h
TURN REST API client.