libgpac
Documentation of the core library of GPAC
ietf.h File Reference

Tools for real-time streaming over IP using RTP/RTCP/RTSP/SDP . More...

#include <gpac/list.h>
#include <gpac/bitstream.h>
#include <gpac/sync_layer.h>
#include <gpac/network.h>
+ Include dependency graph for ietf.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  GF_RTSPRange
 
struct  GF_RTSPTransport
 
struct  GF_RTSPCommand
 
struct  GF_RTPInfo
 
struct  GF_RTSPResponse
 
struct  GF_RTPHeader
 
struct  GF_RTPMap
 
struct  GF_X_Attribute
 
struct  GF_SDPBandwidth
 
struct  GF_SDPTiming
 
struct  GF_SDPConnection
 
struct  GF_SDP_FMTP
 
struct  GF_SDPMedia
 
struct  GF_SDPInfo
 
struct  GP_RTPSLMap
 
struct  GF_RTPStaticMap
 

Macros

#define GF_RTSP_VERSION   "RTSP/1.0"
 
#define GF_RTSP_PROFILE_RTP_AVP   "RTP/AVP"
 
#define GF_RTSP_PROFILE_RTP_AVP_TCP   "RTP/AVP/TCP"
 
#define GF_RTSP_PROFILE_UDP   "udp"
 
#define GF_RTSP_DESCRIBE   "DESCRIBE"
 
#define GF_RTSP_SETUP   "SETUP"
 
#define GF_RTSP_PLAY   "PLAY"
 
#define GF_RTSP_PAUSE   "PAUSE"
 
#define GF_RTSP_RECORD   "RECORD"
 
#define GF_RTSP_TEARDOWN   "TEARDOWN"
 
#define GF_RTSP_GET_PARAMETER   "GET_PARAMETER"
 
#define GF_RTSP_SET_PARAMETER   "SET_PARAMETER"
 
#define GF_RTSP_OPTIONS   "OPTIONS"
 
#define GF_RTSP_ANNOUNCE   "ANNOUNCE"
 
#define GF_RTSP_REDIRECT   "REDIRECT"
 
#define GF_RTSP_TUNNEL_POST   -1000
 
#define GF_SDP_MAX_TIMEOFFSET   10
 

Typedefs

typedef GF_Err(* gf_rtsp_interleave_callback) (GF_RTSPSession *sess, void *cbk_ptr, u8 *buffer, u32 bufferSize, Bool IsRTCP)
 
typedef GF_Err(* gf_rtp_tcp_callback) (void *cbk1, void *cbk2, Bool is_rtcp, u8 *pck, u32 pck_size)
 
typedef void(* gf_rtp_packet_cbk) (void *udta, u8 *payload, u32 size, GF_SLHeader *hdr, GF_Err e)
 

Enumerations

enum  {
  NC_RTSP_Continue = 100 , NC_RTSP_OK = 200 , NC_RTSP_Created = 201 , NC_RTSP_Low_on_Storage_Space = 250 ,
  NC_RTSP_Multiple_Choice = 300 , NC_RTSP_Moved_Permanently = 301 , NC_RTSP_Moved_Temporarily = 302 , NC_RTSP_See_Other = 303 ,
  NC_RTSP_Use_Proxy = 305 , NC_RTSP_Bad_Request = 400 , NC_RTSP_Unauthorized = 401 , NC_RTSP_Payment_Required = 402 ,
  NC_RTSP_Forbidden = 403 , NC_RTSP_Not_Found = 404 , NC_RTSP_Method_Not_Allowed = 405 , NC_RTSP_Not_Acceptable = 406 ,
  NC_RTSP_Proxy_Authentication_Required = 407 , NC_RTSP_Request_Timeout = 408 , NC_RTSP_Gone = 410 , NC_RTSP_Length_Required = 411 ,
  NC_RTSP_Precondition_Failed = 412 , NC_RTSP_Request_Entity_Too_Large = 413 , NC_RTSP_Request_URI_Too_Long = 414 , NC_RTSP_Unsupported_Media_Type = 415 ,
  NC_RTSP_Invalid_parameter = 451 , NC_RTSP_Illegal_Conference_Identifier = 452 , NC_RTSP_Not_Enough_Bandwidth = 453 , NC_RTSP_Session_Not_Found = 454 ,
  NC_RTSP_Method_Not_Valid_In_This_State = 455 , NC_RTSP_Header_Field_Not_Valid = 456 , NC_RTSP_Invalid_Range = 457 , NC_RTSP_Parameter_Is_ReadOnly = 458 ,
  NC_RTSP_Aggregate_Operation_Not_Allowed = 459 , NC_RTSP_Only_Aggregate_Operation_Allowed = 460 , NC_RTSP_Unsupported_Transport = 461 , NC_RTSP_Destination_Unreachable = 462 ,
  NC_RTSP_Internal_Server_Error = 500 , NC_RTSP_Not_Implemented = 501 , NC_RTSP_Bad_Gateway = 502 , NC_RTSP_Service_Unavailable = 503 ,
  NC_RTSP_Gateway_Timeout = 504 , NC_RTSP_RTSP_Version_Not_Supported = 505 , NC_RTSP_Option_not_support = 551
}
 
