PleoraVideo::~PleoraVideo() { Stop(); DeinitBuffers(); DeinitStream(); DeinitDevice(); }
void PleoraVideo::InitStream() { // Setup Stream PvResult lResult; lStream = PvStream::CreateAndOpen( lDeviceInfo->GetConnectionID(), &lResult ); if ( !lStream ) { DeinitDevice(); throw pangolin::VideoException("Pleora: Unable to open stream", lResult.GetDescription().GetAscii() ); } lStreamParams = lStream->GetParameters(); }
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // Set current directory to module directory wchar_t imagePath[MAX_PATH]; GetModuleFileName(NULL, imagePath, MAX_PATH); size_t pathLen = wcslen(imagePath); wchar_t* pathEnd = imagePath + pathLen - 1; while (pathEnd >= imagePath && (*pathEnd != L'\\' && *pathEnd != L'/')) --pathEnd; if (pathEnd >= imagePath) *pathEnd++ = 0; SetCurrentDirectory(imagePath); InitWindow(hInstance, nCmdShow); InitDevice(); InitFlash(); ShowWindow(hWnd, nCmdShow); while(true) { MSG msg; if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) != 0) { if(msg.message == WM_QUIT) break; else { TranslateMessage(&msg); DispatchMessage(&msg); } } else { DrawFrame(); } } DeinitFlash(); DeinitDevice(); // UnregisterClass(wc.lpszClassName, hInstance); return 0; }