libgpac
Documentation of the core library of GPAC
in_sock.c File Reference
#include <gpac/filters.h>
#include <gpac/constants.h>
#include <gpac/network.h>
#include <gpac/internal/ietf_dev.h>
+ Include dependency graph for in_sock.c:

Data Structures

struct  GF_SockInClient
 
struct  GF_SockInCtx
 

Macros

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

Functions

static GF_Err sockin_initialize (GF_Filter *filter)
 
static void sockin_client_reset (GF_SockInClient *sc)
 
static void sockin_finalize (GF_Filter *filter)
 
static GF_FilterProbeScore sockin_probe_url (const char *url, const char *mime_type)
 
static void sockin_rtp_destructor (GF_Filter *filter, GF_FilterPid *pid, GF_FilterPacket *pck)
 
static Bool sockin_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
static GF_Err sockin_read_client (GF_Filter *filter, GF_SockInCtx *ctx, GF_SockInClient *sock_c)
 
static GF_Err sockin_check_eos (GF_Filter *filter, GF_SockInCtx *ctx)
 
static GF_Err sockin_process (GF_Filter *filter)
 
const GF_FilterRegister * sockin_register (GF_FilterSession *session)
 

Variables

static const GF_FilterArgs SockInArgs []
 
static const GF_FilterCapability SockInCaps []
 
GF_FilterRegister SockInRegister
 

Data Structure Documentation

◆ GF_SockInClient

struct GF_SockInClient
+ Collaboration diagram for GF_SockInClient:
Data Fields
GF_FilterPid * pid
GF_Socket * socket
Bool pck_out
GF_RTPReorder * rtp_reorder
char address[GF_MAX_IP_NAME_LEN]
u32 init_time
Bool done
Bool first_pck
u64 nb_bytes
u64 start_time
u64 last_stats_time

◆ GF_SockInCtx

struct GF_SockInCtx
+ Collaboration diagram for GF_SockInCtx:
Data Fields
const char * src
u32 block_size
u32 port
u32 maxc
char * ifce
const char * ext
const char * mime
Bool tsprobe
Bool listen
Bool ka
Bool block
u32 timeout
u32 reorder_pck
u32 reorder_delay
GF_PropStringList ssm
GF_PropStringList ssmx
GF_SockInClient sock_c
GF_List * clients
Bool had_clients
Bool is_udp
Bool is_stop
char * buffer
GF_SockGroup * active_sockets
u32 last_rcv_time
u32 last_timeout_sec

Macro Definition Documentation

◆ OFFS

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

Function Documentation

◆ sockin_initialize()

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

◆ sockin_client_reset()

static void sockin_client_reset ( GF_SockInClient sc)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sockin_finalize()

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

◆ sockin_probe_url()

static GF_FilterProbeScore sockin_probe_url ( const char *  url,
const char *  mime_type 
)
static

◆ sockin_rtp_destructor()

static void sockin_rtp_destructor ( GF_Filter *  filter,
GF_FilterPid *  pid,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sockin_process_event()

static Bool sockin_process_event ( GF_Filter *  filter,
const GF_FilterEvent *  evt 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sockin_read_client()

static GF_Err sockin_read_client ( GF_Filter *  filter,
GF_SockInCtx ctx,
GF_SockInClient sock_c 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sockin_check_eos()

static GF_Err sockin_check_eos ( GF_Filter *  filter,
GF_SockInCtx ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sockin_process()

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

◆ sockin_register()

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

Variable Documentation

◆ SockInArgs

const GF_FilterArgs SockInArgs[]
static
Initial value:
=
{
{ OFFS(src), "address of source content", GF_PROP_NAME, NULL, NULL, 0},
{ OFFS(block_size), "block size used to read socket", GF_PROP_UINT, "0x60000", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(port), "default port if not specified", GF_PROP_UINT, "1234", NULL, 0},
{ OFFS(ifce), "default multicast interface", GF_PROP_NAME, NULL, NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(listen), "indicate the input socket works in server mode", GF_PROP_BOOL, "false", NULL, 0},
{ OFFS(ka), "keep socket alive if no more connections", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(maxc), "max number of concurrent connections", GF_PROP_UINT, "+I", NULL, 0},
{ OFFS(tsprobe), "probe for MPEG-2 TS data, either RTP or raw UDP. Disabled if mime or ext are given and do not match MPEG-2 TS mimes/extensions", GF_PROP_BOOL, "true", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(ext), "indicate file extension of udp data", GF_PROP_STRING, NULL, NULL, 0},
{ OFFS(mime), "indicate mime type of udp data", GF_PROP_STRING, NULL, NULL, 0},
{ OFFS(block), "set blocking mode for socket(s)", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(timeout), "set timeout in ms for UDP socket(s), 0 to disable timeout", GF_PROP_UINT, "10000", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(reorder_pck), "number of packets delay for RTP reordering (M2TS over RTP) ", GF_PROP_UINT, "100", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(reorder_delay), "number of ms delay for RTP reordering (M2TS over RTP)", GF_PROP_UINT, "10", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(ssm), "list of IP to include for source-specific multicast", GF_PROP_STRING_LIST, NULL, NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(ssmx), "list of IP to exclude for source-specific multicast", GF_PROP_STRING_LIST, NULL, NULL, GF_FS_ARG_HINT_EXPERT},
{0}
}
@ GF_FS_ARG_HINT_EXPERT
Definition: filters.h:2104
@ GF_FS_ARG_HINT_ADVANCED
Definition: filters.h:2102
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_STRING
Definition: filters.h:876
@ GF_PROP_STRING_LIST
Definition: filters.h:895
@ GF_PROP_NAME
Definition: filters.h:884
@ GF_PROP_UINT
Definition: filters.h:852
#define OFFS(_n)
Definition: in_sock.c:599

◆ SockInCaps

const GF_FilterCapability SockInCaps[]
static
Initial value:
=
{
}
@ GF_STREAM_FILE
Definition: constants.h:104
#define GF_CAPS_OUTPUT
Definition: filters.h:2232
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
@ GF_PROP_PID_STREAM_TYPE
Definition: filters.h:1112

◆ SockInRegister

GF_FilterRegister SockInRegister