libgpac
Documentation of the core library of GPAC
rtp_streamer.c File Reference
#include <gpac/rtp_streamer.h>
#include <gpac/constants.h>
#include <gpac/base_coding.h>
#include <gpac/avparse.h>
#include <gpac/internal/ietf_dev.h>
#include <gpac/isomedia.h>
+ Include dependency graph for rtp_streamer.c:

Data Structures

struct  GF_RTPStreamer
 

Macros

#define RTCP_BUF_SIZE   10000
 
#define RTCFG_SET(_t)   cfg._t = _t
 

Functions

static void rtp_stream_on_new_packet (void *cbk, GF_RTPHeader *header)
 
static void rtp_stream_on_packet_done (void *cbk, GF_RTPHeader *header)
 
static void rtp_stream_on_data (void *cbk, u8 *data, u32 data_size, Bool is_head)
 
GF_Err gf_rtp_streamer_init_rtsp (GF_RTPStreamer *rtp, u32 path_mtu, GF_RTSPTransport *tr, const char *ifce_addr)
 
static GF_Err rtp_stream_init_channel (GF_RTPStreamer *rtp, u32 path_mtu, const char *dest, int port, int ttl, const char *ifce_addr, const char *netcap_id)
 
GF_EXPORT GF_RTPStreamer * gf_rtp_streamer_new_ex (const GF_RTPStreamerConfig *cfg, Bool for_rtsp)
 RTP Streamer constructor with extended parameters. More...
 
GF_EXPORT GF_RTPStreamer * gf_rtp_streamer_new (u32 streamType, u32 codecid, u32 timeScale, const char *ip_dest, u16 port, u32 MTU, u8 TTL, const char *ifce_addr, u32 flags, const u8 *dsi, u32 dsi_len, u32 PayloadType, u32 sample_rate, u32 nb_ch, Bool is_crypted, u32 IV_length, u32 KI_length, u32 MinSize, u32 MaxSize, u32 avgTS, u32 maxDTSDelta, u32 const_dur, u32 bandwidth, u32 max_ptime, u32 au_sn_len, Bool for_rtsp)
 RTP Streamer constructor with extended parameters. More...
 
GF_EXPORT void gf_rtp_streamer_del (GF_RTPStreamer *streamer)
 RTP file streamer destructor. More...
 
void gf_media_format_ttxt_sdp (GP_RTPPacketizer *builder, char *payload_name, char **out_sdp_line, u32 w, u32 h, s32 tx, s32 ty, s16 l, u32 max_w, u32 max_h, char *tx3g_base64)
 
GF_EXPORT GF_Err gf_rtp_streamer_append_sdp_extended (GF_RTPStreamer *rtp, u16 ESID, const u8 *dsi, u32 dsi_len, const u8 *dsi_enh, u32 dsi_enh_len, char *KMS_URI, u32 width, u32 height, u32 tw, u32 th, s32 tx, s32 ty, s16 tl, u32 nb_channels, Bool for_rtsp, char **out_sdp_buffer)
 gets the SDP file More...
 
GF_EXPORT char * gf_rtp_streamer_format_sdp_header (char *app_name, char *ip_dest, char *session_name, char *iod64)
 
GF_EXPORT GF_Err gf_rtp_streamer_append_sdp (GF_RTPStreamer *rtp, u16 ESID, const u8 *dsi, u32 dsi_len, char *KMS_URI, char **out_sdp_buffer)
 gets the SDP file More...
 
GF_EXPORT GF_Err gf_rtp_streamer_send_data (GF_RTPStreamer *rtp, u8 *data, u32 size, u32 fullsize, u64 cts, u64 dts, Bool is_rap, Bool au_start, Bool au_end, u32 au_sn, u32 sampleDuration, u32 sampleDescIndex)
 
GF_EXPORT GF_Err gf_rtp_streamer_send_au (GF_RTPStreamer *rtp, u8 *data, u32 size, u64 cts, u64 dts, Bool is_rap)
 
