libgpac
Documentation of the core library of GPAC
_FilterPid Interface Reference

import"nodejs.idl";

Public Member Functions

void send_event (_FilterEvent evt)
 
void remove ()
 
void enum_props (function callback_obj)
 
PropertyValue get_prop (DOMString pname)
 
PropertyValue get_info (DOMString pname)
 
_FilterPacket get_packet ()
 
void drop_packet ()
 
void copy_props (_FilterPid ipid)
 
void reset_props (self)
 
void forward (_FilterPacket ipck)
 
void set_prop (DOMString pcode, PropertyValue prop, unsigned long custom_type)
 
void set_info (DOMString pcode, PropertyValue prop, unsigned long custom_type=0)
 
void clear_eos (boolean all_pids)
 
void check_caps ()
 
void discard_block ()
 
void allow_direct_dispatch ()
 
unsigned long get_clock_type ()
 
_Fraction get_clock_timestamp ()
 
boolean is_filter_in_parents (_Filter filter)
 
_BufferOccupancy get_buffer_occupancy ()
 
void loose_connect ()
 
void set_framing (boolean framed)
 
void set_clock_mode (boolean cmode)
 
void set_discard (boolean do_discard)
 
void require_source_id ()
 
void recompute_dts (boolean do_compute)
 
PropertyValue query_cap (DOMString pcode)
 
void negotiate_cap (DOMString pcode, PropertyValue prop, unsigned long custom_type=0)
 
DOMString resolve_template (DOMString template, unsigned long file_idx=0, DOMString suffix=null)
 
_FilterPacket new_pck_ref (_FilterPacket ipck, unsigned long size=0, unsigned long offset=0)
 
_FilterPacket new_pck (unsigned long size=0)
 
_FilterPacket new_pck_shared (ArrayBuffer data)
 
_FilterPacket new_pck_copy (_FilterPacket ipck)
 
_FilterPacket new_pck_clone (_FilterPacket ipck)
 

Data Fields

attribute DOMString name
 
attribute readonly DOMString filter_name
 
attribute boolean eos
 
attribute readonly boolean has_seen_eos
 
attribute readonly boolean eos_received
 
attribute readonly boolean would_block
 
attribute readonly boolean sparse
 
attribute unsigned long long max_buffer
 
attribute readonly unsigned long long buffer
 
attribute readonly boolean buffer_full
 
attribute readonly boolean first_empty
 
attribute readonly unsigned long long first_cts
 
attribute readonly unsigned long self nb_pck_queued
 
attribute readonly unsigned long timescale
 
attribute readonly unsigned long min_pck_dur
 
attribute readonly boolean playing
 
attribute readonly unsigned long long next_ts
 
attribute readonly boolean has_decoder
 

Detailed Description

Custom filter PID object

Member Function Documentation

◆ send_event()

void _FilterPid::send_event ( _FilterEvent  evt)

send an event on the pid - see gf_filter_pid_send_event

Parameters
evtfilter event to send

◆ remove()

void _FilterPid::remove ( )

removes this output pid - see gf_filter_pid_remove

◆ enum_props()

void _FilterPid::enum_props ( function  callback_obj)

enumerates property on pid

Parameters
callback_objcallback object to use, must have a 'on_prop_enum' method defined taking three parameters, prop_name (string), propval (PropertyValue) and ptype (int, GPAC property data type)

◆ get_prop()

PropertyValue _FilterPid::get_prop ( DOMString  pname)

get a PID property

Parameters
pnameproperty name
Returns
property value or null if not found

◆ get_info()

PropertyValue _FilterPid::get_info ( DOMString  pname)

get a PID info

Parameters
pnameproperty name
Returns
property value or null if not found

◆ get_packet()

_FilterPacket _FilterPid::get_packet ( )

get first packet of input PID - see gf_filter_pid_get_packet

Returns
packet or null if no packet available

◆ drop_packet()

void _FilterPid::drop_packet ( )

drops (removes) the first packet of input PID - see gf_filter_pid_drop_packet

◆ copy_props()

void _FilterPid::copy_props ( _FilterPid  ipid)

copy property of given PID to the current pid - see gf_filter_pid_copy_properties

Parameters
ipidfilter pid to copy from

◆ reset_props()

void _FilterPid::reset_props ( self  )

removes all properties of the current pid - see gf_filter_pid_reset_properties

◆ forward()

void _FilterPid::forward ( _FilterPacket  ipck)

