mp.tasks.vision.drawing_styles.face_landmarker.mediapipe_c_utils.CStatusFunction

Stores the ctypes signature for a status-returning C function.

Inherits From: CFunction

The functions is required to take an error message argument as the last argument and return an `MpStatus' integer code.

func_name The name of the C function.
core_argtypes The ctypes types for the function arguments excluding the error message argument.

func_name Dataclass field
argtypes Dataclass field
restype Dataclass field

Methods

create_python_wrapper

View source

Creates a callable wrapper that executes the C function on the executor.

This function raises a Python exception based on the MpStatus code returned by the C API function and the error message argument.

Args
lib The ctypes shared library.
executor The executor to use for the C function.

Returns
A callable that executes the C function on the executor.

__eq__