FFmpeg
Loading...
Searching...
No Matches
RTCContext Struct Reference

#include <rtc.h>

Data Fields

AVFormatContext * ctx
 
uint32_t flags
 
enum RTCState state
 
AVLFG rnd
 
char ice_ufrag_local [9]
 
char ice_pwd_local [33]
 
char * sdp_offer
 This is the SDP offer generated by the local peer based on the codec parameters, DTLS, and ICE information.
 
int is_peer_ice_lite
 
uint64_t ice_tie_breaker
 
char * ice_ufrag_remote
 
char * ice_pwd_remote
 
char * ice_protocol
 This represents the ICE candidate protocol, priority, host and port.
 
char * ice_host
 
int ice_port
 
char * sdp_answer
 
char * resource_url
 
int64_t starttime
 
int64_t init_time
 
int64_t offer_time
 
int64_t answer_time
 
int64_t udp_time
 
int64_t ice_time
 
int64_t dtls_time
 
int64_t srtp_time
 
int64_t last_consent_tx_time
 
int64_t last_consent_rx_time
 
char cert_buf [MAX_CERTIFICATE_SIZE]
 
char key_buf [MAX_CERTIFICATE_SIZE]
 
char * dtls_fingerprint
 
char * remote_fingerprint
 
uint8_t dtls_srtp_materials [(RTC_DTLS_SRTP_KEY_LEN+RTC_DTLS_SRTP_SALT_LEN) *2]
 This represents the material used to build the SRTP master key.
 
char srtp_send_key [RTC_SRTP_KEY_SIZE]
 
char srtp_recv_key [RTC_SRTP_KEY_SIZE]
 
URLContext * dtls_uc
 
URLContext * udp
 
char buf [RTC_MAX_UDP_BUFFER_SIZE]
 
int handshake_timeout
 
int64_t timeout
 
int pkt_size
 The size of RTP packet, should generally be set to MTU.
 
int ts_buffer_size
 
char * authorization
 The optional Bearer token for HTTP Authorization.
 
char * cert_file
 
char * key_file
 

Detailed Description

Definition at line 121 of file rtc.h.

Field Documentation

◆ ctx

◆ flags

uint32_t RTCContext::flags

◆ state

◆ rnd

AVLFG RTCContext::rnd

Definition at line 129 of file rtc.h.

Referenced by ff_rtc_initialize(), generate_sdp_offer(), ice_create_request(), and initialize().

◆ ice_ufrag_local

char RTCContext::ice_ufrag_local[9]

Definition at line 132 of file rtc.h.

Referenced by ff_rtc_ice_dtls_handshake(), generate_sdp_offer(), and ice_create_request().

◆ ice_pwd_local

char RTCContext::ice_pwd_local[33]

Definition at line 133 of file rtc.h.

Referenced by generate_sdp_offer(), and ice_create_response().

◆ sdp_offer

char* RTCContext::sdp_offer

This is the SDP offer generated by the local peer based on the codec parameters, DTLS, and ICE information.

Definition at line 139 of file rtc.h.

Referenced by ff_rtc_deinit(), ff_rtc_exchange_sdp(), ff_rtc_parse_answer(), and generate_sdp_offer().

◆ is_peer_ice_lite

int RTCContext::is_peer_ice_lite

Definition at line 141 of file rtc.h.

Referenced by ff_rtc_ice_dtls_handshake(), and ff_rtc_parse_answer().

◆ ice_tie_breaker

uint64_t RTCContext::ice_tie_breaker

Definition at line 142 of file rtc.h.

Referenced by ff_rtc_initialize(), and ice_create_request().

◆ ice_ufrag_remote

char* RTCContext::ice_ufrag_remote

◆ ice_pwd_remote

char* RTCContext::ice_pwd_remote

Definition at line 145 of file rtc.h.

Referenced by ff_rtc_deinit(), ff_rtc_parse_answer(), and ice_create_request().

◆ ice_protocol

char* RTCContext::ice_protocol

This represents the ICE candidate protocol, priority, host and port.

Currently, we only support one candidate and choose the first UDP candidate. However, we plan to support multiple candidates in the future.

Definition at line 151 of file rtc.h.

Referenced by ff_rtc_deinit(), and ff_rtc_parse_answer().

◆ ice_host

char* RTCContext::ice_host

◆ ice_port

int RTCContext::ice_port

◆ sdp_answer

char* RTCContext::sdp_answer

Definition at line 156 of file rtc.h.

Referenced by ff_rtc_deinit(), ff_rtc_exchange_sdp(), and ff_rtc_parse_answer().

◆ resource_url

char* RTCContext::resource_url

◆ starttime

◆ init_time

int64_t RTCContext::init_time

Definition at line 162 of file rtc.h.

Referenced by create_rtp_muxer(), and ff_rtc_initialize().

◆ offer_time

int64_t RTCContext::offer_time