forward a packet on the current pid - see gf_filter_pck_forward

Parameters
ipckpacket to forward

◆ set_prop()

void _FilterPid::set_prop ( DOMString  pcode,
PropertyValue  prop,
unsigned long  custom_type 
)

set a property the current pid - see gf_filter_pid_set_property and gf_filter_pid_set_property_str

Parameters
pcodeproperty type
propproperty value to set, or null to remove property
custom_typetype of property if user-defined property. If not set and user-defined, property is a string

◆ set_info()

void _FilterPid::set_info ( DOMString  pcode,
PropertyValue  prop,
unsigned long  custom_type = 0 
)

set a info property the current pid - see gf_filter_pid_set_info and gf_filter_pid_set_info_str

Parameters
pcodeproperty type
propproperty value to set, or null to remove property
custom_typetype of property if user-defined property. If not set and user-defined, property is a string

◆ clear_eos()

void _FilterPid::clear_eos ( boolean  all_pids)

clears EOS on the current PID - see gf_filter_pid_clear_eos

Parameters
all_pidsif true, clears eos on all input pids

◆ check_caps()

void _FilterPid::check_caps ( )

check PID properties match capability of filter - see gf_filter_pid_check_caps

◆ discard_block()

void _FilterPid::discard_block ( )

discard blocking mode on PID - see gf_filter_pid_discard_block

◆ allow_direct_dispatch()

void _FilterPid::allow_direct_dispatch ( )

allow direct dispatch of output to destinations - see gf_filter_pid_allow_direct_dispatch

◆ get_clock_type()

unsigned long _FilterPid::get_clock_type ( )

get current clock type info - see gf_filter_pid_get_clock_info

Returns
clock type

◆ get_clock_timestamp()

_Fraction _FilterPid::get_clock_timestamp ( )

get current clock time stamp - see gf_filter_pid_get_clock_info

Returns
clock timestamp

◆ is_filter_in_parents()

boolean _FilterPid::is_filter_in_parents ( _Filter  filter)

check if a filter is in the parent filter chain of the pid - see gf_filter_pid_is_filter_in_parents

Parameters
filterfilter to check
Returns
true or false

◆ get_buffer_occupancy()

_BufferOccupancy _FilterPid::get_buffer_occupancy ( )

get buffer occupancy - see gf_filter_pid_get_buffer_occupancy

Returns
buffer occupancy object

◆ loose_connect()

void _FilterPid::loose_connect ( )

sets loose connect mode - see gf_filter_pid_set_loose_connect

◆ set_framing()

void _FilterPid::set_framing ( boolean  framed)

sets framing mode - see gf_filter_pid_set_framing_mode

Parameters
framedif true, complete frames only will be delivered on the pid

◆ set_clock_mode()

void _FilterPid::set_clock_mode ( boolean  cmode)

sets clock mode - see gf_filter_pid_set_clock_mode #

Parameters
cmodeclock mode operation of filter

◆ set_discard()

void _FilterPid::set_discard ( boolean  do_discard)

sets discard mode - see gf_filter_pid_set_discard

Parameters
do_discardif True, discard is on

◆ require_source_id()

void _FilterPid::require_source_id ( )

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

◆ recompute_dts()

void _FilterPid::recompute_dts ( boolean  do_compute)

sets DTS recomputing mode - see gf_filter_pid_recompute_dts

Parameters
do_computeif True, DTS are recomputed

◆ query_cap()

PropertyValue _FilterPid::query_cap ( DOMString  pcode)

queries a capability property on output PID - see gf_filter_pid_caps_query and gf_filter_pid_caps_query_str

Parameters
pcodeproperty to check
Returns
property value if found, null otherwise

◆ negotiate_cap()

void _FilterPid::negotiate_cap ( DOMString  pcode,
PropertyValue  prop,
unsigned long  custom_type = 0 
)

negotiates a capability property on input PID - see gf_filter_pid_negotiate_property and gf_filter_pid_negotiate_property_dyn

Parameters
pcodeproperty to negotiate
propproperty to negotiate
custom_typetype of property if user-defined property. If not set and user-defined, property is a string

◆ resolve_template()

DOMString _FilterPid::resolve_template ( DOMString  template,
unsigned long  file_idx = 0,
DOMString  suffix = null 
)

resolves a template string - see gf_filter_pid_resolve_file_template