enum  { GF_RTSP_STATE_INIT = 0 , GF_RTSP_STATE_WAITING , GF_RTSP_STATE_WAIT_FOR_CONTROL , GF_RTSP_STATE_INVALIDATED }
 
enum  {
  GP_RTP_PCK_FORCE_MPEG4 = (1) , GP_RTP_PCK_USE_MULTI = (1<<1) , GP_RTP_PCK_USE_INTERLEAVING = (1<<2) , GP_RTP_PCK_USE_STATIC_ID = (1<<3) ,
  GP_RTP_PCK_SIGNAL_RAP = (1<<4) , GP_RTP_PCK_SIGNAL_AU_IDX = (1<<5) , GP_RTP_PCK_SIGNAL_SIZE = (1<<6) , GP_RTP_PCK_SIGNAL_TS = (1<<7) ,
  GP_RTP_PCK_SYSTEMS_CAROUSEL = (1<<8) , GP_RTP_PCK_USE_LATM_AAC = (1<<9) , GP_RTP_PCK_SELECTIVE_ENCRYPTION = (1<<10) , GP_RTP_PCK_KEY_IDX_PER_AU = (1<<11) ,
  GP_RTP_DIMS_COMPRESSED = (1<<12) , GP_RTP_PCK_FORCE_STATIC_ID = (1<<13)
}
 
enum  {
  GF_RTP_PAYT_PCMU = 0 , GF_RTP_PAYT_GSM , GF_RTP_PAYT_G723 , GF_RTP_PAYT_DVI4_8K ,
  GF_RTP_PAYT_DVI4_16K , GF_RTP_PAYT_LPC , GF_RTP_PAYT_PCMA , GF_RTP_PAYT_G722 ,
  GF_RTP_PAYT_L16_STEREO , GF_RTP_PAYT_L16_MONO , GF_RTP_PAYT_QCELP_BASIC , GF_RTP_PAYT_CN ,
  GF_RTP_PAYT_MPEG12_AUDIO , GF_RTP_PAYT_G728 , GF_RTP_PAYT_DVI4_11K , GF_RTP_PAYT_DVI4_22K ,
  GF_RTP_PAYT_G729 , GF_RTP_PAYT_CelB = 25 , GF_RTP_PAYT_JPEG = 26 , GF_RTP_PAYT_nv = 28 ,
  GF_RTP_PAYT_H261 = 31 , GF_RTP_PAYT_MPEG12_VIDEO = 32 , GF_RTP_PAYT_MP2T = 33 , GF_RTP_PAYT_H263 = 34 ,
  GF_RTP_PAYT_LAST_STATIC_DEFINED = 35 , GF_RTP_PAYT_UNKNOWN = 128 , GF_RTP_PAYT_MPEG4 , GF_RTP_PAYT_AMR ,
  GF_RTP_PAYT_AMR_WB , GF_RTP_PAYT_QCELP , GF_RTP_PAYT_EVRC_SMV , GF_RTP_PAYT_3GPP_TEXT ,
  GF_RTP_PAYT_H264_AVC , GF_RTP_PAYT_LATM , GF_RTP_PAYT_AC3 , GF_RTP_PAYT_EAC3 ,
  GF_RTP_PAYT_H264_SVC , GF_RTP_PAYT_HEVC , GF_RTP_PAYT_LHVC , GF_RTP_PAYT_VVC ,
  GF_RTP_PAYT_OPUS
}
 
