libgpac
Documentation of the core library of GPAC
Loading...
Searching...
No Matches
python.libgpac.libgpac.FilterPid Class Reference

Object representing a PID of a custom filter.

Public Member Functions

 send_event (self, evt)
 send an event on the pid - see gf_filter_pid_send_event
 
 remove (self)
 removes this output pid - see gf_filter_pid_remove
 
 enum_props (self, callback_obj)
 enumerates property on pid
 
 get_prop (self, pname)
 get a PID property
 
 get_info (self, pname)
 get a PID info
 
 get_packet (self)
 get first packet of input PID - see gf_filter_pid_get_packet
 
 drop_packet (self)
 drops (removes) the first packet of input PID - see gf_filter_pid_drop_packet
 
 copy_props (self, ipid)
 copy property of given PID to the current pid - see gf_filter_pid_copy_properties
 
 reset_props (self)
 removes all properties of the current pid - see gf_filter_pid_reset_properties
 
 forward (self, ipck)
 forward a packet on the current pid - see gf_filter_pck_forward
 
 set_prop (self, pcode, prop, custom_type=0)
 set a property the current pid - see gf_filter_pid_set_property and gf_filter_pid_set_property_str
 
 set_info (self, pcode, prop, custom_type=0)
 set a info property the current pid - see gf_filter_pid_set_info and gf_filter_pid_set_info_str
 
 clear_eos (self, all_pids)
 clears EOS on the current PID - see gf_filter_pid_clear_eos
 
 check_caps (self)
 check PID properties match capability of filter - see gf_filter_pid_check_caps
 
 discard_block (self)
 discard blocking mode on PID - see gf_filter_pid_discard_block
 
 allow_direct_dispatch (self)
 allow direct dispatch of output to destinations - see gf_filter_pid_allow_direct_dispatch
 
 get_clock_type (self)
 get current clock type info - see gf_filter_pid_get_clock_info
 
 get_clock_timestamp (self)
 get current clock time stamp - see gf_filter_pid_get_clock_info
 
 is_filter_in_parents (self, filter)
 check if a filter is in the parent filter chain of the pid - see gf_filter_pid_is_filter_in_parents
 
 get_buffer_occupancy (self)
 get buffer occupancy - see gf_filter_pid_get_buffer_occupancy
 
 loose_connect (self)
 sets loose connect mode - see gf_filter_pid_set_loose_connect
 
 set_framing (self, framed)
 sets framing mode - see gf_filter_pid_set_framing_mode
 
 set_clock_mode (self, cmode)
 sets clock mode - see gf_filter_pid_set_clock_mode
 
 set_discard (self, do_discard)
 sets discard mode - see gf_filter_pid_set_discard
 
 require_source_id (self)
 enforces sourceID to be present for output pids of this filter - see gf_filter_pid_require_source_id
 
 recompute_dts (self, do_compute)
 sets DTS recomputing mode - see gf_filter_pid_recompute_dts
 
 query_cap (self, pcode)
 queries a capability property on output PID - see gf_filter_pid_caps_query and gf_filter_pid_caps_query_str
 
 negociate_cap (self, pcode, prop, custom_type=0)
 negociates a capability property on input PID - see gf_filter_pid_negociate_property and gf_filter_pid_negociate_property_dyn
 
 resolve_template (self, template, file_idx=0, suffix=None)
 resolves a template string - see gf_filter_pid_resolve_file_template
 
 new_pck_ref (self, ipck, size=0, offset=0)
 creates a new packet referring to an existing packet - see gf_filter_pck_new_ref
 
 new_pck (self, size=0)
 creates a new packet of the given size, allocating memory in libgpac - see gf_filter_pck_new_alloc
 
 new_pck_shared (self, 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 ]
 
 new_pck_copy (self, ipck)
 creates a new packet copying a source packet - see gf_filter_pck_new_copy
 
 new_pck_clone (self, ipck)
 creates a new packet cloning a source packet - see gf_filter_pck_new_clone
 

