示例#1
0
RenderDeviceD3D::~RenderDeviceD3D()
{
	m_Swapchain->SetFullscreenState(FALSE, NULL);

	uninitialize();
	destroyDevice();
}
示例#2
0
void AkVCam::PluginInterface::deviceRemoved(void *userData,
                                            const std::string &deviceId)
{
    AkLoggerLog("AkVCam::PluginInterface::deviceRemoved");
    AkLoggerLog("Device Removed: ", deviceId);

    auto self = reinterpret_cast<PluginInterface *>(userData);
    self->destroyDevice(deviceId);
}
示例#3
0
void VideoDecoderD3DPrivate::close()
{
    if (codec_ctx)
        codec_ctx->hwaccel_context = NULL;
    qDeleteAll(surfaces);
    surfaces.clear();
    restore();
    releaseUSWC();
    destroyDecoder();
    destroyDevice();
}
示例#4
0
int main() {

    // Create the mouse device
    int fd = createDevice();
    if (fd < 0) {
        return EXIT_FAILURE;
    }

    // Start the server. The received data will be sent to the mouseHandler()
    // callback function
    if (0 != startServer(mouseHandler, (void *) &fd)) {
        return EXIT_FAILURE;
    }

    // Destroy the mouse device
    destroyDevice(fd);

    return EXIT_SUCCESS;
}
示例#5
0
/* Device termination function */
static void terminateDevice(MW_videoInfo_t *h)
{
	/* De-allocate buffers and close device file */
    if (h != NULL) {
#if (defined(MATLAB_MEX_FILE) || defined(RSIM_WITH_SL_SOLVER)) && defined(__linux__) 
	    if (h->simOutput == SIM_OUTPUT_LIVE_VIDEO) {
	        closeV4L2Device(h);
	    }
	    else {
		    closeSimDevice(h);
	    }
#elif (defined(MATLAB_MEX_FILE) || defined(RSIM_WITH_SL_SOLVER)) && !defined(__linux__)
	    closeSimDevice(h);
#else
	    /* We are generating code */
	    closeV4L2Device(h);
#endif
        if(h->devName) {
            free(h->devName);
        }
        destroyDevice(h);
    }
}
RenderWin32DX9Imp::~RenderWin32DX9Imp() {
    if( isDeviceCreated() )
        destroyDevice();
}