enum  {
  GF_RTP_NEW_AU = (1) , GF_RTP_AMR_ALIGN = (1<<1) , GF_RTP_M4V_CHECK_RAP = (1<<2) , GF_RTP_AVC_WAIT_RAP = (1<<4) ,
  GF_RTP_HAS_ISMACRYP = (1<<5) , GF_RTP_ISMA_SEL_ENC = (1<<6) , GF_RTP_ISMA_HAS_KEY_IDX = (1<<7) , GF_RTP_AVC_USE_ANNEX_B = (1<<8)
}
 

Functions

const char * gf_rtsp_nc_to_string (u32 ErrCode)
 
GF_RTSPRangegf_rtsp_range_parse (char *range_buf)
 
GF_RTSPRangegf_rtsp_range_new ()
 
void gf_rtsp_range_del (GF_RTSPRange *range)
 
GF_RTSPTransportgf_rtsp_transport_clone (GF_RTSPTransport *transp)
 
void gf_rtsp_transport_del (GF_RTSPTransport *transp)
 
GF_RTSPCommandgf_rtsp_command_new ()
 
void gf_rtsp_command_del (GF_RTSPCommand *com)
 
void gf_rtsp_command_reset (GF_RTSPCommand *com)
 
GF_RTSPResponsegf_rtsp_response_new ()
 
void gf_rtsp_response_del (GF_RTSPResponse *rsp)
 
void gf_rtsp_response_reset (GF_RTSPResponse *rsp)
 
GF_RTSPSession * gf_rtsp_session_new (char *sURL, u16 DefaultPort)
 
void gf_rtsp_session_del (GF_RTSPSession *sess)
 
GF_Err gf_rtsp_set_buffer_size (GF_RTSPSession *sess, u32 BufferSize)
 
u32 gf_rtsp_session_reset (GF_RTSPSession *sess, Bool ResetConnection)
 
Bool gf_rtsp_is_my_session (GF_RTSPSession *sess, char *url)
 
const char * gf_rtsp_get_server_name (GF_RTSPSession *sess)
 
const char * gf_rtsp_get_user (GF_RTSPSession *sess)
 
const char * gf_rtsp_get_password (GF_RTSPSession *sess)
 
u16 gf_rtsp_get_session_port (GF_RTSPSession *sess)
 
Bool gf_rtsp_use_tls (GF_RTSPSession *sess)
 
GF_Err gf_rtsp_get_response (GF_RTSPSession *sess, GF_RTSPResponse *rsp)
 
u32 gf_rtsp_get_session_state (GF_RTSPSession *sess)
 
void gf_rtsp_reset_aggregation (GF_RTSPSession *sess)
 
GF_Err gf_rtsp_send_command (GF_RTSPSession *sess, GF_RTSPCommand *com)
 
GF_Err gf_rtsp_check_connection (GF_RTSPSession *sess)
 
GF_Err gf_rtsp_set_interleave_callback (GF_RTSPSession *sess, gf_rtsp_interleave_callback SignalData)
 
GF_Err gf_rtsp_session_read (GF_RTSPSession *sess)
 
GF_Err gf_rtsp_register_interleave (GF_RTSPSession *sess, void *the_ch, u8 LowInterID, u8 HighInterID)
 
u32 gf_rtsp_unregister_interleave (GF_RTSPSession *sess, u8 LowInterID)
 