GF_EXPORT GF_Err gf_rtp_streamer_send_au_with_sn (GF_RTPStreamer *rtp, u8 *data, u32 size, u64 cts, u64 dts, Bool is_rap, u32 inc_au_sn)
 
GF_EXPORT void gf_rtp_streamer_disable_auto_rtcp (GF_RTPStreamer *streamer)
 
GF_EXPORT GF_Err gf_rtp_streamer_send_rtcp (GF_RTPStreamer *streamer, Bool force_ts, u32 rtp_ts, u32 force_ntp_type, u32 ntp_sec, u32 ntp_frac)
 
GF_EXPORT GF_Err gf_rtp_streamer_send_bye (GF_RTPStreamer *streamer)
 
GF_EXPORT u8 gf_rtp_streamer_get_payload_type (GF_RTPStreamer *streamer)
 
GF_EXPORT u16 gf_rtp_streamer_get_next_rtp_sn (GF_RTPStreamer *streamer)
 
GF_EXPORT GF_Err gf_rtp_streamer_set_interleave_callbacks (GF_RTPStreamer *streamer, gf_rtp_tcp_callback RTP_TCPCallback, void *cbk1, void *cbk2)
 
GF_EXPORT GF_Err gf_rtp_streamer_read_rtcp (GF_RTPStreamer *streamer, gf_rtcp_rr_callback rtcp_cbk, void *udta)
 
GF_EXPORT u32 gf_rtp_streamer_get_ssrc (GF_RTPStreamer *streamer)
 
GF_EXPORT u32 gf_rtp_streamer_get_timescale (GF_RTPStreamer *streamer)
 
GF_EXPORT u32 gf_rtp_streamer_get_codecid (GF_RTPStreamer *streamer)
 

Data Structure Documentation

◆ __rtp_streamer

struct __rtp_streamer

RTP streamer object

Data Fields
GP_RTPPacketizer * packetizer
GF_RTPChannel * channel
char * buffer
u32 payload_len
u32 buffer_alloc
u32 in_timescale
char rtcp_buf[RTCP_BUF_SIZE]
const char * netcap_id
GF_Err last_err

Macro Definition Documentation

◆ RTCP_BUF_SIZE

#define RTCP_BUF_SIZE   10000

◆ RTCFG_SET

#define RTCFG_SET (   _t)    cfg._t = _t

Function Documentation

◆ rtp_stream_on_new_packet()

static void rtp_stream_on_new_packet ( void *  cbk,
GF_RTPHeader header 
)
static
+ Here is the caller graph for this function:

◆ rtp_stream_on_packet_done()

static void rtp_stream_on_packet_done ( void *  cbk,
GF_RTPHeader header 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtp_stream_on_data()

static void rtp_stream_on_data ( void *  cbk,
u8 data,
u32  data_size,
Bool  is_head 
)
static
+ Here is the caller graph for this function:

◆ rtp_stream_init_channel()

static GF_Err rtp_stream_init_channel ( GF_RTPStreamer *  rtp,
u32  path_mtu,
const char *  dest,
int  port,
int  ttl,
const char *  ifce_addr,
const char *  netcap_id 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_media_format_ttxt_sdp()

void gf_media_format_ttxt_sdp ( GP_RTPPacketizer *  builder,
char *  payload_name,
char **  out_sdp_line,
u32  w,
u32  h,
s32  tx,
s32  ty,
s16  l,
u32  max_w,
u32  max_h,
char *  tx3g_base64 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_rtp_streamer_set_interleave_callbacks()

GF_EXPORT GF_Err gf_rtp_streamer_set_interleave_callbacks ( GF_RTPStreamer *  streamer,
gf_rtp_tcp_callback  RTP_TCPCallback,
void *  cbk1,
void *  cbk2 
)
+ Here is the call graph for this function: