![]() |
libgpac
Documentation of the core library of GPAC
|
filter packet object More...
Public Member Functions | |
| enum_props (self, callback_obj) | |
| enumerate an packet properties | |
| get_prop (self, prop_name) | |
| get a packet property - see gf_filter_pck_get_property and gf_filter_pck_get_property_str | |
| ref (self) | |
| increase packet reference count - see gf_filter_pck_ref_ex | |
| unref (self) | |
| decrease packet reference count - see gf_filter_pck_unref | |
| discard (self) | |
| discard an output packet instead of sending it - see gf_filter_pck_discard | |
| clone (self, cached_pck=None) | |
| creates a new packet cloning a source packet - see gf_filter_pck_dangling_copy. | |
| readonly (self) | |
| mark an output packet as readonly - see gf_filter_pck_set_readonly | |
| send (self) | |
| send the packet - see gf_filter_pck_send | |
| copy_props (self, ipck) | |
| copy properties of source packet in this packet - see gf_filter_pck_merge_properties | |
| 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 | |
| truncate (self, size) | |
| truncates an output packet to the given size - see gf_filter_pck_truncate | |
| get_gl_texture (self, idx) | |
| return OpenGL texture info for a given color plane of a frame interface packet | |
Static Public Attributes | |
| dts | |
| Decode Timestamp - see gf_filter_pck_get_dts and gf_filter_pck_set_dts. | |
| cts | |
| Compose Timestamp - see gf_filter_pck_get_cts and gf_filter_pck_set_cts. | |
| sap | |
| SAP type - see gf_filter_pck_get_sap and gf_filter_pck_set_sap. | |
| dur | |
| Duration - see gf_filter_pck_get_duration and gf_filter_pck_set_duration. | |
| size | |
| Size of packet data, readonly. | |
| 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. | |
| start | |
| frame start - see gf_filter_pck_get_framing and gf_filter_pck_set_framing | |
| end | |
| frame end - see gf_filter_pck_get_framing and gf_filter_pck_set_framing | |
| timescale | |
| associated timescale, readonly - see gf_filter_pck_get_timescale | |
| interlaced | |
| Interlaced flags - see gf_filter_pck_get_interlaced and gf_filter_pck_set_interlaced. | |
| corrupted | |
| Corrupted flag - see gf_filter_pck_get_corrupted and gf_filter_pck_set_corrupted. | |
| seek | |
| Seek flag - see gf_filter_pck_get_seek_flag and gf_filter_pck_set_seek_flag. | |
| byte_offset | |
| Byte offset - see gf_filter_pck_get_byte_offset and gf_filter_pck_set_byte_offset. | |
| roll | |
| Roll info - see gf_filter_pck_get_roll_info and gf_filter_pck_set_roll_info. | |
| crypt | |
| Encryption flags - see gf_filter_pck_get_crypt_flags and gf_filter_pck_set_crypt_flags. | |
| clock | |
| Clock reference flag - see gf_filter_pck_get_clock_type and gf_filter_pck_set_clock_type. | |
| carousel | |
| Carousel version - see gf_filter_pck_get_carousel_version and gf_filter_pck_set_carousel_version. | |
| seqnum | |
| Sequence number - see gf_filter_pck_get_seq_num and gf_filter_pck_set_seq_num. | |
| deps | |
| Dependency flags - see gf_filter_pck_get_dependency_flags and gf_filter_pck_set_dependency_flags. | |
| frame_ifce | |
| true if packet holds a GF_FrameInterface object and not a data packet, readonly | |
| frame_ifce_gl | |
| true if packet holds a GF_FrameInterface object providing OpenGL only access and not a data packet, readonly | |
| has_properties | |
| Custom properties present, readonly - see gf_filter_pck_has_properties. | |
| blocking_ref | |
| true if packet is a blocking reference, readonly - see gf_filter_pck_is_blocking_ref | |
Protected Attributes | |
| _pck | |
| _is_src | |
filter packet object
| python.libgpac.libgpac.FilterPacket.enum_props | ( | self, | |
| callback_obj ) |
enumerate an packet properties
| callback_obj | callback object to use, must have a 'on_prop_enum' method defined taking two parameters, prop_name(string) and propval |
| python.libgpac.libgpac.FilterPacket.get_prop | ( | self, | |
| prop_name ) |
get a packet property - see gf_filter_pck_get_property and gf_filter_pck_get_property_str
| prop_name | name of property to get |
| python.libgpac.libgpac.FilterPacket.ref | ( | self | ) |
increase packet reference count - see gf_filter_pck_ref_ex
| python.libgpac.libgpac.FilterPacket.unref | ( | self | ) |
decrease packet reference count - see gf_filter_pck_unref
| python.libgpac.libgpac.FilterPacket.discard | ( | self | ) |
discard an output packet instead of sending it - see gf_filter_pck_discard
| python.libgpac.libgpac.FilterPacket.clone | ( | self, | |
| cached_pck = None ) |
creates a new packet cloning a source packet - see gf_filter_pck_dangling_copy.
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_pck | if set, will be reuse for creation of new packet. This can greatly reduce memory allocations |
| python.libgpac.libgpac.FilterPacket.readonly | ( | self | ) |
mark an output packet as readonly - see gf_filter_pck_set_readonly
| python.libgpac.libgpac.FilterPacket.send | ( | self | ) |
send the packet - see gf_filter_pck_send
| python.libgpac.libgpac.FilterPacket.copy_props | ( | self, | |
| ipck ) |
copy properties of source packet in this packet - see gf_filter_pck_merge_properties
| ipck | source packet |
| python.libgpac.libgpac.FilterPacket.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
| pcode | name of property |
| prop | property value |
| custom_type | type of property if user-defined property. If not set and user-defined, property is a string |
| python.libgpac.libgpac.FilterPacket.truncate | ( | self, | |
| size ) |
truncates an output packet to the given size - see gf_filter_pck_truncate
| size | new size of packet |
| python.libgpac.libgpac.FilterPacket.get_gl_texture | ( | self, | |
| idx ) |
return OpenGL texture info for a given color plane of a frame interface packet
| idx | index of texture to fetch. The number of texture depends on the underlying pixel format |
|
static |
Decode Timestamp - see gf_filter_pck_get_dts and gf_filter_pck_set_dts.
|
static |
Compose Timestamp - see gf_filter_pck_get_cts and gf_filter_pck_set_cts.
|
static |
SAP type - see gf_filter_pck_get_sap and gf_filter_pck_set_sap.
|
static |
Duration - see gf_filter_pck_get_duration and gf_filter_pck_set_duration.
|
static |
Size of packet data, readonly.
|
static |
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.
|
static |
frame start - see gf_filter_pck_get_framing and gf_filter_pck_set_framing
|
static |
frame end - see gf_filter_pck_get_framing and gf_filter_pck_set_framing
|
static |
associated timescale, readonly - see gf_filter_pck_get_timescale
|
static |
Interlaced flags - see gf_filter_pck_get_interlaced and gf_filter_pck_set_interlaced.
|
static |
Corrupted flag - see gf_filter_pck_get_corrupted and gf_filter_pck_set_corrupted.
|
static |
Seek flag - see gf_filter_pck_get_seek_flag and gf_filter_pck_set_seek_flag.
|
static |
Byte offset - see gf_filter_pck_get_byte_offset and gf_filter_pck_set_byte_offset.
|
static |
Roll info - see gf_filter_pck_get_roll_info and gf_filter_pck_set_roll_info.
|
static |
Encryption flags - see gf_filter_pck_get_crypt_flags and gf_filter_pck_set_crypt_flags.
|
static |
Clock reference flag - see gf_filter_pck_get_clock_type and gf_filter_pck_set_clock_type.
|
static |
Carousel version - see gf_filter_pck_get_carousel_version and gf_filter_pck_set_carousel_version.
|
static |
Sequence number - see gf_filter_pck_get_seq_num and gf_filter_pck_set_seq_num.
|
static |
Dependency flags - see gf_filter_pck_get_dependency_flags and gf_filter_pck_set_dependency_flags.
|
static |
true if packet holds a GF_FrameInterface object and not a data packet, readonly
|
static |
true if packet holds a GF_FrameInterface object providing OpenGL only access and not a data packet, readonly
|
static |
Custom properties present, readonly - see gf_filter_pck_has_properties.
|
static |
true if packet is a blocking reference, readonly - see gf_filter_pck_is_blocking_ref
|
protected |
|
protected |