libgpac
Documentation of the core library of GPAC
_Filter Interface Reference

import"nodejs.idl";

Public Member Functions

void remove ()
 
void update (DOMString name, DOMString value)
 
void set_source (_Filter src, DOMString link_args=null)
 
void set_source_restricted (_Filter src, DOMString link_args=null)
 
void insert (_Filter f, long pid_idx=-1, DOMString link_args=null)
 
void reconnect (long pid_idx=-1)
 
DOMString probe_link (long pid_idx, DOMString name)
 
DOMString get_destinations (long pid_idx=-1)
 
PropertyValue ipid_prop (unsigned long idx, DOMString prop_name)
 
void ipid_enum_props (unsigned long idx, function callback_fun)
 
PropertyValue opid_prop (unsigned long idx, DOMString prop_name)
 
void opid_enum_props (unsigned long idx, function callback_fun)
 
PidStatistics ipid_stats (unsigned long idx, unsigned long mode=0)
 
PidStatistics opid_stats (unsigned long idx, unsigned long mode=0)
 
_Filter ipid_source (unsigned long idx)
 
Array opid_sinks (unsigned long idx)
 
Array all_args ()
 
PropertyValue get_info (DOMString info_name)
 
FilterStatistics get_statistics ()
 
void require_source_id ()
 
void bind (object interf)
 

Data Fields

attribute readonly DOMString name
 
attribute readonly DOMString ID
 
attribute readonly unsigned long nb_ipid
 
attribute readonly unsigned long nb_opid
 

Detailed Description

Filter object

Member Function Documentation

◆ remove()

void _Filter::remove ( )

remove this filter - see gf_filter_remove

◆ update()

void _Filter::update ( DOMString  name,
DOMString  value 
)

send option update to this filter - see gf_fs_send_update

Parameters
namename of option
valuevalue of option

◆ set_source()

void _Filter::set_source ( _Filter  src,
DOMString  link_args = null 
)

set a given filter as source for this filter - see gf_filter_set_source

Note
Setting a source will force the filter session linker to run in explicit linking mode.
Parameters
srcsource filter
link_argslink options

◆ set_source_restricted()

void _Filter::set_source_restricted ( _Filter  src,
DOMString  link_args = null 
)

set a given filter as restricted source for this filter - see gf_filter_set_source_restricted

Note
Setting a source will force the filter session linker to run in explicit linking mode.
Parameters
srcsource filter
link_argslink options

◆ insert()

void _Filter::insert ( _Filter  f,
long  pid_idx = -1,
DOMString  link_args = null 
)

insert a given filter after this filter - see gf_filter_set_source and gf_filter_reconnect_output

Parameters
f_Filter to insert
pid_idxindex of pid to relink, negative value means all output pids
link_argslink options

◆ reconnect()

void _Filter::reconnect ( long  pid_idx = -1)

reconnect the filter output - see gf_filter_set_source and gf_filter_reconnect_output

Parameters
pid_idxindex of output pid to reconnect, -1 for all pids

◆ probe_link()

DOMString _Filter::probe_link ( long  pid_idx,
DOMString  name 
)

Resolves link from given output pid of filter to a filter description. The described filter is not loaded in the graph - see gf_filter_probe_link

Parameters
pid_idx0-based index of the output pid
namefilter description to link to; this can be any filter description
Returns
comma-spearated string list of the filter names in the resolved chain from current filter to destination

◆ get_destinations()

DOMString _Filter::get_destinations ( long  pid_idx = -1)

Gets all possible destination filter for this filter or one of its output PID - see gf_filter_get_possible_destinations

Parameters
pid_idx0-based index of the output pid, use -1 to check all output pids
Returns
None if no possible connections to known filter, or a comma-separated string list containing all possible direct connections

◆ ipid_prop()

PropertyValue _Filter::ipid_prop ( unsigned long  idx,
DOMString  prop_name 
)

get an input pid property by name

Parameters
idxindex of input pid
prop_namename of property
Returns
property value or None if not found

◆ ipid_enum_props()

void _Filter::ipid_enum_props ( unsigned long  idx,
function  callback_fun 
)

enumerate an input pid properties

Parameters
idxindex of input pid
callback_funcallback function taking three parameters, prop_name (string), propval (PropertyValue) and proptype (int, GPAC property data type)

◆ opid_prop()

PropertyValue _Filter::opid_prop ( unsigned long  idx,
DOMString  prop_name 
)

get an output pid property by name

Parameters
idxindex of output pid
prop_namename of property
Returns
property value or null if not found

◆ opid_enum_props()

void _Filter::opid_enum_props ( unsigned long  idx,
function  callback_fun 
)

enumerate an output pid properties

Parameters
idxindex of output pid
callback_funcallback function taking three parameters, prop_name (string), propval (PPropertyValue) and proptype (int, GPAC property data type)

◆ ipid_stats()

PidStatistics _Filter::ipid_stats ( unsigned long  idx,
unsigned long  mode = 0 
)

get statistics on input pid

Parameters
idxindex of input pid
modesearch mode for stats (one of GF_STATS_XXX)
Returns
stats or null if error

◆ opid_stats()

PidStatistics _Filter::opid_stats ( unsigned long  idx,
unsigned long  mode = 0 
)

get statistics on output pid

Parameters
idxindex of input pid
modesearch mode for stats (one of GF_STATS_XXX)
Returns
stats or null if error

◆ ipid_source()

_Filter _Filter::ipid_source ( unsigned long  idx)

gets the filter at the source of an input pid

Parameters
idxindex of input PID
Returns
filter or null if error

◆ opid_sinks()

Array _Filter::opid_sinks ( unsigned long  idx)

gets the list of destination filters of an output pid

Parameters
idxindex of output PID
Returns
list of _Filter

◆ all_args()

Array _Filter::all_args ( )

gets all defined options / arguments for a filter

Returns
list of FilterArg

◆ get_info()

PropertyValue _Filter::get_info ( DOMString  info_name)

gets a property info on a filter - see gf_filter_get_info and gf_filter_get_info_str

Parameters
info_nameproperty to query
Returns
property value or None if not found

◆ get_statistics()

FilterStatistics _Filter::get_statistics ( )

gets the statistics of a filter - see gf_filter_get_stats

Returns
stats object

◆ require_source_id()

void _Filter::require_source_id ( )

enforces sourceID to be present for output pids of this filter - see gf_filter_require_source_id

◆ bind()

void _Filter::bind ( object  interf)

Binds the given object to the underlying filter for callbacks override - only supported by DASH demuxer and httpout for the current time

For DASH, the object must implement the methods of the _DASHCustomAlgorithm interface For DASH, the object must implement the methods of the _HTTPRequestHandler interface

Parameters
interfinterface object to bind

Field Documentation

◆ name

attribute readonly DOMString _Filter::name

name of the filter, readonly - see gf_filter_get_name

◆ ID

attribute readonly DOMString _Filter::ID

ID of the filter, readonly - see gf_filter_get_id

◆ nb_ipid

attribute readonly unsigned long _Filter::nb_ipid

number of input pids for that filter, readonly - see gf_filter_get_ipid_count

◆ nb_opid

attribute readonly unsigned long _Filter::nb_opid

number of output pids for that filter, readonly - see gf_filter_get_opid_count