libgpac
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

 dts
 Decode Timestamp - see gf_filter_pck_get_dts and gf_filter_pck_set_dts. More...
 
 cts
 Compose Timestamp - see gf_filter_pck_get_cts and gf_filter_pck_set_cts. More...
 
 sap
 SAP type - see gf_filter_pck_get_sap and gf_filter_pck_set_sap. More...
 
 dur
 Duration - see gf_filter_pck_get_duration and gf_filter_pck_set_duration. More...
 
 size
 Size of packet data, readonly. More...
 
 data
 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. More...
 
 start
 frame start - see gf_filter_pck_get_framing and gf_filter_pck_set_framing More...
 
 end
 frame end - see gf_filter_pck_get_framing and gf_filter_pck_set_framing More...
 
 timescale
 associated timescale, readonly - see gf_filter_pck_get_timescale More...
 
 interlaced
 Interlaced flags - see gf_filter_pck_get_interlaced and gf_filter_pck_set_interlaced. More...
 
 corrupted
 Corrupted flag - see gf_filter_pck_get_corrupted and gf_filter_pck_set_corrupted. More...
 
 seek
 Seek flag - see gf_filter_pck_get_seek_flag and gf_filter_pck_set_seek_flag. More...
 
 byte_offset
 Byte offset - see gf_filter_pck_get_byte_offset and gf_filter_pck_set_byte_offset. More...
 
 roll
 Roll info - see gf_filter_pck_get_roll_info and gf_filter_pck_set_roll_info. More...
 
 crypt
 Encryption flags - see gf_filter_pck_get_crypt_flags and gf_filter_pck_set_crypt_flags. More...
 
 clock
 Clock reference flag - see gf_filter_pck_get_clock_type and gf_filter_pck_set_clock_type. More...
 
 carousel
 Carousel version - see gf_filter_pck_get_carousel_version and gf_filter_pck_set_carousel_version. More...
 
 seqnum
 Sequence number - see gf_filter_pck_get_seq_num and gf_filter_pck_set_seq_num. More...
 
 deps
 Dependency flags - see gf_filter_pck_get_dependency_flags and gf_filter_pck_set_dependency_flags. More...
 
 frame_ifce
 true if packet holds a GF_FrameInterface object and not a data packet, readonly More...
 
 frame_ifce_gl
 true if packet holds a GF_FrameInterface object providing OpenGL only access and not a data packet, readonly More...
 
 has_properties
 Custom properties present, readonly - see gf_filter_pck_has_properties. More...
 
 blocking_ref
 true if packet is a blocking reference, readonly - see gf_filter_pck_is_blocking_ref More...
 

Member Function Documentation

◆ enum_props()

def python.libgpac.libgpac.FilterPacket.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
Returns

◆ get_prop()

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

◆ ref()

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

◆ unref()

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

◆ discard()

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

◆ 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.

Parameters
cached_pckif set, will be reuse for creation of new packet. This can greatly reduce memory allocations
Returns
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)
Returns

◆ send()

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

◆ copy_props()

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

◆ set_prop()

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

◆ truncate()

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

◆ get_gl_texture()

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

Field Documentation

◆ dts

python.libgpac.libgpac.FilterPacket.dts
static

◆ cts

python.libgpac.libgpac.FilterPacket.cts
static

◆ sap

python.libgpac.libgpac.FilterPacket.sap
static

◆ dur

python.libgpac.libgpac.FilterPacket.dur
static

◆ size

python.libgpac.libgpac.FilterPacket.size
static

◆ data

python.libgpac.libgpac.FilterPacket.data
static

◆ start

python.libgpac.libgpac.FilterPacket.start
static

◆ end

python.libgpac.libgpac.FilterPacket.end
static

◆ timescale

python.libgpac.libgpac.FilterPacket.timescale
static

◆ interlaced

python.libgpac.libgpac.FilterPacket.interlaced
static

◆ corrupted

python.libgpac.libgpac.FilterPacket.corrupted
static

◆ seek

python.libgpac.libgpac.FilterPacket.seek
static

◆ byte_offset

python.libgpac.libgpac.FilterPacket.byte_offset
static

◆ roll

python.libgpac.libgpac.FilterPacket.roll
static

◆ crypt

python.libgpac.libgpac.FilterPacket.crypt
static

◆ clock

python.libgpac.libgpac.FilterPacket.clock
static

◆ carousel

python.libgpac.libgpac.FilterPacket.carousel
static

◆ seqnum

python.libgpac.libgpac.FilterPacket.seqnum
static

◆ deps

python.libgpac.libgpac.FilterPacket.deps
static

◆ frame_ifce

python.libgpac.libgpac.FilterPacket.frame_ifce
static

◆ frame_ifce_gl

python.libgpac.libgpac.FilterPacket.frame_ifce_gl
static

◆ has_properties

python.libgpac.libgpac.FilterPacket.has_properties
static

◆ blocking_ref

python.libgpac.libgpac.FilterPacket.blocking_ref
static