Parameters
templatethe template string
file_idxthe file index
suffixthe file suffix
Returns
the resolved template string

◆ new_pck_ref()

_FilterPacket _FilterPid::new_pck_ref ( _FilterPacket  ipck,
unsigned long  size = 0,
unsigned long  offset = 0 
)

creates a new packet referring to an existing packet - see gf_filter_pck_new_ref

Parameters
ipckthe input (referenced) packet
sizethe data size of the new packet
offsetthe offset in the original data
Returns
the new FilterPacket or None if failure

◆ new_pck()

_FilterPacket _FilterPid::new_pck ( unsigned long  size = 0)

creates a new packet of the given size, allocating memory in libgpac - see gf_filter_pck_new_alloc

Parameters
sizethe data size of the new packet
Returns
the new FilterPacket or None if failure

◆ new_pck_shared()

_FilterPacket _FilterPid::new_pck_shared ( ArrayBuffer  data)

creates a new packet sharing memory of the filter - see gf_filter_pck_new_shared The filter object must have a packet_release method with arguments [ FilterPid, FilterPacket ]

Parameters
datathe data to use
Returns
the new FilterPacket or None if failure

◆ new_pck_copy()

_FilterPacket _FilterPid::new_pck_copy ( _FilterPacket  ipck)

creates a new packet copying a source packet - see gf_filter_pck_new_copy

Parameters
ipckthe FilterPacket to copy
Returns
the new FilterPacket or None if failure

◆ new_pck_clone()

_FilterPacket _FilterPid::new_pck_clone ( _FilterPacket  ipck)

creates a new packet cloning a source packet - see gf_filter_pck_new_clone

Parameters
ipckthe FilterPacket to clone
Returns
the new FilterPacket or None if failure

Field Documentation

◆ name

attribute DOMString _FilterPid::name

◆ filter_name

attribute readonly DOMString _FilterPid::filter_name

name of the parent filter - see gf_filter_pid_get_filter_name

◆ eos

attribute boolean _FilterPid::eos

end of stream property of PID - see gf_filter_pid_is_eos and gf_filter_pid_set_eos

◆ has_seen_eos

attribute readonly boolean _FilterPid::has_seen_eos

True if end of stream was seen in the chain but has not yet reached the filter - see gf_filter_pid_has_seen_eos

◆ eos_received

attribute readonly boolean _FilterPid::eos_received

True if end of stream was seen on the input PID but some packets are still to be processed - see gf_filter_pid_eos_received

◆ would_block

attribute readonly boolean _FilterPid::would_block

True if PID would block - see gf_filter_pid_would_block

◆ sparse

attribute readonly boolean _FilterPid::sparse

True if PID is sparse - see gf_filter_pid_is_sparse

◆ max_buffer

attribute unsigned long long _FilterPid::max_buffer

maximum buffer of PID in microseconds - see gf_filter_pid_get_max_buffer and gf_filter_pid_set_max_buffer

◆ buffer

attribute readonly unsigned long long _FilterPid::buffer

buffer of PID in microseconds - see gf_filter_pid_query_buffer_duration

◆ buffer_full

attribute readonly boolean _FilterPid::buffer_full

True if buffer is full - see gf_filter_pid_query_buffer_duration

◆ first_empty

attribute readonly boolean _FilterPid::first_empty

True if no pending packet - see gf_filter_pid_first_packet_is_empty

◆ first_cts

attribute readonly unsigned long long _FilterPid::first_cts

value of CTS of first pending packet, null if none - see gf_filter_pid_get_first_packet_cts

◆ nb_pck_queued

attribute readonly unsigned long self _FilterPid::nb_pck_queued

number of queued packets for input pid - see gf_filter_pid_get_packet_count

◆ timescale

attribute readonly unsigned long _FilterPid::timescale

timescale of pid - see gf_filter_pid_get_timescale

◆ min_pck_dur

attribute readonly unsigned long _FilterPid::min_pck_dur

minimum packet duration (in timescale) of pid - see gf_filter_pid_get_min_pck_duration

◆ playing

attribute readonly boolean _FilterPid::playing

True if PID is playing - see gf_filter_pid_is_playing

◆ next_ts

attribute readonly unsigned long long _FilterPid::next_ts

Next estimated timestamp on pid - see gf_filter_pid_get_next_ts

◆ has_decoder

attribute readonly boolean _FilterPid::has_decoder

Set to true if input chain has a decoder - see gf_filter_pid_has_decoder