libgpac
Documentation of the core library of GPAC
out_route.c File Reference
#include <gpac/filters.h>
#include <gpac/constants.h>
#include <gpac/xml.h>
#include <gpac/route.h>
#include <gpac/network.h>
#include <gpac/base_coding.h>
+ Include dependency graph for out_route.c:

Data Structures

struct  GF_ROUTEOutCtx
 
struct  ROUTELCT
 
struct  ROUTEService
 
struct  ROUTEPid
 

Macros

#define MULTIPART_BOUNDARY   "_GPAC_BOUNDARY_ROUTE_.67706163_"
 
#define ROUTE_INIT_TOI   0xFFFFFFFF
 
#define ERRSIM_ACCURACY   100
 
#define PUT_U32(_val)
 
#define PUT_U16(_val)
 
#define GF_TAI_UTC_OFFSET   37
 
#define OFFS(_n)   #_n, offsetof(GF_ROUTEOutCtx, _n)
 

Enumerations

enum  { DVB_CSUM_NO =0 , DVB_CSUM_META , DVB_CSUM_ALL }
 
enum  { LCT_SPLIT_NONE =0 , LCT_SPLIT_TYPE , LCT_SPLIT_ALL , LCT_SPLIT_MCAST }
 

Functions

ROUTELCTroute_create_lct_channel (GF_Filter *filter, GF_ROUTEOutCtx *ctx, const char *ip, u32 port, GF_Err *e)
 
ROUTEServicerouteout_create_service (GF_Filter *filter, GF_ROUTEOutCtx *ctx, u32 service_id, const char *service_name, const char *ip, u32 port, GF_Err *e)
 
void routeout_remove_pid (ROUTEPid *rpid, Bool is_rem)
 
void routeout_delete_service (ROUTEService *serv)
 
static GF_Err routeout_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err routeout_initialize (GF_Filter *filter)
 
static void routeout_finalize (GF_Filter *filter)
 
char * routeout_strip_base (ROUTEService *serv, char *url)
 
static GF_Err routeout_update_stsid_bundle (GF_ROUTEOutCtx *ctx, ROUTEService *serv, Bool manifest_updated)
 
static GF_Err routeout_update_dvb_mabr_fdt (GF_ROUTEOutCtx *ctx, ROUTEService *serv, Bool manifest_updated)
 
static GF_Err routeout_check_service_updates (GF_ROUTEOutCtx *ctx, ROUTEService *serv)
 
static void inject_fdt_file_desc (GF_ROUTEOutCtx *ctx, char **payload, ROUTEService *serv, char *url, char *mime, const u8 *data, u32 size, u32 TOI, Bool use_full_url)
 
static void routeout_send_mabr_manifest (GF_ROUTEOutCtx *ctx)
 
static void update_error_simulation_state (GF_ROUTEOutCtx *ctx)
 
u32 routeout_lct_send (GF_ROUTEOutCtx *ctx, GF_Socket *sock, u32 tsi, u32 toi, u32 codepoint, u8 *payload, u32 len, u32 offset, ROUTEService *serv, u32 total_size, u32 offset_in_frame, u32 fdt_instance_id, Bool is_flute, Bool can_set_close)
 
static void routeout_send_file (GF_ROUTEOutCtx *ctx, ROUTEService *serv, GF_Socket *sock, u32 tsi, u32 toi, u8 *payload, u32 size, u32 codepoint, u32 fdt_instance_id, Bool is_flute)
 
static GF_Err routeout_service_send_stsid_bundle (GF_ROUTEOutCtx *ctx, ROUTEService *serv)
 
static GF_Err routeout_fetch_packet (GF_ROUTEOutCtx *ctx, ROUTEPid *rpid)
 
void inject_mani_init_hls_variant_fdt (GF_ROUTEOutCtx *ctx, ROUTEService *serv, ROUTEPid *rpid, char **payload)
 
void routeout_send_fdt (GF_ROUTEOutCtx *ctx, ROUTEService *serv, ROUTEPid *rpid)
 
static GF_Err routeout_process_service (GF_ROUTEOutCtx *ctx, ROUTEService *serv)
 
static void routeout_send_lls (GF_ROUTEOutCtx *ctx)
 
static char * mabr_get_carousel_info (GF_ROUTEOutCtx *ctx, ROUTEService *serv, Bool inject_names, u32 *out_tot_rate)
 
static void routeout_update_mabr_manifest (GF_ROUTEOutCtx *ctx)
 
static GF_Err routeout_process (GF_Filter *filter)
 
static GF_FilterProbeScore routeout_probe_url (const char *url, const char *mime)
 
static Bool routeout_use_alias (GF_Filter *filter, const char *url, const char *mime)
 
const GF_FilterRegister * routeout_register (GF_FilterSession *session)
 

Variables

static const GF_FilterArgs ROUTEOutArgs []
 
static const GF_FilterCapability ROUTEOutCaps []
 
GF_FilterRegister ROUTEOutRegister
 

Data Structure Documentation

◆ GF_ROUTEOutCtx

struct GF_ROUTEOutCtx
+ Collaboration diagram for GF_ROUTEOutCtx:
Data Fields
char * dst
char * ext
char * mime
char * ifce
char * ip
u32 carousel
u32 first_port
u32 bsid
u32 mtu
u32 splitlct
u32 ttl
u32 brinc
u32 runfor
Bool korean
Bool llmode
Bool noreg
Bool nozip
Bool furl
Bool flute
Bool use_inband
Bool ssm
u32 csum
u32 recv_obj_timeout
GF_FilterCapability in_caps[2]
char szExt[10]
GF_List * services
Bool done
u64 clock_init
u64 clock
u8 * lct_buffer
GF_BitStream * lct_bs
u64 reschedule_us
u32 next_raw_file_toi
u64 clock_stats
Bool reporting_on
u64 total_size
u64 total_bytes
Bool total_size_unknown
u32 nb_resources
u64 bytes_sent
char * ifce_ip
const char * log_name
GF_Socket * sock_atsc_lls
u64 last_lls_clock
u8 * lls_time_table
u32 lls_time_table_len
u8 * lls_slt_table
u32 lls_slt_table_len
Bool dvb_mabr
u32 flute_msize
GF_Socket * sock_dvb_mabr
u16 dvb_mabr_port
u32 dvb_mabr_tsi
u64 last_dvb_mabr_clock
u8 * dvb_mabr_config
u32 dvb_mabr_config_len
u32 dvb_mabr_config_toi
u8 * dvb_mabr_fdt
u32 dvb_mabr_fdt_len
u32 dvb_mabr_fdt_instance_id
u32 next_toi_avail
Bool check_pending
u32 check_init_clock
Bool state_is_error
GF_PropVec2 errsim

◆ ROUTELCT

struct ROUTELCT
Data Fields
char * ip
u32 port
GF_Socket * sock

◆ ROUTEService

struct ROUTEService
+ Collaboration diagram for ROUTEService:
Data Fields
u32 service_id
GF_List * pids
u32 dash_mode
GF_List * rlcts
ROUTELCT * rlct_base
u32 next_port
Bool is_done
Bool wait_for_inputs
Bool needs_reconfig
Bool service_ready
u32 creation_time
char * log_name
u32 manifest_type
char * manifest
char * manifest_name
char * manifest_mime
char * manifest_server
char * manifest_url
u32 manifest_version
u32 manifest_crc
u32 manifest_toi
u32 manifest_server_port
char * manifest_alt
char * manifest_alt_name
char * manifest_alt_mime
char * manifest_alt_server
char * manifest_alt_url
u32 manifest_alt_version
u32 manifest_alt_crc
u32 manifest_alt_toi
u32 manifest_alt_server_port
u32 stsid_version
u8 * stsid_bundle
u32 stsid_bundle_size
u32 stsid_bundle_toi
u64 last_stsid_clock
char * service_name
Bool use_flute

◆ ROUTEPid

