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

Data Structures

struct  GF_SockOutClient
 
struct  GF_SockOutCtx
 

Macros

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

Functions

static GF_Err sockout_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err sockout_initialize (GF_Filter *filter)
 
static void sockout_finalize (GF_Filter *filter)
 
static GF_Err sockout_send_packet (GF_SockOutCtx *ctx, GF_FilterPacket *pck, GF_Socket *dst_sock)
 
static GF_Err sockout_process (GF_Filter *filter)
 
static GF_FilterProbeScore sockout_probe_url (const char *url, const char *mime)
 
const GF_FilterRegister * sockout_register (GF_FilterSession *session)
 

Variables

static const GF_FilterArgs SockOutArgs []
 
static const GF_FilterCapability SockOutCaps []
 
GF_FilterRegister SockOutRegister
 

Data Structure Documentation

◆ GF_SockOutClient

struct GF_SockOutClient
Data Fields
GF_Socket * socket
Bool is_tuned
char address[GF_MAX_IP_NAME_LEN]
Bool pck_pending

◆ GF_SockOutCtx

struct GF_SockOutCtx
+ Collaboration diagram for GF_SockOutCtx:
Data Fields
Double start
Double speed
char * dst
char * mime
char * ext
char * ifce
Bool listen
u32 maxc
u32 port
u32 sockbuf
u32 ka
u32 kp
u32 rate
u32 ttl
GF_Fraction pckr
GF_Fraction pckd
GF_Socket * socket
GF_FilterPid * pid
GF_List * clients
Bool pid_started
Bool had_clients
Bool pck_pending
GF_FilterCapability in_caps[2]
char szExt[10]
char szFileName[GF_MAX_PATH]
u32 nb_pck_processed
u64 start_time
u64 nb_bytes_sent
GF_FilterPacket * rev_pck
u32 next_pckd_idx
u32 next_pckr_idx
u32 nb_pckd_wnd
u32 nb_pckr_wnd

Macro Definition Documentation

◆ OFFS

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

Function Documentation

◆ sockout_configure_pid()

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

◆ sockout_initialize()

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

◆ sockout_finalize()

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

◆ sockout_send_packet()

static GF_Err sockout_send_packet ( GF_SockOutCtx ctx,
GF_FilterPacket *  pck,
GF_Socket *  dst_sock 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sockout_process()

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

◆ sockout_probe_url()

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

◆ sockout_register()

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

Variable Documentation

◆ SockOutArgs

const GF_FilterArgs SockOutArgs[]
static
Initial value:
=
{
{ OFFS(dst), "URL of destination", GF_PROP_NAME, NULL, NULL, 0},
{ OFFS(sockbuf), "block size used to read file", GF_PROP_UINT, "65536", 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(ext), "file extension of pipe data", GF_PROP_STRING, NULL, NULL, 0},
{ OFFS(mime), "mime type of pipe data", GF_PROP_STRING, NULL, NULL, 0},
{ OFFS(listen), "indicate the output socket works in server mode", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(maxc), "max number of concurrent connections", GF_PROP_UINT, "+I", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(ka), "keep socket alive if no more connections", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(kp), "keep packets in queue if no more clients", GF_PROP_BOOL, "true", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(start), "set playback start offset. A negative value means percent of media duration with -1 equal to duration", GF_PROP_DOUBLE, "0.0", NULL, 0},
{ OFFS(speed), "set playback speed. If negative and start is 0, start is set to -1", GF_PROP_DOUBLE, "1.0", NULL, 0},
{ OFFS(rate), "set send rate in bps, disabled by default (as fast as possible)", GF_PROP_UINT, "0", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(pckr), "reverse packet every N", GF_PROP_FRACTION, "0/0", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(pckd), "drop packet every N", GF_PROP_FRACTION, "0/0", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(ttl), "multicast TTL", GF_PROP_UINT, "0", "0-127", 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_DOUBLE
Definition: filters.h:866
@ GF_PROP_NAME
Definition: filters.h:884
@ GF_PROP_UINT
Definition: filters.h:852
@ GF_PROP_FRACTION
Definition: filters.h:860
#define OFFS(_n)
Definition: out_sock.c:547

◆ SockOutCaps

const GF_FilterCapability SockOutCaps[]
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
@ GF_PROP_PID_MIME
Definition: filters.h:1189

◆ SockOutRegister

GF_FilterRegister SockOutRegister