mp.Packet

The basic data flow unit of MediaPipe. A generic container class which can hold data of any type.

A packet consists of a numeric timestamp and a shared pointer to an immutable payload. The payload can be of any C++ type (See packet_creator module for the list of the Python types that are supported). The payload's type is also referred to as the type of the packet. Packets are value classes and can be copied and moved cheaply. Each copy shares ownership of the payload, with be copied reference-counting semantics. Each copy has its own timestamp.

The preferred method of creating a Packet is to invoke the methods in the "packet_creator" module. Packet contents can be retrieved by the methods in the "packet_getter" module.

timestamp

Methods

at

at(*args, **kwargs) Overloaded function.

  1. at(self: mediapipe.python._framework_bindings.packet.Packet, arg0: int) -> mediapipe.python._framework_bindings.packet.Packet

  2. at(self: mediapipe.python._framework_bindings.packet.Packet, arg0: mediapipe.python._framework_bindings.timestamp.Timestamp) -> mediapipe.python._framework_bindings.packet.Packet

is_empty

is_empty(self: mediapipe.python._framework_bindings.packet.Packet) -> bool

Return true iff the Packet has been created using the default constructor Packet(), or is a copy of such a Packet.