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

Data Structures

struct  GF_FileOutCtx
 

Macros

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

Enumerations

enum  { FOUT_CAT_NONE = 0 , FOUT_CAT_AUTO , FOUT_CAT_ALL }
 
enum  { FOUT_OW_YES = 0 , FOUT_OW_NO , FOUT_OW_ASK }
 

Functions

static void fileout_close_hls_chunk (GF_FileOutCtx *ctx, Bool final_flush)
 
static GF_Err fileout_open_close (GF_FileOutCtx *ctx, const char *filename, const char *ext, u32 file_idx, Bool explicit_overwrite, char *file_suffix, Bool check_no_open)
 
static void fileout_setup_file (GF_FileOutCtx *ctx, Bool explicit_overwrite)
 
static GF_Err fileout_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err fileout_initialize (GF_Filter *filter)
 
static void fileout_finalize (GF_Filter *filter)
 
static GF_Err fileout_process (GF_Filter *filter)
 
static Bool fileout_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
static GF_FilterProbeScore fileout_probe_url (const char *url, const char *mime)
 
const GF_FilterRegister * fout_register (GF_FilterSession *session)
 

Variables

static const GF_FilterArgs FileOutArgs []
 
static const GF_FilterCapability FileOutCaps []
 
GF_FilterRegister FileOutRegister
 

Data Structure Documentation

◆ GF_FileOutCtx

struct GF_FileOutCtx
+ Collaboration diagram for GF_FileOutCtx:
Data Fields
Double start
Double speed
char * dst
char * mime
char * ext
Bool append
Bool dynext
Bool redund
Bool noinitraw
Bool force_null
u32 cat
u32 ow
u32 mvbk
s32 max_cache_segs
GF_FilterPid * pid
FILE * file
Bool is_std
u64 nb_write
Bool use_templates
GF_FilterCapability in_caps[2]
char szExt[10]
char szFileName[GF_MAX_PATH]
char * llhas_template
Bool patch_blocks
Bool is_null
GF_Err error
u32 dash_mode
u64 offset_at_seg_start
const char * original_url
GF_FileIO * gfio_ref
FILE * hls_chunk
u32 max_segs
u32 llhas_mode
GF_List * past_files
Bool gfio_pending
u64 last_file_size
Bool use_rel
Bool no_fd
s32 fd

Macro Definition Documentation

◆ OFFS

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FOUT_CAT_NONE 
FOUT_CAT_AUTO 
FOUT_CAT_ALL 

◆ anonymous enum

anonymous enum
Enumerator
FOUT_OW_YES 
FOUT_OW_NO 
FOUT_OW_ASK 

Function Documentation

◆ fileout_close_hls_chunk()

static void fileout_close_hls_chunk ( GF_FileOutCtx ctx,
Bool  final_flush 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fileout_open_close()

static GF_Err fileout_open_close ( GF_FileOutCtx ctx,
const char *  filename,
const char *  ext,
u32  file_idx,
Bool  explicit_overwrite,
char *  file_suffix,
Bool  check_no_open 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fileout_setup_file()

static void fileout_setup_file ( GF_FileOutCtx ctx,
Bool  explicit_overwrite 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fileout_configure_pid()

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

◆ fileout_initialize()

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

◆ fileout_finalize()

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

◆ fileout_process()

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

◆ fileout_process_event()

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

◆ fileout_probe_url()

static GF_FilterProbeScore fileout_probe_url ( const char *  url,
const char *  mime 
)
static
+ Here is the call graph for this function:

◆ fout_register()

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

Variable Documentation

◆ FileOutArgs

const GF_FilterArgs FileOutArgs[]
static
Initial value:
=
{
{ OFFS(dst), "location of destination file", GF_PROP_NAME, NULL, NULL, 0},
{ OFFS(append), "open in append mode", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(dynext), "indicate the file extension is set by filter chain, not dst", GF_PROP_BOOL, "false", 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 when vsync is on. If negative and start is 0, start is set to -1", GF_PROP_DOUBLE, "1.0", NULL, 0},
{ OFFS(ext), "set extension for graph resolution, regardless of file extension", GF_PROP_NAME, NULL, NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(mime), "set mime type for graph resolution", GF_PROP_NAME, NULL, NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(cat), "cat each file of input PID rather than creating one file per filename\n"
"- none: never cat files\n"
"- auto: only cat if files have same names\n"
"- all: always cat regardless of file names"
, GF_PROP_UINT, "none", "none|auto|all", GF_FS_ARG_HINT_ADVANCED},
{ OFFS(ow), "overwrite output mode when concatenation is not used\n"
"- yes: override file if existing\n"
"- no: throw error if file existing\n"
"- ask: interactive prompt", GF_PROP_UINT, "yes", "yes|no|ask", 0},
{ OFFS(mvbk), "block size used when moving parts of the file around in patch mode", GF_PROP_UINT, "8192", NULL, 0},
{ OFFS(redund), "keep redundant packet in output file", GF_PROP_BOOL, "false", NULL, 0},
{ OFFS(noinitraw), "do not produce initial segment", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_HIDE},
{ OFFS(max_cache_segs), "maximum number of segments cached per HAS quality when recording live sessions (0 means no limit)", GF_PROP_SINT, "0", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(force_null), "force no output regardless of file name", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(use_rel), "packet filename use relative names (only set by dasher)", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_HIDE},
{0}
}
@ GF_FS_ARG_HINT_EXPERT
Definition: filters.h:2104
@ GF_FS_ARG_HINT_HIDE
Definition: filters.h:2106
@ GF_FS_ARG_HINT_ADVANCED
Definition: filters.h:2102
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_SINT
Definition: filters.h:850
@ GF_PROP_DOUBLE
Definition: filters.h:866
@ GF_PROP_NAME
Definition: filters.h:884
@ GF_PROP_UINT
Definition: filters.h:852
#define OFFS(_n)
Definition: out_file.c:946

◆ FileOutCaps

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

◆ FileOutRegister

GF_FilterRegister FileOutRegister