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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-01 UTC."],[],[],null,["# mp.Packet\n\n\u003cbr /\u003e\n\nThe basic data flow unit of MediaPipe. A generic container class which can hold data of any type.\n\n#### View aliases\n\n\n**Main aliases**\n\n[`mp.packet_creator.packet.Packet`](https://ai.google.dev/edge/api/mediapipe/python/edge/api/mediapipe/python/mp/Packet), [`mp.packet_getter.mp_packet.Packet`](https://ai.google.dev/edge/api/mediapipe/python/edge/api/mediapipe/python/mp/Packet), [`mp.tasks.vision.holistic_landmarker.base_vision_task_api.packet_module.Packet`](https://ai.google.dev/edge/api/mediapipe/python/edge/api/mediapipe/python/mp/Packet), [`mp.tasks.vision.holistic_landmarker.packet_creator.packet.Packet`](https://ai.google.dev/edge/api/mediapipe/python/edge/api/mediapipe/python/mp/Packet), [`mp.tasks.vision.holistic_landmarker.packet_getter.mp_packet.Packet`](https://ai.google.dev/edge/api/mediapipe/python/edge/api/mediapipe/python/mp/Packet), [`mp.tasks.vision.holistic_landmarker.packet_module.Packet`](https://ai.google.dev/edge/api/mediapipe/python/edge/api/mediapipe/python/mp/Packet)\n\n\u003cbr /\u003e\n\n mp.Packet()\n\nA packet consists of a numeric timestamp and a shared pointer to an immutable\npayload. The payload can be of any C++ type (See packet_creator module for\nthe list of the Python types that are supported). The payload's type is also\nreferred to as the type of the packet. Packets are value classes and can be\ncopied and moved cheaply. Each copy shares ownership of the payload, with be\ncopied reference-counting semantics. Each copy has its own timestamp.\n\nThe preferred method of creating a Packet is to invoke the methods in the\n\"packet_creator\" module. Packet contents can be retrieved by the methods in\nthe \"packet_getter\" module.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|-------------|---------------|\n| `timestamp` | \u003cbr /\u003e \u003cbr /\u003e |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `at`\n\n at()\n\nat(\\*args, \\*\\*kwargs)\nOverloaded function.\n\n1. at(self: mediapipe.python._framework_bindings.packet.Packet, arg0: int) -\\\u003e mediapipe.python._framework_bindings.packet.Packet\n\n2. at(self: mediapipe.python._framework_bindings.packet.Packet, arg0: mediapipe.python._framework_bindings.timestamp.Timestamp) -\\\u003e mediapipe.python._framework_bindings.packet.Packet\n\n### `is_empty`\n\n is_empty()\n\nis_empty(self: mediapipe.python._framework_bindings.packet.Packet) -\\\u003e bool\n\nReturn true iff the Packet has been created using the default constructor Packet(), or is a copy of such a Packet."]]