Loading...
Searching...
No Matches
ice.h
Go to the documentation of this file.
#ifndef JANUS_ICE_H
#define JANUS_ICE_H
#include <glib.h>
#include <agent.h>
#include "sdp.h"
#include "dtls.h"
#include "sctp.h"
#include "rtcp.h"
#include "text2pcap.h"
#include "utils.h"
#include "ip-utils.h"
#include "refcount.h"
#include "plugins/plugin.h"
void janus_ice_init(gboolean ice_lite, gboolean ice_tcp, gboolean full_trickle, gboolean ignore_mdns,
gboolean ipv6, gboolean ipv6_linklocal, uint16_t rtp_min_port, uint16_t rtp_max_port);
void janus_ice_deinit(void);
int janus_ice_test_stun_server(janus_network_address *addr, uint16_t port, uint16_t local_port, janus_network_address *public_addr, uint16_t *public_port);
int janus_ice_set_stun_server(gchar *stun_server, uint16_t stun_port);
int janus_ice_set_turn_server(gchar *turn_server, uint16_t turn_port, gchar *turn_type, gchar *turn_user, gchar *turn_pwd);
int janus_ice_set_turn_rest_api(gchar *api_server, gchar *api_key, gchar *api_method, uint api_timeout);
char *janus_ice_get_stun_server(void);
uint16_t janus_ice_get_stun_port(void);
char *janus_ice_get_turn_server(void);
uint16_t janus_ice_get_turn_port(void);
char *janus_ice_get_turn_rest_api(void);
void janus_ice_allow_force_relay(void);
gboolean janus_ice_is_force_relay_allowed(void);
void janus_ice_enable_nat_1_1(gboolean keep_private_host);
void janus_ice_enforce_interface(const char *ip);
gboolean janus_ice_is_enforced(const char *ip);
void janus_ice_ignore_interface(const char *ip);
gboolean janus_ice_is_ignored(const char *ip);
gboolean janus_ice_is_ice_lite_enabled(void);
gboolean janus_ice_is_ice_tcp_enabled(void);
gboolean janus_ice_is_full_trickle_enabled(void);
gboolean janus_ice_is_mdns_enabled(void);
gboolean janus_ice_is_ipv6_enabled(void);
gboolean janus_ice_is_ipv6_linklocal_enabled(void);
#ifdef HAVE_ICE_NOMINATION
void janus_ice_set_nomination_mode(const char *nomination);
const char *janus_ice_get_nomination_mode(void);
#endif
void janus_ice_set_consent_freshness_enabled(gboolean enabled);
gboolean janus_ice_is_consent_freshness_enabled(void);
void janus_ice_set_keepalive_conncheck_enabled(gboolean enabled);
gboolean janus_ice_is_keepalive_conncheck_enabled(void);
void janus_ice_set_hangup_on_failed_enabled(gboolean enabled);
gboolean janus_ice_is_hangup_on_failed_enabled(void);
void janus_set_min_nack_queue(uint16_t mnq);
uint16_t janus_get_min_nack_queue(void);
void janus_set_nack_optimizations_enabled(gboolean optimize);
gboolean janus_is_nack_optimizations_enabled(void);
void janus_set_no_media_timer(uint timer);
uint janus_get_no_media_timer(void);
void janus_set_slowlink_threshold(uint packets);
uint janus_get_slowlink_threshold(void);
void janus_set_twcc_period(uint period);
uint janus_get_twcc_period(void);
void janus_set_dscp(int dscp);
int janus_get_dscp(void);
void janus_ice_set_event_stats_period(int period);
int janus_ice_get_event_stats_period(void);
int janus_ice_get_peerconnection_num(void);
void janus_ice_event_set_combine_media_stats(gboolean combine_media_stats_to_one_event);
gboolean janus_ice_event_get_combine_media_stats(void);
void janus_enable_opaqueid_in_api(void);
gboolean janus_is_opaqueid_in_api_enabled(void);
const gchar *janus_get_ice_state_name(gint state);
typedef struct janus_ice_handle janus_ice_handle;
typedef struct janus_ice_peerconnection janus_ice_peerconnection;
typedef struct janus_ice_peerconnection_medium janus_ice_peerconnection_medium;
typedef struct janus_ice_trickle janus_ice_trickle;
#define JANUS_ICE_HANDLE_WEBRTC_PROCESSING_OFFER (1 << 0)
#define JANUS_ICE_HANDLE_WEBRTC_START (1 << 1)
#define JANUS_ICE_HANDLE_WEBRTC_READY (1 << 2)
#define JANUS_ICE_HANDLE_WEBRTC_STOP (1 << 3)
#define JANUS_ICE_HANDLE_WEBRTC_ALERT (1 << 4)
#define JANUS_ICE_HANDLE_WEBRTC_NEGOTIATED (1 << 5)
#define JANUS_ICE_HANDLE_WEBRTC_TRICKLE (1 << 7)
#define JANUS_ICE_HANDLE_WEBRTC_ALL_TRICKLES (1 << 8)
#define JANUS_ICE_HANDLE_WEBRTC_TRICKLE_SYNCED (1 << 9)
#define JANUS_ICE_HANDLE_WEBRTC_DATA_CHANNELS (1 << 10)
#define JANUS_ICE_HANDLE_WEBRTC_CLEANING (1 << 11)
#define JANUS_ICE_HANDLE_WEBRTC_HAS_AUDIO (1 << 12)
#define JANUS_ICE_HANDLE_WEBRTC_HAS_VIDEO (1 << 13)
#define JANUS_ICE_HANDLE_WEBRTC_GOT_OFFER (1 << 14)
#define JANUS_ICE_HANDLE_WEBRTC_GOT_ANSWER (1 << 15)
#define JANUS_ICE_HANDLE_WEBRTC_HAS_AGENT (1 << 16)
#define JANUS_ICE_HANDLE_WEBRTC_ICE_RESTART (1 << 17)
#define JANUS_ICE_HANDLE_WEBRTC_RESEND_TRICKLES (1 << 18)
#define JANUS_ICE_HANDLE_WEBRTC_RFC4588_RTX (1 << 19)
#define JANUS_ICE_HANDLE_WEBRTC_NEW_DATACHAN_SDP (1 << 20)
#define JANUS_ICE_HANDLE_WEBRTC_E2EE (1 << 21)
typedef enum janus_media_type {
JANUS_MEDIA_UNKNOWN = 0,
JANUS_MEDIA_AUDIO,
JANUS_MEDIA_VIDEO,
JANUS_MEDIA_DATA
} janus_media_type;
const char *janus_media_type_str(janus_media_type type);
typedef struct janus_ice_stats_info {
guint32 packets;
guint64 bytes;
guint32 bytes_lastsec, bytes_lastsec_temp;
gint64 updated;
gboolean notified_lastsec;
guint32 nacks;
} janus_ice_stats_info;
typedef struct janus_ice_stats {
janus_ice_stats_info info[3];
guint sl_lost_count;
} janus_ice_stats;
void janus_ice_notify_hangup(janus_ice_handle *handle, const char *reason);
gboolean janus_plugin_session_is_alive(janus_plugin_session *plugin_session);
typedef struct janus_seq_info {
gint64 ts;
guint16 seq;
guint16 state;
struct janus_seq_info *next;
struct janus_seq_info *prev;
} janus_seq_info;
void janus_seq_list_free(janus_seq_info **head);
enum {
SEQ_MISSING,
SEQ_NACKED,
SEQ_GIVEUP,
SEQ_RECVED
};
struct janus_ice_handle {
void *session;
guint64 handle_id;
char *opaque_id;
char *token;
gint64 created;
void *app;
janus_plugin_session *app_handle;
janus_flags webrtc_flags;
gint cdone;
GMainContext *mainctx;
GMainLoop *mainloop;
void *static_event_loop;
GThread *thread;
GSource *rtp_source, *rtcp_source, *stats_source, *twcc_source;
NiceAgent *agent;
gint64 agent_created;
gint64 agent_started;
gboolean controlling;
gchar *pc_mid;
guint stream_id;
janus_ice_peerconnection *pc;
gchar *rtp_profile;
gchar *local_sdp;
gchar *remote_sdp;
const gchar *hangup_reason;
GList *pending_trickles;
GAsyncQueue *queued_candidates;
GAsyncQueue *queued_packets;
guint srtp_errors_count;
gint last_srtp_error, last_srtp_summary;
gint last_event_stats;
volatile gint dump_packets;
janus_text2pcap *text2pcap;
janus_mutex mutex;
volatile gint has_pc;
volatile gint closepc;
volatile gint destroyed;
janus_refcount ref;
};
struct janus_ice_peerconnection {
janus_ice_handle *handle;
guint stream_id;
guint component_id;
gboolean cdone;
guint state;
gint64 gathered;
gint64 connected;
GSList *candidates;
GSList *local_candidates;
GSList *remote_candidates;
gchar *selected_pair;
gboolean process_started;
GSource *icestate_source;
gint64 icefailed_detected;
GSource *dtlsrt_source;
janus_dtls_srtp *dtls;
gint mid_ext_id;
gint rid_ext_id, ridrtx_ext_id;
gint audiolevel_ext_id;
gint videoorientation_ext_id;
gint playoutdelay_ext_id;
gint dependencydesc_ext_id;
gint abs_send_time_ext_id;
gint abs_capture_time_ext_id;
gint videolayers_ext_id;
gboolean do_transport_wide_cc;
gint transport_wide_cc_ext_id;
guint16 transport_wide_cc_out_seq_num;
guint32 transport_wide_cc_last_seq_num;
guint32 transport_wide_cc_last_feedback_seq_num;
guint16 transport_wide_cc_cycles;
guint transport_wide_cc_feedback_count;
GSList *transport_wide_received_seq_nums;
uint32_t remb_bitrate;
janus_dtls_role dtls_role;
janus_ice_stats dtls_in_stats, dtls_out_stats;
gchar *remote_hashing;
gchar *remote_fingerprint;
gchar *ruser;
gchar *rpass;
GHashTable *media;
GHashTable *media_byssrc;
GHashTable *media_bymid;
GHashTable *media_bytype;
GHashTable *payload_types;
GHashTable *clock_rates;
GHashTable *rtx_payload_types;
GHashTable *rtx_payload_types_rev;
GQueue *nacks_queue;
gboolean noerrorlog;
volatile gint too_large;
janus_mutex mutex;
volatile gint destroyed;
janus_refcount ref;
};
#define LAST_SEQS_MAX_LEN 160
struct janus_ice_peerconnection_medium {
janus_ice_peerconnection *pc;
janus_media_type type;
int mindex;
char *mid;
char *msid, *mstid, *remote_msid, *remote_mstid;
guint32 ssrc;
guint32 ssrc_rtx;
guint32 ssrc_peer[3], ssrc_peer_new[3], ssrc_peer_orig[3], ssrc_peer_temp;
guint32 ssrc_peer_rtx[3], ssrc_peer_rtx_new[3], ssrc_peer_rtx_orig[3];
char *rid[3];
gboolean disabled_rid[3];
gboolean rids_hml;
gboolean legacy_rid;
janus_rtp_switching_context rtp_ctx[3];
GList *payload_types;
int opusred_pt;
GHashTable *rtx_payload_types;
GHashTable *clock_rates;
gint payload_type, rtx_payload_type;
char *codec;
gboolean (* video_is_keyframe)(const char* buffer, int len);
gboolean send, recv;
janus_rtcp_context *rtcp_ctx[3];
uint16_t nack_queue_ms;
GHashTable *rtx_nacked[3];
GHashTable *pending_nacked_cleanup;
gint64 first_ntp_ts[3];
guint32 first_rtp_ts[3];
gint64 last_ntp_ts;
guint32 last_rtp_ts;
gboolean do_nacks;
GQueue *retransmit_buffer;
GHashTable *retransmit_seqs;
guint16 rtx_seq_number;
gint64 retransmit_log_ts;
guint retransmit_recent_cnt;
gint64 nack_sent_log_ts;
guint nack_sent_recent_cnt;
janus_seq_info *last_seqs[3];
janus_ice_stats in_stats;
janus_ice_stats out_stats;
gboolean noerrorlog;
janus_mutex mutex;
volatile gint destroyed;
janus_refcount ref;
};
janus_ice_peerconnection_medium *janus_ice_peerconnection_medium_create(janus_ice_handle *handle, janus_media_type type);
struct janus_ice_trickle {
janus_ice_handle *handle;
gint64 received;
char *transaction;
json_t *candidate;
};
janus_ice_trickle *janus_ice_trickle_new(const char *transaction, json_t *candidate);
gint janus_ice_trickle_parse(janus_ice_handle *handle, json_t *candidate, const char **error);
void janus_ice_trickle_destroy(janus_ice_trickle *trickle);
janus_ice_handle *janus_ice_handle_create(void *core_session, const char *opaque_id, const char *token);
gint janus_ice_handle_attach_plugin(void *core_session, janus_ice_handle *handle, janus_plugin *plugin, int loop_index);
gint janus_ice_handle_destroy(void *core_session, janus_ice_handle *handle);
void janus_ice_webrtc_hangup(janus_ice_handle *handle, const char *reason);
void janus_ice_peerconnection_destroy(janus_ice_peerconnection *pc);
void janus_ice_relay_rtp(janus_ice_handle *handle, janus_plugin_rtp *packet);
void janus_ice_relay_rtcp(janus_ice_handle *handle, janus_plugin_rtcp *packet);
void janus_ice_relay_data(janus_ice_handle *handle, janus_plugin_data *packet);
void janus_ice_send_pli(janus_ice_handle *handle);
void janus_ice_send_pli_stream(janus_ice_handle *handle, int mindex);
void janus_ice_send_remb(janus_ice_handle *handle, uint32_t bitrate);
void janus_ice_incoming_data(janus_ice_handle *handle, char *label, char *protocol, gboolean textdata, char *buffer, int length);
void janus_ice_relay_sctp(janus_ice_handle *handle, char *buffer, int length);
void janus_ice_notify_data_ready(janus_ice_handle *handle);
void janus_ice_notify_media_stopped(janus_ice_handle *handle);
int janus_ice_setup_local(janus_ice_handle *handle, gboolean offer, gboolean trickle, janus_dtls_role dtls_role);
void janus_ice_candidates_to_sdp(janus_ice_handle *handle, janus_sdp_mline *mline, guint stream_id, guint component_id);
void janus_ice_add_remote_candidate(janus_ice_handle *handle, NiceCandidate *c);
void janus_ice_setup_remote_candidates(janus_ice_handle *handle, guint stream_id, guint component_id);
void janus_ice_dtls_handshake_done(janus_ice_handle *handle);
void janus_ice_restart(janus_ice_handle *handle);
void janus_ice_resend_trickles(janus_ice_handle *handle);
void janus_ice_set_static_event_loops(int loops, gboolean allow_api);
int janus_ice_get_static_event_loops(void);
gboolean janus_ice_is_loop_indication_allowed(void);
json_t *janus_ice_static_event_loops_info(void);
void janus_ice_stop_static_event_loops(void);
#endif
dtls.h
DTLS/SRTP processing (headers).
janus_dtls_role
janus_dtls_role
DTLS roles.
Definition dtls.h:51
janus_ice_add_remote_candidate
void janus_ice_add_remote_candidate(janus_ice_handle *handle, NiceCandidate *c)
Method to queue a remote candidate for processing.
Definition ice.c:3524
janus_media_type
janus_media_type
Janus media types.
Definition ice.h:280
JANUS_MEDIA_UNKNOWN
@ JANUS_MEDIA_UNKNOWN
Definition ice.h:281
JANUS_MEDIA_DATA
@ JANUS_MEDIA_DATA
Definition ice.h:284
JANUS_MEDIA_VIDEO
@ JANUS_MEDIA_VIDEO
Definition ice.h:283
JANUS_MEDIA_AUDIO
@ JANUS_MEDIA_AUDIO
Definition ice.h:282
janus_ice_set_keepalive_conncheck_enabled
void janus_ice_set_keepalive_conncheck_enabled(gboolean enabled)
Method to enable/disable connectivity checks as keepalives for PeerConnections.
Definition ice.c:164
janus_ice_handle_attach_plugin
gint janus_ice_handle_attach_plugin(void *core_session, janus_ice_handle *handle, janus_plugin *plugin, int loop_index)
Method to attach a Janus ICE handle to a plugin.
Definition ice.c:1393
janus_ice_peerconnection_destroy
void janus_ice_peerconnection_destroy(janus_ice_peerconnection *pc)
Method to only free resources related to a specific Webrtc PeerConnection allocated by a Janus ICE ha...
Definition ice.c:1738
janus_ice_webrtc_hangup
void janus_ice_webrtc_hangup(janus_ice_handle *handle, const char *reason)
Method to only hangup (e.g., DTLS alert) the WebRTC PeerConnection allocated by a Janus ICE handle.
Definition ice.c:1629
janus_get_min_nack_queue
uint16_t janus_get_min_nack_queue(void)
Method to get the current min NACK value (i.e., the minimum time window of packets per handle to stor...
Definition ice.c:675
janus_ice_get_turn_rest_api
char * janus_ice_get_turn_rest_api(void)
Method to get the specified TURN REST API backend, if any.
Definition ice.c:69
janus_ice_set_static_event_loops
void janus_ice_set_static_event_loops(int loops, gboolean allow_api)
Method to configure the static event loops mechanism at startup.
Definition ice.c:248
janus_ice_get_turn_port
uint16_t janus_ice_get_turn_port(void)
Method to get the TURN server port.
Definition ice.c:63
janus_ice_send_pli_stream
void janus_ice_send_pli_stream(janus_ice_handle *handle, int mindex)
Helper core callback, called when a plugin wants to send a RTCP PLI to a single video stream of a pee...
Definition ice.c:5189
janus_set_twcc_period
void janus_set_twcc_period(uint period)
Method to modify the TWCC feedback period (i.e., how often TWCC feedback is sent back to media sender...
Definition ice.c:601
janus_set_slowlink_threshold
void janus_set_slowlink_threshold(uint packets)
Method to modify the slowlink-threshold property (i.e., the number of lost packets per seconds that s...
Definition ice.c:587
janus_ice_set_event_stats_period
void janus_ice_set_event_stats_period(int period)
Method to modify the event handler statistics period (i.e., the number of seconds that should pass be...
Definition ice.c:394
janus_ice_send_remb
void janus_ice_send_remb(janus_ice_handle *handle, uint32_t bitrate)
Helper core callback, called when a plugin wants to send a RTCP REMB to a peer.
Definition ice.c:5198
janus_ice_is_ipv6_linklocal_enabled
gboolean janus_ice_is_ipv6_linklocal_enabled(void)
Method to check whether IPv6 link-local candidates will be gathered or not.
Definition ice.c:117
janus_enable_opaqueid_in_api
void janus_enable_opaqueid_in_api(void)
Method to enable opaque ID in Janus API responses/events.
Definition ice.c:194
janus_ice_event_get_combine_media_stats
gboolean janus_ice_event_get_combine_media_stats(void)
Method to retrieve whether media statistic events shall be dispatched combined or in single events.
Definition ice.c:406
janus_get_ice_state_name
const gchar * janus_get_ice_state_name(gint state)
Helper method to get a string representation of a libnice ICE state.
Definition ice.c:1329
janus_ice_trickle_parse
gint janus_ice_trickle_parse(janus_ice_handle *handle, json_t *candidate, const char **error)
Helper method to parse trickle candidates.
Definition ice.c:939
janus_is_nack_optimizations_enabled
gboolean janus_is_nack_optimizations_enabled(void)
Method to check whether NACK optimizations on outgoing keyframes are enabled or not.
Definition ice.c:663
janus_ice_is_enforced
gboolean janus_ice_is_enforced(const char *ip)
Method to check whether an interface is currently in the enforce list for ICE (that is,...
Definition ice.c:342
janus_media_type_str
const char * janus_media_type_str(janus_media_type type)
Helper method to get the string associated to a janus_media_mtype value.
Definition ice.c:487
janus_ice_notify_hangup
void janus_ice_notify_hangup(janus_ice_handle *handle, const char *reason)
Quick helper method to notify a WebRTC hangup through the Janus API.
Definition ice.c:896
janus_ice_stop_static_event_loops
void janus_ice_stop_static_event_loops(void)
Method to stop all the static event loops, if enabled.
Definition ice.c:305
janus_ice_get_stun_server
char * janus_ice_get_stun_server(void)
Method to get the STUN server IP address.
Definition ice.c:46
janus_ice_get_event_stats_period
int janus_ice_get_event_stats_period(void)
Method to get the current event handler statistics period (see above).
Definition ice.c:397
SEQ_MISSING
@ SEQ_MISSING
Definition ice.h:339
SEQ_GIVEUP
@ SEQ_GIVEUP
Definition ice.h:341
SEQ_RECVED
@ SEQ_RECVED
Definition ice.h:342
SEQ_NACKED
@ SEQ_NACKED
Definition ice.h:340
janus_ice_relay_rtcp
void janus_ice_relay_rtcp(janus_ice_handle *handle, janus_plugin_rtcp *packet)
Core RTCP callback, called when a plugin has an RTCP message to send to a peer.
Definition ice.c:5171
janus_ice_is_loop_indication_allowed
gboolean janus_ice_is_loop_indication_allowed(void)
Method to check whether loop indication via API is allowed.
Definition ice.c:245
janus_ice_setup_remote_candidates
void janus_ice_setup_remote_candidates(janus_ice_handle *handle, guint stream_id, guint component_id)
Method to handle remote candidates and start the connectivity checks.
Definition ice.c:3538
janus_ice_trickle_destroy
void janus_ice_trickle_destroy(janus_ice_trickle *trickle)
Helper method to destroy a janus_ice_trickle instance.
Definition ice.c:1001
janus_ice_is_mdns_enabled
gboolean janus_ice_is_mdns_enabled(void)
Method to check whether mDNS resolution is enabled or not.
Definition ice.c:106
janus_ice_handle_destroy
gint janus_ice_handle_destroy(void *core_session, janus_ice_handle *handle)
Method to destroy a Janus ICE handle.
Definition ice.c:1506
janus_ice_notify_media_stopped
void janus_ice_notify_media_stopped(janus_ice_handle *handle)
Core SDP callback, called by the SDP stack when a stream has been paused by a negotiation.
Definition ice.c:5270
janus_ice_is_keepalive_conncheck_enabled
gboolean janus_ice_is_keepalive_conncheck_enabled(void)
Method to check whether connectivity checks will be used as keepalives.
Definition ice.c:174
janus_set_no_media_timer
void janus_set_no_media_timer(uint timer)
Method to modify the no-media event timer (i.e., the number of seconds where no media arrives before ...
Definition ice.c:569
janus_ice_get_stun_port
uint16_t janus_ice_get_stun_port(void)
Method to get the STUN server port.
Definition ice.c:49
janus_ice_is_full_trickle_enabled
gboolean janus_ice_is_full_trickle_enabled(void)
Method to check whether full-trickle support is enabled or not.
Definition ice.c:100
janus_ice_is_force_relay_allowed
gboolean janus_ice_is_force_relay_allowed(void)
Method to check whether applications are allowed to force Janus to use TURN.
Definition ice.c:82
janus_get_slowlink_threshold
uint janus_get_slowlink_threshold(void)
Method to get the current slowlink-threshold value (see above).
Definition ice.c:594
janus_ice_init
void janus_ice_init(gboolean ice_lite, gboolean ice_tcp, gboolean full_trickle, gboolean ignore_mdns, gboolean ipv6, gboolean ipv6_linklocal, uint16_t rtp_min_port, uint16_t rtp_max_port)
ICE stuff initialization.
Definition ice.c:1014
janus_ice_handle_create
janus_ice_handle * janus_ice_handle_create(void *core_session, const char *opaque_id, const char *token)
Method to create a new Janus ICE handle.
Definition ice.c:1357
janus_ice_set_stun_server
int janus_ice_set_stun_server(gchar *stun_server, uint16_t stun_port)
Method to force Janus to use a STUN server when gathering candidates.
Definition ice.c:1206
janus_ice_deinit
void janus_ice_deinit(void)
ICE stuff de-initialization.
Definition ice.c:1066
janus_set_nack_optimizations_enabled
void janus_set_nack_optimizations_enabled(gboolean optimize)
Method to enable/disable the NACK optimizations on outgoing keyframes: when enabled,...
Definition ice.c:660
janus_ice_incoming_data
void janus_ice_incoming_data(janus_ice_handle *handle, char *label, char *protocol, gboolean textdata, char *buffer, int length)
Plugin SCTP/DataChannel callback, called by the SCTP stack when when there's data for a plugin.
Definition ice.c:3295
janus_ice_resend_trickles
void janus_ice_resend_trickles(janus_ice_handle *handle)
Method to resend all the existing candidates via trickle (e.g., after an ICE restart).
Definition ice.c:3861
janus_ice_allow_force_relay
void janus_ice_allow_force_relay(void)
Method to enable applications to force Janus to use TURN.
Definition ice.c:79
janus_ice_get_turn_server
char * janus_ice_get_turn_server(void)
Method to get the TURN server IP address.
Definition ice.c:60
janus_ice_dtls_handshake_done
void janus_ice_dtls_handshake_done(janus_ice_handle *handle)
Callback to be notified when the DTLS handshake for a specific component has been completed.
Definition ice.c:5282
janus_ice_enforce_interface
void janus_ice_enforce_interface(const char *ip)
Method to add an interface/IP to the enforce list for ICE (that is, only gather candidates from these...
Definition ice.c:334
janus_ice_restart
void janus_ice_restart(janus_ice_handle *handle)
Method to restart ICE and the connectivity checks.
Definition ice.c:3851
janus_ice_relay_rtp
void janus_ice_relay_rtp(janus_ice_handle *handle, janus_plugin_rtp *packet)
Core RTP callback, called when a plugin has an RTP packet to send to a peer.
Definition ice.c:5099
janus_ice_ignore_interface
void janus_ice_ignore_interface(const char *ip)
Method to add an interface/IP to the ignore list for ICE (that is, don't gather candidates).
Definition ice.c:361
janus_ice_static_event_loops_info
json_t * janus_ice_static_event_loops_info(void)
Helper method to return a summary of the static loops activity.
Definition ice.c:288
janus_ice_relay_sctp
void janus_ice_relay_sctp(janus_ice_handle *handle, char *buffer, int length)
Core SCTP/DataChannel callback, called by the SCTP stack when when there's data to send.
Definition ice.c:5228
janus_ice_get_peerconnection_num
int janus_ice_get_peerconnection_num(void)
Method to get the number of active PeerConnection (for stats).
Definition ice.c:412
janus_ice_is_ice_lite_enabled
gboolean janus_ice_is_ice_lite_enabled(void)
Method to check whether ICE Lite mode is enabled or not (still WIP).
Definition ice.c:88
janus_ice_send_pli
void janus_ice_send_pli(janus_ice_handle *handle)
Helper core callback, called when a plugin wants to send a RTCP PLI to a peer.
Definition ice.c:5175
janus_ice_is_ignored
gboolean janus_ice_is_ignored(const char *ip)
Method to check whether an interface/IP is currently in the ignore list for ICE (that is,...
Definition ice.c:372
janus_plugin_session_is_alive
gboolean janus_plugin_session_is_alive(janus_plugin_session *plugin_session)
Quick helper method to check if a plugin session associated with a Janus handle is still valid.
Definition ice.c:766
janus_set_min_nack_queue
void janus_set_min_nack_queue(uint16_t mnq)
Method to modify the min NACK value (i.e., the minimum time window of packets per handle to store for...
Definition ice.c:668
janus_ice_peerconnection_medium_create
janus_ice_peerconnection_medium * janus_ice_peerconnection_medium_create(janus_ice_handle *handle, janus_media_type type)
Method to quickly create a medium to be added to a handle PeerConnection.
Definition ice.c:1841
janus_ice_set_hangup_on_failed_enabled
void janus_ice_set_hangup_on_failed_enabled(gboolean enabled)
Method to enable/disable immediate hangups of PeerConnectionss on ICE failures.
Definition ice.c:180
janus_ice_is_ipv6_enabled
gboolean janus_ice_is_ipv6_enabled(void)
Method to check whether IPv6 candidates are enabled/supported or not.
Definition ice.c:113
janus_ice_setup_local
int janus_ice_setup_local(janus_ice_handle *handle, gboolean offer, gboolean trickle, janus_dtls_role dtls_role)
Method to locally set up the ICE candidates (initialization and gathering).
Definition ice.c:3580
janus_is_opaqueid_in_api_enabled
gboolean janus_is_opaqueid_in_api_enabled(void)
Method to check whether opaque ID have to be added to Janus API responses/events.
Definition ice.c:197
janus_ice_is_ice_tcp_enabled
gboolean janus_ice_is_ice_tcp_enabled(void)
Method to check whether ICE-TCP support is enabled/supported or not (still WIP).
Definition ice.c:94
janus_get_no_media_timer
uint janus_get_no_media_timer(void)
Method to get the current no-media event timer (see above).
Definition ice.c:576
janus_ice_is_consent_freshness_enabled
gboolean janus_ice_is_consent_freshness_enabled(void)
Method to check whether consent fresnhess will be enabled in ICE.
Definition ice.c:158
janus_ice_set_turn_server
int janus_ice_set_turn_server(gchar *turn_server, uint16_t turn_port, gchar *turn_type, gchar *turn_user, gchar *turn_pwd)
Method to force Janus to use a TURN server when gathering candidates.
Definition ice.c:1252
janus_ice_set_consent_freshness_enabled
void janus_ice_set_consent_freshness_enabled(gboolean enabled)
Method to enable/disable consent freshness in PeerConnections.
Definition ice.c:145
janus_ice_candidates_to_sdp
void janus_ice_candidates_to_sdp(janus_ice_handle *handle, janus_sdp_mline *mline, guint stream_id, guint component_id)
Method to add local candidates to a janus_sdp SDP object representation.
Definition ice.c:3470
janus_get_dscp
int janus_get_dscp(void)
Method to get the current DSCP value (see above).
Definition ice.c:622
janus_ice_trickle_new
janus_ice_trickle * janus_ice_trickle_new(const char *transaction, json_t *candidate)
Helper method to allocate a janus_ice_trickle instance.
Definition ice.c:928
janus_ice_is_hangup_on_failed_enabled
gboolean janus_ice_is_hangup_on_failed_enabled(void)
Method to check whether ICE failures will result in immediate hangups.
Definition ice.c:186
janus_ice_relay_data
void janus_ice_relay_data(janus_ice_handle *handle, janus_plugin_data *packet)
Core SCTP/DataChannel callback, called when a plugin has data to send to a peer.
janus_ice_notify_data_ready
void janus_ice_notify_data_ready(janus_ice_handle *handle)
Plugin SCTP/DataChannel callback, called by the SCTP stack when data can be written.
Definition ice.c:5256
janus_ice_set_turn_rest_api
int janus_ice_set_turn_rest_api(gchar *api_server, gchar *api_key, gchar *api_method, uint api_timeout)
Method to force Janus to contact a TURN REST API server to get a TURN service to use when gathering c...
Definition ice.c:1302
janus_ice_enable_nat_1_1
void janus_ice_enable_nat_1_1(gboolean keep_private_host)
Helper method to force Janus to overwrite all host candidates with the public IP.
Definition ice.c:325
janus_set_dscp
void janus_set_dscp(int dscp)
Method to modify the DSCP value to set, which is disabled by default.
Definition ice.c:616
janus_seq_list_free
void janus_seq_list_free(janus_seq_info **head)
Definition ice.c:737
janus_ice_get_static_event_loops
int janus_ice_get_static_event_loops(void)
Method to return the number of static event loops, if enabled.
Definition ice.c:242
janus_ice_test_stun_server
int janus_ice_test_stun_server(janus_network_address *addr, uint16_t port, uint16_t local_port, janus_network_address *public_addr, uint16_t *public_port)
Method to check whether a STUN server is reachable.
Definition ice.c:1072
janus_ice_event_set_combine_media_stats
void janus_ice_event_set_combine_media_stats(gboolean combine_media_stats_to_one_event)
Method to define whether the media stats shall be dispatched in one event (true) or in dedicated sing...
Definition ice.c:403
janus_get_twcc_period
uint janus_get_twcc_period(void)
Method to get the current TWCC period (see above).
Definition ice.c:610
ip-utils.h
IP address related utility functions (headers).
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
refcount.h
Reference counter mechanism.
rtcp.h
RTCP processing (headers).
janus_rtcp_context
rtcp_context janus_rtcp_context
Definition rtcp.h:287
sctp.h
SCTP processing for data channels (headers).
sdp.h
SDP processing (headers).
janus_dtls_srtp
Janus DTLS-SRTP handle.
Definition dtls.h:66
janus_ice_handle
Janus ICE handle.
Definition ice.h:347
janus_ice_handle::app
void * app
Opaque application (plugin) pointer.
Definition ice.h:359
janus_ice_handle::last_event_stats
gint last_event_stats
Count of how many seconds passed since the last stats passed to event handlers.
Definition ice.h:409
janus_ice_handle::ref
janus_refcount ref
Reference counter for this instance.
Definition ice.h:423
janus_ice_handle::pending_trickles
GList * pending_trickles
List of pending trickle candidates (those we received before getting the JSEP offer).
Definition ice.h:399
janus_ice_handle::static_event_loop
void * static_event_loop
In case static event loops are used, opaque pointer to the loop.
Definition ice.h:371
janus_ice_handle::controlling
gboolean controlling
ICE role (controlling or controlled).
Definition ice.h:383
janus_ice_handle::text2pcap
janus_text2pcap * text2pcap
In case this session must be saved to text2pcap, the instance to dump packets to.
Definition ice.h:413
janus_ice_handle::rtcp_source
GSource * rtcp_source
Definition ice.h:375
janus_ice_handle::local_sdp
gchar * local_sdp
SDP generated locally (just for debugging purposes).
Definition ice.h:393
janus_ice_handle::has_pc
volatile gint has_pc
Atomic flag to check whether a PeerConnection was established.
Definition ice.h:417
janus_ice_handle::remote_sdp
gchar * remote_sdp
SDP received by the peer (just for debugging purposes).
Definition ice.h:395
janus_ice_handle::queued_packets
GAsyncQueue * queued_packets
Queue of events in the loop and outgoing packets to send.
Definition ice.h:403
janus_ice_handle::dump_packets
volatile gint dump_packets
Flag to decide whether or not packets need to be dumped to a text2pcap file.
Definition ice.h:411
janus_ice_handle::rtp_source
GSource * rtp_source
GLib sources for outgoing traffic, recurring RTCP, and stats (and optionally TWCC).
Definition ice.h:375
janus_ice_handle::webrtc_flags
janus_flags webrtc_flags
Mask of WebRTC-related flags for this handle.
Definition ice.h:363
janus_ice_handle::mainloop
GMainLoop * mainloop
GLib loop for the handle and libnice.
Definition ice.h:369
janus_ice_handle::srtp_errors_count
guint srtp_errors_count
Count of the recent SRTP replay errors, in order to avoid spamming the logs.
Definition ice.h:405
janus_ice_handle::queued_candidates
GAsyncQueue * queued_candidates
Queue of remote candidates that still need to be processed.
Definition ice.h:401
janus_ice_handle::created
gint64 created
Monotonic time of when the handle has been created.
Definition ice.h:357
janus_ice_handle::rtp_profile
gchar * rtp_profile
RTP profile set by caller (so that we can match it).
Definition ice.h:391
janus_ice_handle::agent
NiceAgent * agent
libnice ICE agent
Definition ice.h:377
janus_ice_handle::thread
GThread * thread
GLib thread for the handle and libnice.
Definition ice.h:373
janus_ice_handle::pc
janus_ice_peerconnection * pc
WebRTC PeerConnection, if any.
Definition ice.h:389
janus_ice_handle::mutex
janus_mutex mutex
Mutex to lock/unlock the ICE session.
Definition ice.h:415
janus_ice_handle::agent_started
gint64 agent_started
Monotonic time of when the ICE agent has been started (remote credentials set).
Definition ice.h:381
janus_ice_handle::pc_mid
gchar * pc_mid
Main mid.
Definition ice.h:385
janus_ice_handle::closepc
volatile gint closepc
Whether a close_pc was requested recently on the PeerConnection.
Definition ice.h:419
janus_ice_handle::token
char * token
Token that was used to attach the handle, if required.
Definition ice.h:355
janus_ice_handle::opaque_id
char * opaque_id
Opaque identifier, e.g., to provide inter-handle relationships to external tools.
Definition ice.h:353
janus_ice_handle::last_srtp_error
gint last_srtp_error
Count of the recent SRTP replay errors, in order to avoid spamming the logs.
Definition ice.h:407
janus_ice_handle::last_srtp_summary
gint last_srtp_summary
Definition ice.h:407
janus_ice_handle::destroyed
volatile gint destroyed
Atomic flag to check if this instance has been destroyed.
Definition ice.h:421
janus_ice_handle::cdone
gint cdone
Number of gathered candidates.
Definition ice.h:365
janus_ice_handle::hangup_reason
const gchar * hangup_reason
Reason this handle has been hung up.
Definition ice.h:397
janus_ice_handle::stats_source
GSource * stats_source
Definition ice.h:375
janus_ice_handle::handle_id
guint64 handle_id
Handle identifier, guaranteed to be non-zero.
Definition ice.h:351
janus_ice_handle::stream_id
guint stream_id
ICE Stream ID.
Definition ice.h:387
janus_ice_handle::twcc_source
GSource * twcc_source
Definition ice.h:375
janus_ice_handle::mainctx
GMainContext * mainctx
GLib context for the handle and libnice.
Definition ice.h:367
janus_ice_handle::app_handle
janus_plugin_session * app_handle
Opaque core/plugin session pointer.
Definition ice.h:361
janus_ice_handle::agent_created
gint64 agent_created
Monotonic time of when the ICE agent has been created.
Definition ice.h:379
janus_ice_handle::session
void * session
Opaque pointer to the core/peer session.
Definition ice.h:349
janus_ice_peerconnection_medium
A single media in a PeerConnection.
Definition ice.h:543
janus_ice_peerconnection_medium::disabled_rid
gboolean disabled_rid[3]
Which simulcast rids are currently disabled, as per the latest negotiation.
Definition ice.h:565
janus_ice_peerconnection_medium::retransmit_buffer
GQueue * retransmit_buffer
List of previously sent janus_rtp_packet RTP packets, in case we receive NACKs.
Definition ice.h:607
janus_ice_peerconnection_medium::rid
char * rid[3]
Array of RTP Stream IDs (for simulcasting, if enabled).
Definition ice.h:563
janus_ice_peerconnection_medium::ssrc_peer_new
guint32 ssrc_peer_new[3]
Definition ice.h:559
janus_ice_peerconnection_medium::rids_hml
gboolean rids_hml
Whether the order of the rids in the SDP will be h-m-l (TRUE) or l-m-h (FALSE).
Definition ice.h:567
janus_ice_peerconnection_medium::rtx_nacked
GHashTable * rtx_nacked[3]
Map(s) of the NACKed packets (to track retransmissions and avoid duplicates).
Definition ice.h:593
janus_ice_peerconnection_medium::ssrc_peer
guint32 ssrc_peer[3]
SSRC(s) of the peer for this medium (may be simulcasting).
Definition ice.h:559
janus_ice_peerconnection_medium::opusred_pt
int opusred_pt
opus/red payload type, if enabled
Definition ice.h:575
janus_ice_peerconnection_medium::first_rtp_ts
guint32 first_rtp_ts[3]
First received RTP timestamp.
Definition ice.h:599
janus_ice_peerconnection_medium::last_seqs
janus_seq_info * last_seqs[3]
List of recently received sequence numbers (as a support to NACK generation, for each simulcast SSRC)...
Definition ice.h:621
janus_ice_peerconnection_medium::ssrc_peer_rtx
guint32 ssrc_peer_rtx[3]
Retransmissions SSRC(s) of the peer for this medium (may be simulcasting).
Definition ice.h:561
janus_ice_peerconnection_medium::recv
gboolean recv
Definition ice.h:587
janus_ice_peerconnection_medium::type
janus_media_type type
Type of this medium.
Definition ice.h:547
janus_ice_peerconnection_medium::ssrc_peer_rtx_orig
guint32 ssrc_peer_rtx_orig[3]
Definition ice.h:561
janus_ice_peerconnection_medium::retransmit_recent_cnt
guint retransmit_recent_cnt
Number of retransmitted packets since last log message.
Definition ice.h:615
janus_ice_peerconnection_medium::retransmit_log_ts
gint64 retransmit_log_ts
Last time a log message about sending retransmits was printed.
Definition ice.h:613
janus_ice_peerconnection_medium::rtx_payload_type
gint rtx_payload_type
Definition ice.h:581
janus_ice_peerconnection_medium::video_is_keyframe
gboolean(* video_is_keyframe)(const char *buffer, int len)
Pointer to function to check if a packet is a keyframe (depends on negotiated codec; video only).
Definition ice.h:585
janus_ice_peerconnection_medium::retransmit_seqs
GHashTable * retransmit_seqs
HashTable of retransmittable sequence numbers, in case we receive NACKs.
Definition ice.h:609
janus_ice_peerconnection_medium::mindex
int mindex
Index of this medium in the media list.
Definition ice.h:549
janus_ice_peerconnection_medium::ssrc_rtx
guint32 ssrc_rtx
Retransmission SSRC of the server for this medium.
Definition ice.h:557
janus_ice_peerconnection_medium::do_nacks
gboolean do_nacks
Whether we should do NACKs (in or out) for this medium.
Definition ice.h:605
janus_ice_peerconnection_medium::ref
janus_refcount ref
Reference counter for this instance.
Definition ice.h:633
janus_ice_peerconnection_medium::clock_rates
GHashTable * clock_rates
Mapping of payload types to their clock rates, as advertised in the SDP.
Definition ice.h:579
janus_ice_peerconnection_medium::rtx_payload_types
GHashTable * rtx_payload_types
Mapping of rtx payload types to actual media-related packet types.
Definition ice.h:577
janus_ice_peerconnection_medium::noerrorlog
gboolean noerrorlog
Helper flag to avoid flooding the console with the same error all over again.
Definition ice.h:627
janus_ice_peerconnection_medium::ssrc_peer_temp
guint32 ssrc_peer_temp
Definition ice.h:559
janus_ice_peerconnection_medium::pending_nacked_cleanup
GHashTable * pending_nacked_cleanup
Map of the pending NACKed cleanup callback.
Definition ice.h:595
janus_ice_peerconnection_medium::rtcp_ctx
janus_rtcp_context * rtcp_ctx[3]
RTCP context(s) for the medium (may be simulcasting).
Definition ice.h:589
janus_ice_peerconnection_medium::ssrc_peer_rtx_new
guint32 ssrc_peer_rtx_new[3]
Definition ice.h:561
janus_ice_peerconnection_medium::msid
char * msid
Media Stream ID info.
Definition ice.h:553
janus_ice_peerconnection_medium::rtp_ctx
janus_rtp_switching_context rtp_ctx[3]
RTP switching context(s) in case of renegotiations (audio+video and/or simulcast).
Definition ice.h:571
janus_ice_peerconnection_medium::pc
janus_ice_peerconnection * pc
WebRTC PeerConnection this m-line belongs to.
Definition ice.h:545
janus_ice_peerconnection_medium::nack_sent_recent_cnt
guint nack_sent_recent_cnt
Number of NACKs sent since last log message.
Definition ice.h:619
janus_ice_peerconnection_medium::first_ntp_ts
gint64 first_ntp_ts[3]
First received NTP timestamp.
Definition ice.h:597
janus_ice_peerconnection_medium::out_stats
janus_ice_stats out_stats
Stats for outgoing data (audio/video/data).
Definition ice.h:625
janus_ice_peerconnection_medium::ssrc
guint32 ssrc
SSRC of the server for this medium.
Definition ice.h:555
janus_ice_peerconnection_medium::payload_types
GList * payload_types
List of payload types we can expect.
Definition ice.h:573
janus_ice_peerconnection_medium::nack_queue_ms
uint16_t nack_queue_ms
Size of the NACK queue (in ms), dynamically updated per the RTT.
Definition ice.h:591
janus_ice_peerconnection_medium::destroyed
volatile gint destroyed
Atomic flag to check if this instance has been destroyed.
Definition ice.h:631
janus_ice_peerconnection_medium::send
gboolean send
Media direction.
Definition ice.h:587
janus_ice_peerconnection_medium::last_rtp_ts
guint32 last_rtp_ts
Last sent RTP timestamp.
Definition ice.h:603
janus_ice_peerconnection_medium::remote_mstid
char * remote_mstid
Definition ice.h:553
janus_ice_peerconnection_medium::legacy_rid
gboolean legacy_rid
Whether we should use the legacy simulcast syntax (a=simulcast:recv rid=..) or the proper one (a=simu...
Definition ice.h:569
janus_ice_peerconnection_medium::mstid
char * mstid
Definition ice.h:553
janus_ice_peerconnection_medium::rtx_seq_number
guint16 rtx_seq_number
Current sequence number for the RFC4588 rtx SSRC session.
Definition ice.h:611
janus_ice_peerconnection_medium::remote_msid
char * remote_msid
Definition ice.h:553
janus_ice_peerconnection_medium::nack_sent_log_ts
gint64 nack_sent_log_ts
Last time a log message about sending NACKs was printed.
Definition ice.h:617
janus_ice_peerconnection_medium::payload_type
gint payload_type
RTP payload types for this medium.
Definition ice.h:581
janus_ice_peerconnection_medium::ssrc_peer_orig
guint32 ssrc_peer_orig[3]
Definition ice.h:559
janus_ice_peerconnection_medium::in_stats
janus_ice_stats in_stats
Stats for incoming data (audio/video/data).
Definition ice.h:623
janus_ice_peerconnection_medium::mid
char * mid
Media ID.
Definition ice.h:551
janus_ice_peerconnection_medium::last_ntp_ts
gint64 last_ntp_ts
Last sent NTP timestamp.
Definition ice.h:601
janus_ice_peerconnection_medium::mutex
janus_mutex mutex
Mutex to lock/unlock this medium.
Definition ice.h:629
janus_ice_peerconnection_medium::codec
char * codec
Codec used in this medium.
Definition ice.h:583
janus_ice_peerconnection
Janus handle WebRTC PeerConnection.
Definition ice.h:427
janus_ice_peerconnection::playoutdelay_ext_id
gint playoutdelay_ext_id
Playout delay extension ID.
Definition ice.h:469
janus_ice_peerconnection::too_large
volatile gint too_large
Flag to count how many too large packets we discarded, if any.
Definition ice.h:532
janus_ice_peerconnection::media
GHashTable * media
GLib hash table of media (m-line indexes are the keys).
Definition ice.h:509
janus_ice_peerconnection::remote_fingerprint
gchar * remote_fingerprint
Hashed fingerprint of the peer's certificate, as parsed in SDP.
Definition ice.h:503
janus_ice_peerconnection::dtls_in_stats
janus_ice_stats dtls_in_stats
Data exchanged for DTLS handshakes and messages.
Definition ice.h:499
janus_ice_peerconnection::local_candidates
GSList * local_candidates
GLib list of local candidates for this component (summary).
Definition ice.h:445
janus_ice_peerconnection::remote_candidates
GSList * remote_candidates
GLib list of remote candidates for this component (summary).
Definition ice.h:447
janus_ice_peerconnection::audiolevel_ext_id
gint audiolevel_ext_id
Audio levels extension ID.
Definition ice.h:465
janus_ice_peerconnection::dtls_out_stats
janus_ice_stats dtls_out_stats
Definition ice.h:499
janus_ice_peerconnection::noerrorlog
gboolean noerrorlog
Helper flag to avoid flooding the console with the same error all over again.
Definition ice.h:530
janus_ice_peerconnection::payload_types
GHashTable * payload_types
List of payload types we can expect.
Definition ice.h:520
janus_ice_peerconnection::state
guint state
libnice ICE component state
Definition ice.h:437
janus_ice_peerconnection::transport_wide_cc_ext_id
gint transport_wide_cc_ext_id
Transport wide cc rtp ext ID.
Definition ice.h:481
janus_ice_peerconnection::dtls_role
janus_dtls_role dtls_role
DTLS role of the server for this stream.
Definition ice.h:497
janus_ice_peerconnection::media_bymid
GHashTable * media_bymid
GLib hash table of media (mids are the keys).
Definition ice.h:513
janus_ice_peerconnection::dependencydesc_ext_id
gint dependencydesc_ext_id
Dependency descriptor extension ID.
Definition ice.h:471
janus_ice_peerconnection::process_started
gboolean process_started
Whether the setup of remote candidates for this component has started or not.
Definition ice.h:451
janus_ice_peerconnection::candidates
GSList * candidates
GLib list of libnice remote candidates for this component.
Definition ice.h:443
janus_ice_peerconnection::ruser
gchar * ruser
The ICE username for this stream.
Definition ice.h:505
janus_ice_peerconnection::nacks_queue
GQueue * nacks_queue
Helper queue for storing requested packets from NACKs.
Definition ice.h:528
janus_ice_peerconnection::videolayers_ext_id
gint videolayers_ext_id
Video Layers Allocation ext ID.
Definition ice.h:477
janus_ice_peerconnection::gathered
gint64 gathered
Monotonic time of when gathering has completed.
Definition ice.h:439
janus_ice_peerconnection::media_bytype
GHashTable * media_bytype
GLib hash table of media (media types are the keys).
Definition ice.h:518
janus_ice_peerconnection::handle
janus_ice_handle * handle
Janus ICE handle this stream belongs to.
Definition ice.h:429
janus_ice_peerconnection::cdone
gboolean cdone
Whether this stream is ready to be used.
Definition ice.h:435
janus_ice_peerconnection::remote_hashing
gchar * remote_hashing
Hashing algorithm used by the peer for the DTLS certificate (e.g., "SHA-256").
Definition ice.h:501
janus_ice_peerconnection::transport_wide_cc_feedback_count
guint transport_wide_cc_feedback_count
Transport wide cc rtp ext ID.
Definition ice.h:491
janus_ice_peerconnection::transport_wide_received_seq_nums
GSList * transport_wide_received_seq_nums
GLib list of transport wide cc stats in reverse received order.
Definition ice.h:493
janus_ice_peerconnection::transport_wide_cc_last_feedback_seq_num
guint32 transport_wide_cc_last_feedback_seq_num
Last transport wide seq num sent on feedback.
Definition ice.h:487
janus_ice_peerconnection::destroyed
volatile gint destroyed
Atomic flag to check if this instance has been destroyed.
Definition ice.h:536
janus_ice_peerconnection::remb_bitrate
uint32_t remb_bitrate
Latest REMB feedback we received.
Definition ice.h:495
janus_ice_peerconnection::do_transport_wide_cc
gboolean do_transport_wide_cc
Whether we do transport wide cc.
Definition ice.h:479
janus_ice_peerconnection::ref
janus_refcount ref
Reference counter for this instance.
Definition ice.h:538
janus_ice_peerconnection::dtls
janus_dtls_srtp * dtls
DTLS-SRTP stack.
Definition ice.h:459
janus_ice_peerconnection::transport_wide_cc_last_seq_num
guint32 transport_wide_cc_last_seq_num
Last received transport wide seq num.
Definition ice.h:485
janus_ice_peerconnection::rtx_payload_types
GHashTable * rtx_payload_types
Mapping of rtx payload types to actual media-related packet types.
Definition ice.h:524
janus_ice_peerconnection::connected
gint64 connected
Monotonic time of when ICE has successfully connected.
Definition ice.h:441
janus_ice_peerconnection::media_byssrc
GHashTable * media_byssrc
GLib hash table of media (SSRCs are the keys).
Definition ice.h:511
janus_ice_peerconnection::transport_wide_cc_out_seq_num
guint16 transport_wide_cc_out_seq_num
Last sent transport wide seq num.
Definition ice.h:483
janus_ice_peerconnection::clock_rates
GHashTable * clock_rates
Mapping of payload types to their clock rates, as advertised in the SDP.
Definition ice.h:522
janus_ice_peerconnection::rtx_payload_types_rev
GHashTable * rtx_payload_types_rev
Reverse mapping of rtx payload types to actual media-related packet types.
Definition ice.h:526
janus_ice_peerconnection::selected_pair
gchar * selected_pair
String representation of the selected pair as notified by libnice (foundations).
Definition ice.h:449
janus_ice_peerconnection::component_id
guint component_id
libnice ICE component ID
Definition ice.h:433
janus_ice_peerconnection::ridrtx_ext_id
gint ridrtx_ext_id
Definition ice.h:463
janus_ice_peerconnection::abs_capture_time_ext_id
gint abs_capture_time_ext_id
Absolute Capture Time ext ID.
Definition ice.h:475
janus_ice_peerconnection::transport_wide_cc_cycles
guint16 transport_wide_cc_cycles
Transport wide cc transport seq num wrap cycles.
Definition ice.h:489
janus_ice_peerconnection::stream_id
guint stream_id
libnice ICE stream ID
Definition ice.h:431
janus_ice_peerconnection::mid_ext_id
gint mid_ext_id
SDES mid RTP extension ID.
Definition ice.h:461
janus_ice_peerconnection::videoorientation_ext_id
gint videoorientation_ext_id
Video orientation extension ID.
Definition ice.h:467
janus_ice_peerconnection::rid_ext_id
gint rid_ext_id
RTP Stream extension ID, and the related rtx one.
Definition ice.h:463
janus_ice_peerconnection::mutex
janus_mutex mutex
Mutex to lock/unlock this stream.
Definition ice.h:534
janus_ice_peerconnection::rpass
gchar * rpass
The ICE password for this stream.
Definition ice.h:507
janus_ice_peerconnection::icestate_source
GSource * icestate_source
Timer to check when we should consider ICE as failed.
Definition ice.h:453
janus_ice_peerconnection::icefailed_detected
gint64 icefailed_detected
Time of when we first detected an ICE failed (we'll need this for the timer above).
Definition ice.h:455
janus_ice_peerconnection::abs_send_time_ext_id
gint abs_send_time_ext_id
Absolute Send Time ext ID.
Definition ice.h:473
janus_ice_peerconnection::dtlsrt_source
GSource * dtlsrt_source
Re-transmission timer for DTLS.
Definition ice.h:457
janus_ice_stats_info
Janus media statistics.
Definition ice.h:293
janus_ice_stats_info::bytes_lastsec_temp
guint32 bytes_lastsec_temp
Definition ice.h:299
janus_ice_stats_info::updated
gint64 updated
Time we last updated the last second counter.
Definition ice.h:301
janus_ice_stats_info::packets
guint32 packets
Packets sent or received.
Definition ice.h:295
janus_ice_stats_info::nacks
guint32 nacks
Number of NACKs sent or received.
Definition ice.h:305
janus_ice_stats_info::notified_lastsec
gboolean notified_lastsec
Whether or not we notified about lastsec issues already.
Definition ice.h:303
janus_ice_stats_info::bytes
guint64 bytes
Bytes sent or received.
Definition ice.h:297
janus_ice_stats_info::bytes_lastsec
guint32 bytes_lastsec
Bytes sent or received in the last second.
Definition ice.h:299
janus_ice_stats
Janus media statistics container.
Definition ice.h:310
janus_ice_stats::info
janus_ice_stats_info info[3]
Media stats info (considering we may be simulcasting).
Definition ice.h:312
janus_ice_stats::sl_lost_count
guint sl_lost_count
Last known count of lost packets (for slow_link).
Definition ice.h:314
janus_ice_trickle
Helper to handle pending trickle candidates (e.g., when we're still waiting for an offer).
Definition ice.h:643
janus_ice_trickle::received
gint64 received
Monotonic time of when this trickle candidate has been received.
Definition ice.h:647
janus_ice_trickle::transaction
char * transaction
Janus API transaction ID of the original trickle request.
Definition ice.h:649
janus_ice_trickle::handle
janus_ice_handle * handle
Janus ICE handle this trickle candidate belongs to.
Definition ice.h:645
janus_ice_trickle::candidate
json_t * candidate
JSON object of the trickle candidate(s).
Definition ice.h:651
janus_network_address
Structure to hold network addresses in a tagged union which should be IPv4 and IPv6 compatible....
Definition ip-utils.h:53
janus_plugin_data
Janus plugin data message.
Definition plugin.h:652
janus_plugin_rtcp
Janus plugin RTCP packet.
Definition plugin.h:628
janus_plugin_rtp
Janus plugin RTP packet.
Definition plugin.h:596
janus_plugin_session
Plugin-Gateway session mapping.
Definition plugin.h:239
janus_plugin
The plugin session and callbacks interface.
Definition plugin.h:252
janus_refcount
Definition refcount.h:78
janus_rtp_switching_context
RTP context, in order to make sure SSRC changes result in coherent seq/ts increases.
Definition rtp.h:308
janus_sdp_mline
SDP m-line representation.
Definition sdp-utils.h:131
janus_seq_info
A helper struct for determining when to send NACKs.
Definition ice.h:330
janus_seq_info::seq
guint16 seq
Definition ice.h:332
janus_seq_info::ts
gint64 ts
Definition ice.h:331
janus_seq_info::state
guint16 state
Definition ice.h:333
janus_seq_info::next
struct janus_seq_info * next
Definition ice.h:334
janus_seq_info::prev
struct janus_seq_info * prev
Definition ice.h:335
janus_text2pcap
Instance of a text2pcap recorder.
Definition text2pcap.h:49
text2pcap.h
Dumping of RTP/RTCP packets to text2pcap or pcap format (headers).
utils.h
TURN REST API client.
janus_flags
gsize janus_flags
Janus flags container.
Definition utils.h:172