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, DOMString link_args=null)
 
PropertyValue ipid_prop (unsigned long idx, DOMStreing 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)
 
_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,
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
link_argslink options

◆ ipid_prop()

PropertyValue _Filter::ipid_prop ( unsigned long  idx,
DOMStreing  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_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 for the current time

For DASH, the object must derive implement the methods of the _DASHCustomAlgorithm 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