struct ROUTEPid
+ Collaboration diagram for ROUTEPid:
Data Fields
GF_FilterPid * pid
ROUTEService * route
ROUTELCT * rlct
u32 tsi
u32 bandwidth
u32 stream_type
GF_Fraction dash_dur
u32 manifest_type
char * template
Bool raw_file
Bool use_basename
Bool no_init_seg
Bool init_seg_sent
u8 * init_seg_data
u32 init_seg_size
u32 init_seg_crc
char * init_seg_name
char * hld_child_pl
char * hld_child_pl_name
u32 hld_child_pl_version
u32 hld_child_pl_crc
u64 hls_ref_id
Bool update_hls_child_pl
u32 fmtp
GF_FilterPacket * current_pck
u32 current_toi
const u8 * pck_data
u32 pck_size
u32 pck_offset
char * seg_name
u64 res_size
u64 offset_at_seg_start
u32 full_frame_size
u32 cumulated_frag_size
u32 frag_offset
u32 frag_idx
Bool push_init
Bool force_send_empty
u64 clock_at_frame_start
u64 cts_us_at_frame_start
u64 cts_at_frame_start
u32 pck_dur_at_frame_start
u32 timescale
u64 clock_at_first_pck
u64 cts_first_pck
u64 current_cts_us
u64 current_dur_us
u64 carousel_time_us
u64 clock_at_pck
u32 bitrate
u64 last_init_push
Bool use_time_tpl
u32 init_toi
u32 hls_child_toi
Bool push_frag_name
Bool init_cfg_done
u32 fdt_instance_id
s32 diff_send_at_frame_start
s32 diff_recv_at_frame_start

Macro Definition Documentation

◆ MULTIPART_BOUNDARY

#define MULTIPART_BOUNDARY   "_GPAC_BOUNDARY_ROUTE_.67706163_"

◆ ROUTE_INIT_TOI

#define ROUTE_INIT_TOI   0xFFFFFFFF

◆ ERRSIM_ACCURACY

#define ERRSIM_ACCURACY   100

◆ PUT_U32

#define PUT_U32 (   _val)
Value:
ctx->lct_buffer[hpos] = (_val>>24 & 0xFF);\
ctx->lct_buffer[hpos+1] = (_val>>16 & 0xFF);\
ctx->lct_buffer[hpos+2] = (_val>>8 & 0xFF);\
ctx->lct_buffer[hpos+3] = (_val & 0xFF); \
hpos+=4;

◆ PUT_U16

#define PUT_U16 (   _val)
Value:
ctx->lct_buffer[hpos] = (_val>>8 & 0xFF);\
ctx->lct_buffer[hpos+1] = (_val & 0xFF);\
hpos+=2;

◆ GF_TAI_UTC_OFFSET

#define GF_TAI_UTC_OFFSET   37

◆ OFFS

#define OFFS (   _n)    #_n, offsetof(GF_ROUTEOutCtx, _n)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DVB_CSUM_NO 
DVB_CSUM_META 
DVB_CSUM_ALL 

◆ anonymous enum

anonymous enum
Enumerator
LCT_SPLIT_NONE 
LCT_SPLIT_TYPE 
LCT_SPLIT_ALL 
LCT_SPLIT_MCAST 

Function Documentation

◆ route_create_lct_channel()