Static Public Attributes

 name
 name of the PID - see gf_filter_pid_get_name and gf_filter_pid_set_name
 
 filter_name
 name of the parent filter, readonly - see gf_filter_pid_get_filter_name
 
 eos
 end of stream property of PID - see gf_filter_pid_is_eos and gf_filter_pid_set_eos
 
 has_seen_eos
 True if end of stream was seen in the chain but has not yet reached the filter, readonly - see gf_filter_pid_has_seen_eos.
 
 eos_received
 True if end of stream was seen on the input PID but some packets are still to be processed, readonly - see gf_filter_pid_eos_received.
 
 would_block
 True if PID would block, readonly - see gf_filter_pid_would_block.
 
 sparse
 True if PID is sparse, readonly - see gf_filter_pid_is_sparse.
 
 max_buffer
 maximum buffer of PID in microseconds - see gf_filter_pid_get_max_buffer and gf_filter_pid_set_max_buffer
 
 buffer
 buffer of PID in microseconds, readonly - see gf_filter_pid_query_buffer_duration
 
 buffer_full
 True if buffer is full, readonly - see gf_filter_pid_query_buffer_duration.
 
 first_empty
 True if no pending packet, readonly - see gf_filter_pid_first_packet_is_empty.
 
 first_cts
 value of CTS of first pending packet, None if none, readonly - see gf_filter_pid_get_first_packet_cts
 
 nb_pck_queued
 number of queued packets for input pid, readonly - see gf_filter_pid_get_packet_count
 
 timescale
 timescale of pid, readonly - see gf_filter_pid_get_timescale
 
 min_pck_dur
 minimum packet duration (in timescale) of pid, readonly - see gf_filter_pid_get_min_pck_duration
 
 playing
 True if PID is playing, readonly - see gf_filter_pid_is_playing.
 
 next_ts
 Next estimated timestamp on pid, readonly - see gf_filter_pid_get_next_ts.
 

Protected Attributes

 _pid
 
 _filter
 

Member Function Documentation

◆ send_event()

python.libgpac.libgpac.FilterPid.send_event ( self,
evt )
Parameters
evtFilterEvent to send
Returns

◆ remove()

python.libgpac.libgpac.FilterPid.remove ( self)
Returns

◆ enum_props()

python.libgpac.libgpac.FilterPid.enum_props ( self,
callback_obj )
Parameters
callback_objcallback object to use, must have a 'on_prop_enum' method defined taking two parameters, prop_name(string) and propval(property value)
Returns

◆ get_prop()

python.libgpac.libgpac.FilterPid.get_prop ( self,
pname )
Parameters
pnameproperty name
Returns
property value or None if not found

◆ get_info()

python.libgpac.libgpac.FilterPid.get_info ( self,
pname )
Parameters
pnameproperty name
Returns
property value or None if not found

◆ get_packet()

python.libgpac.libgpac.FilterPid.get_packet ( self)
Returns
FilterPacket or None if no packet available

◆ drop_packet()

python.libgpac.libgpac.FilterPid.drop_packet ( self)
Returns

◆ copy_props()

python.libgpac.libgpac.FilterPid.copy_props ( self,
ipid )
Parameters
ipidFilterPid to copy from
Returns
+ Here is the call graph for this function:

◆ reset_props()

python.libgpac.libgpac.FilterPid.reset_props ( self)
Returns

◆ forward()

python.libgpac.libgpac.FilterPid.forward ( self,
ipck )
Parameters
ipckpacket to forward
Returns

◆ set_prop()

python.libgpac.libgpac.FilterPid.set_prop ( self,
pcode,
prop,
custom_type = 0 )
Parameters
pcodeproperty type
propproperty value to set
custom_typetype of property if user-defined property. If not set and user-defined, property is a string
Returns

◆ set_info()

