bool DirectShowVideoWrapper::unpause(void) { if(isInitialized() && isPaused()) { HRESULT hr; TCHAR szErr[MAX_ERROR_TEXT_LEN]; CComPtr<IMediaControl> mediaControl; hr = _pGraphBuilder->QueryInterface(&mediaControl); if (FAILED(hr)) { AMGetErrorText(hr, szErr, MAX_ERROR_TEXT_LEN); SWARNING << "Unable to get media control, error: " << szErr << std::endl; return false; } hr = mediaControl->Run(); if (FAILED(hr)) { AMGetErrorText(hr, szErr, MAX_ERROR_TEXT_LEN); SWARNING << "Unable to run filter graph, error: " << szErr << std::endl; return false; } produceUnpaused(); return true; } else { return false; } }
bool VLCVideoWrapper::unpause(void) { if(isPaused()) // don't need to unpause if it's not paused { libvlc_media_player_play(_MediaPlayer); // error checking checkVLCError("unpausing"); } if(!isPaused()) { produceUnpaused(); return true; } else { return false; } }