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

Data Structures

struct  GF_PipeInCtx
 

Macros

#define PIPE_FLUSH_MARKER   "GPACPIF"
 
#define PIPE_RECFG_MARKER   "GPACPIR"
 
#define PIPE_CLOSE_MARKER   "GPACPIC"
 
#define OFFS(_n)   #_n, offsetof(GF_PipeInCtx, _n)
 

Functions

static Bool pipein_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
static GF_Err pipein_initialize (GF_Filter *filter)
 
static void pipein_finalize (GF_Filter *filter)
 
static GF_FilterProbeScore pipein_probe_url (const char *url, const char *mime_type)
 
static void pipein_pck_destructor (GF_Filter *filter, GF_FilterPid *pid, GF_FilterPacket *pck)
 
static GF_Err pipein_process (GF_Filter *filter)
 
const GF_FilterRegister * pin_register (GF_FilterSession *session)
 

Variables

static const GF_FilterArgs PipeInArgs []
 
static const GF_FilterCapability PipeInCaps []
 
GF_FilterRegister PipeInRegister
 

Data Structure Documentation

◆ GF_PipeInCtx

struct GF_PipeInCtx
Data Fields
char * src
char * ext
char * mime
u32 block_size
u32 bpcnt
u32 timeout
Bool blk
Bool ka
Bool mkp
Bool sigflush
Bool marker
u32 read_block_size
GF_FilterPid * pid
int fd
u64 bytes_read
Bool is_end
Bool pck_out
Bool is_first
Bool owns_pipe
Bool do_reconfigure
char * buffer
Bool is_stdin
u32 left_over
u32 copy_offset
u8 store_char
Bool has_recfg
u32 last_active_ms

Macro Definition Documentation

◆ PIPE_FLUSH_MARKER

#define PIPE_FLUSH_MARKER   "GPACPIF"

◆ PIPE_RECFG_MARKER

#define PIPE_RECFG_MARKER   "GPACPIR"

◆ PIPE_CLOSE_MARKER

#define PIPE_CLOSE_MARKER   "GPACPIC"

◆ OFFS

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

Function Documentation

◆ pipein_process_event()

static Bool pipein_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:

◆ pipein_initialize()

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

◆ pipein_finalize()

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

◆ pipein_probe_url()

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

◆ pipein_pck_destructor()

static void pipein_pck_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:

◆ pipein_process()

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

◆ pin_register()

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

Variable Documentation

◆ PipeInArgs

const GF_FilterArgs PipeInArgs[]
static
Initial value:
=
{
{ OFFS(src), "name of source pipe", GF_PROP_NAME, NULL, NULL, 0},
{ OFFS(block_size), "buffer size used to read pipe", GF_PROP_UINT, "5000", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(ext), "indicate file extension of pipe data", GF_PROP_STRING, NULL, NULL, 0},
{ OFFS(mime), "indicate mime type of pipe data", GF_PROP_STRING, NULL, NULL, 0},
{ OFFS(blk), "open pipe in block mode", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(ka), "keep-alive pipe when end of input is detected", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(mkp), "create pipe if not found", GF_PROP_BOOL, "false", NULL, 0},
{ OFFS(sigflush), "signal end of stream upon pipe close - cf filter help", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(marker), "inspect payload for flush and reconfigure signals - cf filter help", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(bpcnt), "number of broken pipe allowed before exiting, 0 means forever", GF_PROP_UINT, "0", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(timeout), "timeout in ms before considering input is in end of stream (0: no timeout)", GF_PROP_UINT, "0", NULL, GF_FS_ARG_HINT_ADVANCED},
{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_NAME
Definition: filters.h:884
@ GF_PROP_UINT
Definition: filters.h:852
#define OFFS(_n)
Definition: in_pipe.c:645

◆ PipeInCaps

const GF_FilterCapability PipeInCaps[]
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

◆ PipeInRegister

GF_FilterRegister PipeInRegister