python.libgpac.libgpac.FilterPid.set_info ( self,
pcode,
prop,
custom_type = 0 )
Parameters
pcodeproperty type
propproperty value to set
custom_typetype of property if user-defined property. If not set and user-defined, property is a string
Returns

◆ clear_eos()

python.libgpac.libgpac.FilterPid.clear_eos ( self,
all_pids )
Parameters
all_pidsif True, clears eos on all input pids
Returns

◆ check_caps()

python.libgpac.libgpac.FilterPid.check_caps ( self)
Returns

◆ discard_block()

python.libgpac.libgpac.FilterPid.discard_block ( self)
Returns

◆ allow_direct_dispatch()

python.libgpac.libgpac.FilterPid.allow_direct_dispatch ( self)
Returns

◆ get_clock_type()

python.libgpac.libgpac.FilterPid.get_clock_type ( self)
Returns
clock type (int)

◆ get_clock_timestamp()

python.libgpac.libgpac.FilterPid.get_clock_timestamp ( self)
Returns
clock timestamp (Fraction64)

◆ is_filter_in_parents()

python.libgpac.libgpac.FilterPid.is_filter_in_parents ( self,
filter )
Parameters
filterFilter to check
Returns
True or False

◆ get_buffer_occupancy()

python.libgpac.libgpac.FilterPid.get_buffer_occupancy ( self)
Returns
BufferOccupancy object

◆ loose_connect()

python.libgpac.libgpac.FilterPid.loose_connect ( self)
Returns

◆ set_framing()

python.libgpac.libgpac.FilterPid.set_framing ( self,
framed )
Parameters
framedif True, complete frames only will be delivered on the pid
Returns

◆ set_clock_mode()

python.libgpac.libgpac.FilterPid.set_clock_mode ( self,
cmode )
Parameters
cmodeclock mode operation of filter
Returns

◆ set_discard()

python.libgpac.libgpac.FilterPid.set_discard ( self,
do_discard )
Parameters
do_discardif True, discard is on
Returns

◆ require_source_id()

python.libgpac.libgpac.FilterPid.require_source_id ( self)
Returns
+ Here is the call graph for this function:

◆ recompute_dts()

python.libgpac.libgpac.FilterPid.recompute_dts ( self,
do_compute )
Parameters
do_computeif True, DTS are recomputed
Returns

◆ query_cap()

python.libgpac.libgpac.FilterPid.query_cap ( self,
pcode )
Parameters
pcodeproperty to check
Returns
property value if found, None otherwise

◆ negociate_cap()

python.libgpac.libgpac.FilterPid.negociate_cap ( self,
pcode,
prop,
custom_type = 0 )
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
Returns

◆ resolve_template()

python.libgpac.libgpac.FilterPid.resolve_template ( self,
template,
file_idx = 0,
suffix = None )
Parameters
templatethe template string
file_idxthe file index
suffixthe file suffix
Returns
the resolved template string
+ Here is the call graph for this function:

◆ new_pck_ref()

python.libgpac.libgpac.FilterPid.new_pck_ref ( self,
ipck,
size = 0,
offset = 0 )
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()

python.libgpac.libgpac.FilterPid.new_pck ( self,
size = 0 )
Parameters
sizethe data size of the new packet
Returns
the new FilterPacket or None if failure

◆ new_pck_shared()

python.libgpac.libgpac.FilterPid.new_pck_shared ( self,
data )
Parameters
datathe data to use. If NumPy is detected, accept a NP Array. Otherwise data is type casted into POINTER(c_ubyte)
Returns
the new FilterPacket or None if failure

◆ new_pck_copy()

python.libgpac.libgpac.FilterPid.new_pck_copy ( self,
ipck )
Parameters
ipckthe FilterPacket to copy
Returns
the new FilterPacket or None if failure

◆ new_pck_clone()

python.libgpac.libgpac.FilterPid.new_pck_clone ( self,
ipck )
Parameters
ipckthe FilterPacket to clone
Returns
the new FilterPacket or None if failure