ROUTELCT* route_create_lct_channel ( GF_Filter *  filter,
GF_ROUTEOutCtx ctx,
const char *  ip,
u32  port,
GF_Err e 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_create_service()

ROUTEService* routeout_create_service ( GF_Filter *  filter,
GF_ROUTEOutCtx ctx,
u32  service_id,
const char *  service_name,
const char *  ip,
u32  port,
GF_Err e 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_remove_pid()

void routeout_remove_pid ( ROUTEPid rpid,
Bool  is_rem 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_delete_service()

void routeout_delete_service ( ROUTEService serv)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_configure_pid()

static GF_Err routeout_configure_pid ( GF_Filter *  filter,
GF_FilterPid *  pid,
Bool  is_remove 
)
static
+ Here is the call graph for this function:

◆ routeout_initialize()

static GF_Err routeout_initialize ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ routeout_finalize()

static void routeout_finalize ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ routeout_strip_base()

char* routeout_strip_base ( ROUTEService serv,
char *  url 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_update_stsid_bundle()

static GF_Err routeout_update_stsid_bundle ( GF_ROUTEOutCtx ctx,
ROUTEService serv,
Bool  manifest_updated 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_update_dvb_mabr_fdt()

static GF_Err routeout_update_dvb_mabr_fdt ( GF_ROUTEOutCtx ctx,
ROUTEService serv,
Bool  manifest_updated 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_check_service_updates()

static GF_Err routeout_check_service_updates ( GF_ROUTEOutCtx ctx,
ROUTEService serv 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inject_fdt_file_desc()

static void inject_fdt_file_desc ( GF_ROUTEOutCtx ctx,
char **  payload,
ROUTEService serv,
char *  url,
char *  mime,
const u8 data,
u32  size,
u32  TOI,
Bool  use_full_url 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_send_mabr_manifest()

static void routeout_send_mabr_manifest ( GF_ROUTEOutCtx ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update_error_simulation_state()

static void update_error_simulation_state ( GF_ROUTEOutCtx ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_lct_send()

u32 routeout_lct_send ( GF_ROUTEOutCtx ctx,
GF_Socket *  sock,
u32  tsi,
u32  toi,
u32  codepoint,
u8 payload,
u32  len,
u32  offset,
ROUTEService serv,
u32  total_size,
u32  offset_in_frame,
u32  fdt_instance_id,
Bool  is_flute,
Bool  can_set_close 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_send_file()

static void routeout_send_file ( GF_ROUTEOutCtx ctx,
ROUTEService serv,
GF_Socket *  sock,
u32  tsi,
u32  toi,
u8 payload,
u32  size,
u32  codepoint,
u32  fdt_instance_id,
Bool  is_flute 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_service_send_stsid_bundle()

static GF_Err routeout_service_send_stsid_bundle ( GF_ROUTEOutCtx ctx,
ROUTEService serv 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_fetch_packet()

static GF_Err routeout_fetch_packet ( GF_ROUTEOutCtx ctx,
ROUTEPid rpid 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inject_mani_init_hls_variant_fdt()

void inject_mani_init_hls_variant_fdt ( GF_ROUTEOutCtx ctx,
ROUTEService serv,
ROUTEPid rpid,
char **  payload 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_send_fdt()

void routeout_send_fdt ( GF_ROUTEOutCtx ctx,
ROUTEService serv,
ROUTEPid rpid 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_process_service()

static GF_Err routeout_process_service ( GF_ROUTEOutCtx ctx,
ROUTEService serv 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_send_lls()

static void routeout_send_lls ( GF_ROUTEOutCtx ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mabr_get_carousel_info()

static char* mabr_get_carousel_info ( GF_ROUTEOutCtx ctx,
ROUTEService serv,
Bool  inject_names,
u32 out_tot_rate 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_update_mabr_manifest()

static void routeout_update_mabr_manifest ( GF_ROUTEOutCtx ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routeout_process()

static GF_Err routeout_process ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ routeout_probe_url()

static GF_FilterProbeScore routeout_probe_url ( const char *  url,
const char *  mime 
)
static

◆ routeout_use_alias()

static Bool routeout_use_alias ( GF_Filter *  filter,
const char *  url,
const char *  mime 
)
static
+ Here is the call graph for this function:

◆ routeout_register()

const GF_FilterRegister* routeout_register ( GF_FilterSession *  session)
+ Here is the call graph for this function:

Variable Documentation

◆ ROUTEOutArgs

const GF_FilterArgs ROUTEOutArgs[]
static

◆ ROUTEOutCaps

const GF_FilterCapability ROUTEOutCaps[]
static
Initial value:
=
{
}
@ GF_STREAM_FILE
Definition: constants.h:104
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define CAP_STRING(_f, _a, _b)
Definition: filters.h:2194
#define GF_CAPS_INPUT
Definition: filters.h:2220
@ GF_PROP_PID_STREAM_TYPE
Definition: filters.h:1112
@ GF_PROP_PID_FILE_EXT
Definition: filters.h:1190

◆ ROUTEOutRegister

GF_FilterRegister ROUTEOutRegister