Definition at line 163 of file rtc.h.

Referenced by create_rtp_muxer(), and generate_sdp_offer().

◆ answer_time

int64_t RTCContext::answer_time

Definition at line 164 of file rtc.h.

Referenced by create_rtp_muxer(), and ff_rtc_parse_answer().

◆ udp_time

int64_t RTCContext::udp_time

Definition at line 165 of file rtc.h.

Referenced by create_rtp_muxer(), and ff_rtc_udp_connect().

◆ ice_time

int64_t RTCContext::ice_time

Definition at line 166 of file rtc.h.

Referenced by create_rtp_muxer(), and ff_rtc_ice_dtls_handshake().

◆ dtls_time

int64_t RTCContext::dtls_time

Definition at line 167 of file rtc.h.

Referenced by create_rtp_muxer(), and ff_rtc_ice_dtls_handshake().

◆ srtp_time

int64_t RTCContext::srtp_time

Definition at line 168 of file rtc.h.

Referenced by create_rtp_muxer(), and setup_srtp().

◆ last_consent_tx_time

int64_t RTCContext::last_consent_tx_time

Definition at line 169 of file rtc.h.

Referenced by ff_rtc_ice_check_and_send_consent(), and ff_rtc_ice_dtls_handshake().

◆ last_consent_rx_time

int64_t RTCContext::last_consent_rx_time

◆ cert_buf

char RTCContext::cert_buf[MAX_CERTIFICATE_SIZE]

Definition at line 173 of file rtc.h.

Referenced by certificate_key_init(), and dtls_initialize().

◆ key_buf

char RTCContext::key_buf[MAX_CERTIFICATE_SIZE]

Definition at line 174 of file rtc.h.

Referenced by certificate_key_init(), and dtls_initialize().

◆ dtls_fingerprint

char* RTCContext::dtls_fingerprint

Definition at line 176 of file rtc.h.

Referenced by certificate_key_init(), ff_rtc_deinit(), and generate_sdp_offer().

◆ remote_fingerprint

char* RTCContext::remote_fingerprint

Definition at line 178 of file rtc.h.

Referenced by ff_rtc_deinit(), and ff_rtc_parse_answer().

◆ dtls_srtp_materials

uint8_t RTCContext::dtls_srtp_materials[(RTC_DTLS_SRTP_KEY_LEN+RTC_DTLS_SRTP_SALT_LEN) *2]

This represents the material used to build the SRTP master key.

It is generated by DTLS and has the following layout: 16B 16B 14B 14B client_key | server_key | client_salt | server_salt

Definition at line 186 of file rtc.h.

Referenced by ff_rtc_srtp_export_keys().

◆ srtp_send_key

char RTCContext::srtp_send_key[RTC_SRTP_KEY_SIZE]

Definition at line 188 of file rtc.h.

Referenced by ff_rtc_srtp_export_keys(), and setup_srtp().

◆ srtp_recv_key

char RTCContext::srtp_recv_key[RTC_SRTP_KEY_SIZE]

Definition at line 189 of file rtc.h.

Referenced by ff_rtc_srtp_export_keys(), and setup_srtp().

◆ dtls_uc

URLContext* RTCContext::dtls_uc

◆ udp

◆ buf

◆ handshake_timeout

int RTCContext::handshake_timeout

Definition at line 200 of file rtc.h.

Referenced by ff_rtc_ice_dtls_handshake(), and ff_rtc_initialize().

◆ timeout

int64_t RTCContext::timeout

Definition at line 202 of file rtc.h.

Referenced by ff_rtc_dispose_session(), and ff_rtc_exchange_sdp().

◆ pkt_size

int RTCContext::pkt_size

The size of RTP packet, should generally be set to MTU.

Note that pion requires a smaller value, for example, 1200.

Definition at line 207 of file rtc.h.

Referenced by create_rtp_muxer(), dtls_initialize(), ff_rtc_initialize(), ff_rtc_udp_connect(), initialize(), and rtp_history_store().

◆ ts_buffer_size

int RTCContext::ts_buffer_size

Definition at line 208 of file rtc.h.

Referenced by ff_rtc_udp_connect().

◆ authorization

char* RTCContext::authorization

The optional Bearer token for HTTP Authorization.

See https://www.ietf.org/archive/id/draft-ietf-wish-whip-08.html#name-authentication-and-authoriz

Definition at line 213 of file rtc.h.

Referenced by ff_rtc_deinit(), ff_rtc_dispose_session(), and ff_rtc_exchange_sdp().

◆ cert_file

char* RTCContext::cert_file

Definition at line 215 of file rtc.h.

Referenced by certificate_key_init(), dtls_initialize(), and ff_rtc_deinit().

◆ key_file

char* RTCContext::key_file

Definition at line 216 of file rtc.h.

Referenced by certificate_key_init(), dtls_initialize(), and ff_rtc_deinit().


The documentation for this struct was generated from the following file: