Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
| import ctypes | |
| from ctypes_enum import CtypesEnum | |
| EVE_ENCODING_SIZE = 9 | |
| EVE_LOCATION_SIZE = 2 | |
| class EveVideoFormat(CtypesEnum): | |
| EVE_NONE = 0 | |
| EVE_BGRA = 1 | |
| EVE_YUY2 = 2 | |
| EVE_NV12 = 3 | |
| EVE_MJPG = 4 | |
| EVE_BGR = 5 | |
| EVE_GRAYSCALE = 6 | |
| EVE_RGBA = 7 | |
| EVE_RGB = 8 | |
| EVE_ENCODING_SIZE = 9 | |
| class EveImageLocation(CtypesEnum): | |
| EVE_CPU = 0 | |
| EVE_GPU = 1 | |
| EVE_LOCATION_SIZE = 2 | |
| class CPoint2i(ctypes.Structure): | |
| _fields_ = [ | |
| ("x", ctypes.c_int), | |
| ("y", ctypes.c_int), | |
| ] | |
| class CPoint2f(ctypes.Structure): | |
| _fields_ = [ | |
| ("x", ctypes.c_float), | |
| ("y", ctypes.c_float), | |
| ] | |
| class CPoint3i(ctypes.Structure): | |
| _fields_ = [ | |
| ("x", ctypes.c_int), | |
| ("y", ctypes.c_int), | |
| ("z", ctypes.c_int), | |
| ] | |
| class CPoint3f(ctypes.Structure): | |
| _fields_ = [ | |
| ("x", ctypes.c_float), | |
| ("y", ctypes.c_float), | |
| ("z", ctypes.c_float), | |
| ] | |
| class CAngles3f(ctypes.Structure): | |
| _fields_ = [ | |
| ("pitch", ctypes.c_float), | |
| ("yaw", ctypes.c_float), | |
| ("roll", ctypes.c_float), | |
| ] | |
| class CRect2i(ctypes.Structure): | |
| _fields_ = [ | |
| ("left", ctypes.c_int), | |
| ("top", ctypes.c_int), | |
| ("right", ctypes.c_int), | |
| ("bottom", ctypes.c_int), | |
| ] | |
| class CRect2iWH(ctypes.Structure): | |
| _fields_ = [ | |
| ("x", ctypes.c_int), | |
| ("y", ctypes.c_int), | |
| ("width", ctypes.c_int), | |
| ("height", ctypes.c_int), | |
| ] | |
| class CRect2fWH(ctypes.Structure): | |
| _fields_ = [ | |
| ("x", ctypes.c_float), | |
| ("y", ctypes.c_float), | |
| ("width", ctypes.c_float), | |
| ("height", ctypes.c_float), | |
| ] | |
| class CResolution(ctypes.Structure): | |
| _fields_ = [ | |
| ("width", ctypes.c_uint), | |
| ("height", ctypes.c_uint), | |
| ] | |
| class CStringData(ctypes.Structure): | |
| _fields_ = [ | |
| ("data", ctypes.POINTER(ctypes.c_byte)), | |
| ("size", ctypes.c_ulonglong), | |
| ] | |