Ejemplo n.º 1
0
        public void Load()
        {
            m_Module = DllImport.LoadLibrary("PeachCam.dll");
            if (m_Module == IntPtr.Zero)
            {
                return;
            }

            m_Start = DllImport.GetFunction <TStart>(m_Module, "Start");
            m_Stop  = DllImport.GetFunction <TStop>(m_Module, "Stop");
            m_ARGB8888FromARGB4444         = DllImport.GetFunction <TARGB8888FromARGB4444>(m_Module, "ARGB8888FromARGB4444");
            m_ARGB8888FromYCBCR422         = DllImport.GetFunction <TARGB8888FromYCBCR422>(m_Module, "ARGB8888FromYCBCR422");
            m_videoio_VideoCapture_new1    = DllImport.GetFunction <Tvideoio_VideoCapture_new1>(m_Module, "videoio_VideoCapture_new1");
            m_videoio_VideoCapture_open2   = DllImport.GetFunction <Tvideoio_VideoCapture_open2>(m_Module, "videoio_VideoCapture_open2");
            m_videoio_VideoCapture_release = DllImport.GetFunction <Tvideoio_VideoCapture_release>(m_Module, "videoio_VideoCapture_release");
            m_videoio_VideoCapture_delete  = DllImport.GetFunction <Tvideoio_VideoCapture_delete>(m_Module, "videoio_VideoCapture_delete");
            m_VideoCapture_Capture         = DllImport.GetFunction <TVideoCapture_Capture>(m_Module, "VideoCapture_Capture");
            m_Stdin = DllImport.GetFunction <TStdin>(m_Module, "Stdin");

            if (m_Start == null)
            {
                var module = m_Module;
                m_Module = IntPtr.Zero;
                DllImport.FreeLibrary(module);
                return;
            }
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
            var module = m_InitModule;

            m_InitModule = IntPtr.Zero;
            DllImport.FreeLibrary(module);
        }
Ejemplo n.º 3
0
        public PeachCam()
        {
            m_InitModule = DllImport.LoadLibrary("TestBenchInit.dll");
            if (m_InitModule == IntPtr.Zero)
            {
                return;
            }

            m_SetTestBench     = DllImport.GetFunction <TSetTestBench>(m_InitModule, "SetTestBench");
            m_EnumerateDevices = DllImport.GetFunction <TEnumerateDevices>(m_InitModule, "EnumerateDevices");
            m_OpenMpsse        = DllImport.GetFunction <TOpenMpsse>(m_InitModule, "OpenMpsse");

            if (m_SetTestBench == null)
            {
                var module = m_InitModule;
                m_InitModule = IntPtr.Zero;
                DllImport.FreeLibrary(module);
                return;
            }
        }