libgpac
Documentation of the core library of GPAC
python.libgpac.libgpac.Filter Class Reference

filter object

+ Inheritance diagram for python.libgpac.libgpac.Filter:

Public Member Functions

def remove (self)
 remove this filter - see gf_filter_remove More...
 
def update (self, name, value, propagate_mask=0)
 send option update to this filter - see gf_fs_send_update More...
 
def set_source (self, f, link_args=None)
 set a given filter as source for this filter - see gf_filter_set_source More...
 
def set_source_restricted (self, f, link_args=None)
 set a given filter as restricted source for this filter - see gf_filter_set_source_restricted More...
 
def insert (self, f, opid=-1, link_args=None)
 insert a given filter after this filter - see gf_filter_set_source and gf_filter_reconnect_output More...
 
def reconnect (self, opid=-1)
 reconnect the filter output - see gf_filter_set_source and gf_filter_reconnect_output More...
 
def ipid_prop (self, idx, prop_name)
 get an input pid property by name More...
 
def ipid_enum_props (self, idx, callback_obj)
 enumerate an input pid properties More...
 
def opid_prop (self, idx, prop_name)
 get an output pid property by name More...
 
def opid_enum_props (self, idx, callback_obj)
 enumerate an output pid properties More...
 
def ipid_stats (self, idx, mode=0)
 Gets the statistics of an input pid of filter - see gf_filter_pid_get_statistics. More...
 
def opid_stats (self, idx, mode=0)
 Gets the statistics of an output pid of filter - see gf_filter_pid_get_statistics. More...
 
def ipid_source (self, idx)
 gets the filter at the source of an input pid More...
 
def opid_sinks (self, idx)
 gets the list of destination filters of an output pid More...
 
def all_args (self)
 gets all defined options / arguments for a filter More...
 
def get_info (self, prop_name)
 gets a property info on a filter - see gf_filter_get_info and gf_filter_get_info_str More...
 
def get_statistics (self)
 Gets the statistics of a filter - see gf_filter_get_stats. More...
 
def require_source_id (self)
 enforces sourceID to be present for output pids of this filter - see gf_filter_require_source_id More...
 
def probe_link (self, opid_idx, name)
 Resolves link from given output pid of filter to a filter description. More...
 
def get_destinations (self, opid_idx)
 Gets all possible destination filter for this filter or one of its output PID - see gf_filter_get_possible_destinations. More...
 
def bind (self, object)
 binds a given object to the filter More...
 

Static Public Attributes

 name
 name of the filter, readonly - see gf_filter_get_name
 
 ID
 ID of the filter, readonly - see gf_filter_get_id.
 
 nb_ipid
 number of input pids for that filter, readonly - see gf_filter_get_ipid_count
 
 nb_opid
 number of output pids for that filter, readonly - see gf_filter_get_opid_count
 

Member Function Documentation

◆ remove()

def python.libgpac.libgpac.Filter.remove (   self)
Returns

◆ update()

def python.libgpac.libgpac.Filter.update (   self,
  name,
  value,
  propagate_mask = 0 
)
Parameters
namename of option (string)
valuevalue of option (string)
propagate_maskflags indicating if updates must be send to up-chain filters (2), down-chain filters (1), both (3) or only on filter (0)
Returns

◆ set_source()

def python.libgpac.libgpac.Filter.set_source (   self,
  f,
  link_args = None 
)
Note
Setting a source will force the filter session linker to run in explicit linking mode.
Parameters
fsource Filter
link_argslink options (string)
Returns

◆ set_source_restricted()

def python.libgpac.libgpac.Filter.set_source_restricted (   self,
  f,
  link_args = None 
)
Parameters
fsource Filter
link_argslink options (string)
Returns

◆ insert()

def python.libgpac.libgpac.Filter.insert (   self,
  f,
  opid = -1,
  link_args = None 
)
Parameters
fFilter to insert
opidindex of output pid to reconnect, -1 for all pids
link_argslink options (string)
Returns
+ Here is the call graph for this function:

◆ reconnect()

def python.libgpac.libgpac.Filter.reconnect (   self,
  opid = -1 
)
Parameters
opidindex of output pid to reconnect, -1 for all pids
Returns
+ Here is the call graph for this function:

◆ ipid_prop()

def python.libgpac.libgpac.Filter.ipid_prop (   self,
  idx,
  prop_name 
)
Parameters
idxindex of input pid
prop_namename of property
Returns
property value or None if not found

◆ ipid_enum_props()

def python.libgpac.libgpac.Filter.ipid_enum_props (   self,
  idx,
  callback_obj 
)
Parameters
idxindex of input pid
callback_objcallback object to use, must have a 'on_prop_enum' method defined taking two parameters, prop_name(string) and propval(property value)
Returns

◆ opid_prop()

def python.libgpac.libgpac.Filter.opid_prop (   self,
  idx,
  prop_name 
)
Parameters
idxindex of output pid
prop_namename of property
Returns
property value or None if not found

◆ opid_enum_props()

def python.libgpac.libgpac.Filter.opid_enum_props (   self,
  idx,
  callback_obj 
)
Parameters
idxindex of output pid
callback_objcallback object to use, must have a 'on_prop_enum' method defined taking two parameters, prop_name(string) and propval(property value)
Returns

◆ ipid_stats()

def python.libgpac.libgpac.Filter.ipid_stats (   self,
  idx,
  mode = 0 
)
Parameters
idxindex of input pid
modesearch mode for stats cf GF_FilterPidStatsLocation
Returns
FilterPidStatistics object
+ Here is the call graph for this function:

◆ opid_stats()

def python.libgpac.libgpac.Filter.opid_stats (   self,
  idx,
  mode = 0 
)
Parameters
idxindex of output pid
modesearch mode for stats cf GF_FilterPidStatsLocation
Returns
FilterPidStatistics object
+ Here is the call graph for this function:

◆ ipid_source()

def python.libgpac.libgpac.Filter.ipid_source (   self,
  idx 
)
Parameters
idxindex of input PID
Returns
Filter or None if error

◆ opid_sinks()

def python.libgpac.libgpac.Filter.opid_sinks (   self,
  idx 
)
Parameters
idxindex of output PID
Returns
list of Filter

◆ all_args()

def python.libgpac.libgpac.Filter.all_args (   self)
Returns
list of FilterArg

◆ get_info()

def python.libgpac.libgpac.Filter.get_info (   self,
  prop_name 
)
Parameters
prop_nameproperty to query
Returns
property value or None if not found

◆ get_statistics()

def python.libgpac.libgpac.Filter.get_statistics (   self)
Returns
FilterStats object
+ Here is the call graph for this function:

◆ require_source_id()

def python.libgpac.libgpac.Filter.require_source_id (   self)
Returns

◆ probe_link()

def python.libgpac.libgpac.Filter.probe_link (   self,
  opid_idx,
  name 
)

The described filter is not loaded in the graph - see gf_filter_probe_link

Parameters
opid_idx0-based index of the output pid
namefilter description to link to - this can be any filter description
Returns
None if no possible link or a list containing the filters in the resolved chain from current filter to destination

◆ get_destinations()

def python.libgpac.libgpac.Filter.get_destinations (   self,
  opid_idx 
)
Parameters
opid_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 list containing all possible direct connections
+ Here is the call graph for this function:

◆ bind()

def python.libgpac.libgpac.Filter.bind (   self,
  object 
)

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 from or implement the methods of the DASHCustomAlgorithm class:

Parameters
objectobject to bind
Returns
+ Here is the call graph for this function: