//////////////// /// GetMinIdealImageSize GetMaxIdealImageSize private void TestGetIdealSize() { int hr; int Width1; int Height1; // The graph must be running to read these IMediaControl mediaCtrl = m_graphBuilder as IMediaControl; hr = mediaCtrl.Run(); Marshal.ThrowExceptionForHR(hr); // No particular way to check it. Just read it hr = m_ivw.GetMinIdealImageSize(out Width1, out Height1); Marshal.ThrowExceptionForHR(hr); // No particular way to check it. Just read it hr = m_ivw.GetMaxIdealImageSize(out Width1, out Height1); Marshal.ThrowExceptionForHR(hr); // Don't need to leave this running hr = mediaCtrl.Stop(); Marshal.ThrowExceptionForHR(hr); mediaCtrl = null; }
private void GetMaxIdealImageSize(out int width, out int height) { width = height = 0; try { if (videoWindow != null) { videoWindow.GetMaxIdealImageSize(out width, out height); } } catch { } }