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

filter packet object

Public Member Functions

def enum_props (self, callback_obj)
 enumerate an packet properties More...
def get_prop (self, prop_name)
 get a packet property - see gf_filter_pck_get_property and gf_filter_pck_get_property_str More...
def ref (self)
 increase packet reference count - see gf_filter_pck_ref_ex More...
def unref (self)
 decrease packet reference count - see gf_filter_pck_unref More...
def discard (self)
 discard an output packet instead of sending it - see gf_filter_pck_discard More...
def clone (self, cached_pck=None)
 creates a new packet cloning a source packet - see gf_filter_pck_dangling_copy. More...
def readonly (self)
 mark an output packet as readonly - see gf_filter_pck_set_readonly More...
def send (self)
 send the packet - see gf_filter_pck_send More...
def copy_props (self, ipck)
 copy properties of source packet in this packet - see gf_filter_pck_merge_properties More...
def set_prop (self, pcode, prop, custom_type=0)
 set property in this packet - see gf_filter_pck_set_property and gf_filter_pck_set_property_str More...
def truncate (self, size)
 truncates an output packet to the given size - see gf_filter_pck_truncate More...
def get_gl_texture (self, idx)
 return OpenGL texture info for a given color plane of a frame interface packet More...

Static Public Attributes

 Decode Timestamp - see gf_filter_pck_get_dts and gf_filter_pck_set_dts.
 Compose Timestamp - see gf_filter_pck_get_cts and gf_filter_pck_set_cts.
 SAP type - see gf_filter_pck_get_sap and gf_filter_pck_set_sap.
 Duration - see gf_filter_pck_get_duration and gf_filter_pck_set_duration.
 Size of packet data, readonly.
 Packet data - see gf_filter_pck_get_data If NumPy is available, the data is returned as a np Array, otherwise it is a POINTER(c_ubyte) object The property is readonly (cannot be set) but content can be modified for non-refs output packets.
 frame start - see gf_filter_pck_get_framing and gf_filter_pck_set_framing
 frame end - see gf_filter_pck_get_framing and gf_filter_pck_set_framing
 associated timescale, readonly - see gf_filter_pck_get_timescale
 Interlaced flags - see gf_filter_pck_get_interlaced and gf_filter_pck_set_interlaced.
 Corrupted flag - see gf_filter_pck_get_corrupted and gf_filter_pck_set_corrupted.
 Seek flag - see gf_filter_pck_get_seek_flag and gf_filter_pck_set_seek_flag.
 Byte offset - see gf_filter_pck_get_byte_offset and gf_filter_pck_set_byte_offset.
 Roll info - see gf_filter_pck_get_roll_info and gf_filter_pck_set_roll_info.
 Encryption flags - see gf_filter_pck_get_crypt_flags and gf_filter_pck_set_crypt_flags.
 Clock reference flag - see gf_filter_pck_get_clock_type and gf_filter_pck_set_clock_type.
 Carousel version - see gf_filter_pck_get_carousel_version and gf_filter_pck_set_carousel_version.
 Sequence number - see gf_filter_pck_get_seq_num and gf_filter_pck_set_seq_num.
 Dependency flags - see gf_filter_pck_get_dependency_flags and gf_filter_pck_set_dependency_flags.
 true if packet holds a GF_FrameInterface object and not a data packet, readonly
 true if packet holds a GF_FrameInterface object providing OpenGL only access and not a data packet, readonly
 Custom properties present, readonly - see gf_filter_pck_has_properties.
 true if packet is a blocking reference, readonly - see gf_filter_pck_is_blocking_ref

Member Function Documentation

◆ enum_props()

def python.libgpac.libgpac.FilterPacket.enum_props (   self,
callback_objcallback object to use, must have a 'on_prop_enum' method defined taking two parameters, prop_name(string) and propval

◆ get_prop()

def python.libgpac.libgpac.FilterPacket.get_prop (   self,
prop_namename of property to get
property value, or None if not found

◆ ref()

def python.libgpac.libgpac.FilterPacket.ref (   self)

◆ unref()

def python.libgpac.libgpac.FilterPacket.unref (   self)

◆ discard()

def python.libgpac.libgpac.FilterPacket.discard (   self)

◆ clone()

def python.libgpac.libgpac.FilterPacket.clone (   self,
  cached_pck = None 

The resulting packet is read/write mode and may have its own memory allocated. This is typically used by sink filters wishing to access underling GPU data of a packet using frame interface. the resulting packet can be explicitly discarded using discard, otherwise will be garbage collected.

cached_pckif set, will be reuse for creation of new packet. This can greatly reduce memory allocations
the new FilterPacket or None if failure or None if failure ( if grabbing the frame into a local copy failed)

◆ readonly()

def python.libgpac.libgpac.FilterPacket.readonly (   self)

◆ send()

def python.libgpac.libgpac.FilterPacket.send (   self)
+ Here is the caller graph for this function:

◆ copy_props()

def python.libgpac.libgpac.FilterPacket.copy_props (   self,
ipcksource packet
+ Here is the call graph for this function:

◆ set_prop()

def python.libgpac.libgpac.FilterPacket.set_prop (   self,
  custom_type = 0 
pcodename of property
propproperty value
custom_typetype of property if user-defined property. If not set and user-defined, property is a string

◆ truncate()

def python.libgpac.libgpac.FilterPacket.truncate (   self,
sizenew size of packet

◆ get_gl_texture()

def python.libgpac.libgpac.FilterPacket.get_gl_texture (   self,
idxindex of texture to fetch. The number of texture depends on the underlying pixel format
GLTextureInfo object or None if error