RenderDeviceD3D::~RenderDeviceD3D() { m_Swapchain->SetFullscreenState(FALSE, NULL); uninitialize(); destroyDevice(); }
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); }
void VideoDecoderD3DPrivate::close() { if (codec_ctx) codec_ctx->hwaccel_context = NULL; qDeleteAll(surfaces); surfaces.clear(); restore(); releaseUSWC(); destroyDecoder(); destroyDevice(); }
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; }
/* 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(); }