mp.packet_creator.create_string

create_string(*args, **kwargs)

Overloaded function.

  1. create_string(arg0: str) -> mediapipe.python._framework_bindings.packet.Packet

Create a MediaPipe string Packet from a str.

Args: data: A str.

Returns: A MediaPipe string Packet.

Raises: TypeError: If the input is not a str.

Examples: packet = mp.packet_creator.create_string('abc') data = mp.packet_getter.get_string(packet)

  1. create_string(arg0: bytes) -> mediapipe.python._framework_bindings.packet.Packet

Create a MediaPipe string Packet from a bytes object.

Args: data: A bytes object.

Returns: A MediaPipe string Packet.

Raises: TypeError: If the input is not a bytes object.

Examples: packet = mp.packet_creator.create_string(b'\xd0\xd0\xd0') data = mp.packet_getter.get_bytes(packet)