libgpac
Documentation of the core library of GPAC
GPAC module exports

Exported symbols for GPAC NodeJS. More...

+ Collaboration diagram for GPAC module exports:

Functions

void init (unsigned long mem_track=0, DOMString profile=null)
 
DOMString e2s (long err)
 
void set_logs (DOMString logs, boolean reset=false)
 
unsigned long sys_clock ()
 
unsigned long long sys_clock_high_res ()
 
void set_args (Array args)
 
void set_rmt_fun (function callback)
 
void rmt_log (DOMString text)
 
void rmt_send (DOMString text)
 
boolean rmt_on ()
 
void rmt_enable (boolean do_enable)
 
boolean on_event (_FilterEvent evt)
 

Variables

attribute readonly DOMString version
 
attribute readonly DOMString copyright
 
attribute readonly DOMString copyright_cite
 
attribute readonly unsigned long abi_major
 
attribute readonly unsigned long abi_minor
 
attribute readonly unsigned long abi_micro
 
attribute _FilterSession FilterSession
 
attribute _FilterEvent FilterEvent
 
attribute _FileIO FileIO
 

Detailed Description

This section documents the JavaScript API used to query the filter session.

Unless explictly stated, errors are handled through exceptions.

All constants from GPAC are exported in the module object (e.g. use gpac.GF_Err ...)

The API is very close to the GPAC python bindings.

Function Documentation

◆ init()

void init ( unsigned long  mem_track = 0,
DOMString  profile = null 
)

initialize libgpac - see gf_sys_init

When loading the module, libgpac is innitialized with no memory tracking and the default profile. Use this function only if you need to change these settings. This must be called before any other calls to gpac.

Parameters
mem_trackmem tracker mode
profileprofile name, null for default
Returns
+ Here is the caller graph for this function:

◆ e2s()

DOMString e2s ( long  err)

convert error value to string message

Parameters
errgpac error code (int)
Returns
string

◆ set_logs()

void set_logs ( DOMString  logs,
boolean  reset = false 
)

set log tools and levels - see gf_log_set_tools_levels

Note
Make sure you have destroyed all associated gpac resources before calling this !
Parameters
logs
resetif true, resets all logs to default
Returns

◆ sys_clock()

unsigned long sys_clock ( )

get clock - see gf_sys_clock

Returns
clock in milliseconds

◆ sys_clock_high_res()

unsigned long long sys_clock_high_res ( )

get high res clock - see gf_sys_clock_high_res

Returns
clock in microseconds

◆ set_args()

void set_args ( Array  args)

set libgpac arguments - see gf_sys_set_args

Parameters
argsArray of strings, the first string is ignored (considered to be the executable name)

◆ set_rmt_fun()

void set_rmt_fun ( function  callback)

set profiler (Remotery) callback - see gf_sys_profiler_set_callback

Parameters
callbackfunction for Remotery message, takes a single string parameter and no return values

◆ rmt_log()

void rmt_log ( DOMString  text)

send log message to profiler (Remotery) - see gf_sys_profiler_log

Parameters
texttext to send

◆ rmt_send()

void rmt_send ( DOMString  text)

send message to profiler (Remotery) - see gf_sys_profiler_send

Parameters
texttext to send

◆ rmt_on()

boolean rmt_on ( )

check if profiler (Remotery) sampling is enabled - see gf_sys_profiler_sampling_enabled

Returns
true if enabled, false otherwise

◆ rmt_enable()

void rmt_enable ( boolean  do_enable)

enable or disable sampling in profiler (Remotery) - see gf_sys_profiler_enable_sampling

Parameters
do_enableenable or disable sampling

◆ on_event()

boolean on_event ( _FilterEvent  evt)

GPAC event proc callback, initially set to null

Parameters
evtthe user event being dispatched
Returns
true to cancel the event
+ Here is the caller graph for this function:

Variable Documentation

◆ version

attribute readonly DOMString version

libgpac version

◆ copyright

attribute readonly DOMString copyright

libgpac copyright notice

◆ copyright_cite

attribute readonly DOMString copyright_cite

libgpac full copyright notice

◆ abi_major

attribute readonly unsigned long abi_major

libgpac major ABI - see gf_gpac_abi_major

◆ abi_minor

attribute readonly unsigned long abi_minor

libgpac minor ABI - see gf_gpac_abi_minor

◆ abi_micro

attribute readonly unsigned long abi_micro

libgpac micro ABI - see gf_gpac_abi_micro

◆ FilterSession

attribute _FilterSession FilterSession

filter session constructor

◆ FilterEvent

filter session constructor

◆ FileIO

attribute _FileIO FileIO

FileIO constructor