GF_RTSPSession * gf_rtsp_session_new_server (GF_Socket *rtsp_listener, Bool allow_http_tunnel, void *ssl_ctx)
 
GF_Err gf_rtsp_get_command (GF_RTSPSession *sess, GF_RTSPCommand *com)
 
char * gf_rtsp_generate_session_id (GF_RTSPSession *sess)
 
GF_Err gf_rtsp_send_response (GF_RTSPSession *sess, GF_RTSPResponse *rsp)
 
GF_Err gf_rtsp_get_session_ip (GF_RTSPSession *sess, char buffer[GF_MAX_IP_NAME_LEN])
 
GF_Err gf_rtsp_get_remote_address (GF_RTSPSession *sess, char *buffer)
 
GF_Err gf_rtsp_session_write_interleaved (GF_RTSPSession *sess, u32 idx, u8 *pck, u32 pck_size)
 
const char * gf_rtsp_get_session_cookie (GF_RTSPSession *sess)
 
GF_Err gf_rtsp_merge_tunnel (GF_RTSPSession *sess, GF_RTSPSession *post_sess)
 
void gf_rtsp_session_set_netcap_id (GF_RTSPSession *sess, const char *netcap_id)
 
GF_RTPChannel * gf_rtp_new ()
 
GF_RTPChannel * gf_rtp_new_ex (const char *netcap_id)
 
void gf_rtp_del (GF_RTPChannel *ch)
 
GF_Err gf_rtp_setup_transport (GF_RTPChannel *ch, GF_RTSPTransport *trans_info, const char *remote_address)
 
GF_Err gf_rtp_set_ports (GF_RTPChannel *ch, u16 first_port)
 
GF_Err gf_rtp_setup_payload (GF_RTPChannel *ch, u32 PayloadType, u32 ClockRate)
 
void gf_rtp_enable_nat_keepalive (GF_RTPChannel *ch, u32 nat_timeout)
 
GF_Err gf_rtp_initialize (GF_RTPChannel *ch, u32 UDPBufferSize, Bool IsSource, u32 PathMTU, u32 ReorederingSize, u32 MaxReorderDelay, char *local_interface_ip)
 
GF_Err gf_rtp_stop (GF_RTPChannel *ch)
 
GF_Err gf_rtp_set_ssm (GF_RTPChannel *ch, const char **src_ip_inc, u32 nb_src_ip_inc, const char **src_ip_exc, u32 nb_src_ip_exc)
 
GF_Err gf_rtp_set_info_rtp (GF_RTPChannel *ch, u32 seq_num, u32 rtp_time, u32 ssrc)
 
Double gf_rtp_get_current_time (GF_RTPChannel *ch)
 
void gf_rtp_reset_buffers (GF_RTPChannel *ch)
 
void gf_rtp_reset_ssrc (GF_RTPChannel *ch)
 
u32 gf_rtp_read_rtp (GF_RTPChannel *ch, u8 *buffer, u32 buffer_size)
 
u32 gf_rtp_flush_rtp (GF_RTPChannel *ch, u8 *buffer, u32 buffer_size)
 
u32 gf_rtp_read_rtcp (GF_RTPChannel *ch, u8 *buffer, u32 buffer_size)
 
u32 gf_rtp_read_flush (GF_RTPChannel *ch, u8 *buffer, u32 buffer_size)
 
GF_Err gf_rtp_decode_rtp (GF_RTPChannel *ch, u8 *pck, u32 pck_size, GF_RTPHeader *rtp_hdr, u32 *PayloadStart)
 
GF_Err gf_rtp_decode_rtcp (GF_RTPChannel *ch, u8 *pck, u32 pck_size, Bool *has_sr)
 
GF_Err gf_rtp_send_rtcp_report (GF_RTPChannel *ch)
 
void gf_rtp_set_loss_rate (GF_RTPChannel *ch, u32 loss_rate)
 
GF_Err gf_rtp_send_bye (GF_RTPChannel *ch)
 
GF_Err gf_rtp_send_packet (GF_RTPChannel *ch, GF_RTPHeader *rtp_hdr, u8 *pck, u32 pck_size, Bool fast_send)
 
