0x57: "Blue",
    0x7A: "Record",
    0x7B: "Play",
    0x7C: "Stop",
    0x52: "Info",
    0x7D: "Rewind",
    0x7E: "Pause",
    0x7F: "Forward",
    0x62: "Guide",
}

DEVICE_TYPES = [
    "Unknown", "Budget 2", "Budget 3", "USB 2", "USB 2 Pinnacle", "USB 2 DSS"
]

IRCALLBACKFUNC = CFUNCTYPE(None, c_int, POINTER(c_uint))


class TTIRBDA(eg.PluginBase):
    def __init__(self):
        pass

    def __close__(self):
        pass

    def __start__(self):
        self.dll = None
        self.handles = []
        self.contexts = []

        # Try opening DLL
示例#2
0
from eg.WinApi.Dynamic import (cdll, DWORD, POINTER, ULONG, HANDLE, BYTE,
                               c_void_p, c_int, CFUNCTYPE, CDLL)

USBIR_MODE_DIV = 2

# typedef void (*PIRCBFCN) (PVOID Context,
#                           PVOID Buf,
#                           ULONG len, // buffer length in bytes
#                           USBIR_MODES IRMode,
#                           HANDLE hOpen,
#                           BYTE DevIdx);
IRCALLBACKFUNC = CFUNCTYPE(
    c_void_p,  # return type
    c_void_p,  # Context
    POINTER(DWORD),  # Buf
    ULONG,  # len (buffer length in bytes)
    c_int,  # IRMode (of enum USBIR_MODES)
    HANDLE,  # hOpen
    BYTE  # DevIdx
)


class TTIR(eg.IrDecoderPlugin):
    def __init__(self):
        eg.IrDecoderPlugin.__init__(self, 1)

    def __close__(self):
        self.irDecoder.Close()

    def __start__(self):
        self.dll = None