private void SetAspectRatio(VideoFiles.AspectRatio _aspectRatio, Size _size) { m_AspectRatio = _aspectRatio; if (m_FrameGrabber.IsConnected) { int newHeight; switch (_aspectRatio) { case AspectRatio.AutoDetect: default: newHeight = _size.Height; break; case AspectRatio.Force43: newHeight = (_size.Width / 4) * 3; break; case AspectRatio.Force169: newHeight = (_size.Width / 16) * 9; break; } m_ImageSize = new Size(_size.Width, newHeight); m_CoordinateSystem.SetOriginalSize(m_ImageSize); m_Container.DoInitDecodingSize(); } }
public FrameServerCapture() { m_FrameGrabber = new FrameGrabberAForge(this, m_FrameBuffer); m_AspectRatio = (VideoFiles.AspectRatio)((int)PreferencesManager.Instance().AspectRatio); IntPtr forceHandleCreation = m_DummyControl.Handle; // Needed to show that the main thread "owns" this Control. m_EventFrameGrabbed = FrameGrabbed_Invoked; }
public FrameServerCapture() { m_FrameGrabber = new FrameGrabberAForge(this, m_FrameBuffer); m_AspectRatio = (VideoFiles.AspectRatio)((int)PreferencesManager.Instance().AspectRatio); }