GF_Err gf_rtp_set_interleave_callbacks (GF_RTPChannel *ch, gf_rtp_tcp_callback tcp_callback, void *cbk1, void *cbk2)
 
u32 gf_rtp_is_unicast (GF_RTPChannel *ch)
 
u32 gf_rtp_is_interleaved (GF_RTPChannel *ch)
 
u32 gf_rtp_get_clockrate (GF_RTPChannel *ch)
 
u8 gf_rtp_get_low_interleave_id (GF_RTPChannel *ch)
 
u8 gf_rtp_get_hight_interleave_id (GF_RTPChannel *ch)
 
const GF_RTSPTransportgf_rtp_get_transport (GF_RTPChannel *ch)
 
Float gf_rtp_get_loss (GF_RTPChannel *ch)
 
u32 gf_rtp_get_tcp_bytes_sent (GF_RTPChannel *ch)
 
void gf_rtp_get_ports (GF_RTPChannel *ch, u16 *rtp_port, u16 *rtcp_port)
 
GF_SDPInfogf_sdp_info_new ()
 
void gf_sdp_info_del (GF_SDPInfo *sdp)
 
void gf_sdp_info_reset (GF_SDPInfo *sdp)
 
GF_Err gf_sdp_info_parse (GF_SDPInfo *sdp, char *sdp_text, u32 text_size)
 
GF_SDPMediagf_sdp_media_new ()
 
void gf_sdp_media_del (GF_SDPMedia *media)
 
GF_SDPConnectiongf_sdp_conn_new ()
 
void gf_sdp_conn_del (GF_SDPConnection *conn)
 
GF_SDP_FMTPgf_sdp_fmtp_new ()
 
void gf_sdp_fmtp_del (GF_SDP_FMTP *fmtp)
 
GP_RTPPacketizer * gf_rtp_builder_new (u32 rtp_payt, GF_SLConfig *slc, u32 flags, void *cbk_obj, void(*OnNewPacket)(void *cbk, GF_RTPHeader *header), void(*OnPacketDone)(void *cbk, GF_RTPHeader *header), void(*OnDataReference)(void *cbk, u32 payload_size, u32 offset_from_orig), void(*OnData)(void *cbk, u8 *data, u32 data_size, Bool is_head))
 
void gf_rtp_builder_del (GP_RTPPacketizer *builder)
 
void gf_rtp_builder_init (GP_RTPPacketizer *builder, u8 PayloadType, u32 MaxPayloadSize, u32 max_ptime, u32 StreamType, u32 codecid, u32 PL_ID, u32 avgSize, u32 maxSize, u32 avgTS, u32 maxDTS, u32 IV_length, u32 KI_length, char *pref_mode)
 
void gf_rtp_builder_set_cryp_info (GP_RTPPacketizer *builder, u64 IV, char *key_indicator, Bool is_encrypted)
 
GF_Err gf_rtp_builder_process (GP_RTPPacketizer *builder, u8 *data, u32 data_size, u8 IsAUEnd, u32 FullAUSize, u32 duration, u8 descIndex)
 
GF_Err gf_rtp_builder_format_sdp (GP_RTPPacketizer *builder, char *payload_name, char **out_sdp_line, char *dsi, u32 dsi_size)
 
Bool gf_rtp_builder_get_payload_name (GP_RTPPacketizer *builder, char payload_name[20], char media_name[20])
 
GF_RTPDepacketizer * gf_rtp_depacketizer_new (GF_SDPMedia *media, u32 hdr_payt, gf_rtp_packet_cbk sl_packet_cbk, void *udta)
 
void gf_rtp_depacketizer_del (GF_RTPDepacketizer *rtpd)
 
void gf_rtp_depacketizer_reset (GF_RTPDepacketizer *rtpd, Bool full_reset)
 
void gf_rtp_depacketizer_process (GF_RTPDepacketizer *rtpd, GF_RTPHeader *hdr, u8 *payload, u32 size)
 

Detailed Description

>