Exemplo n.º 1
0
        private void CheckVideoResolutionChanges()
        {
            if (videoWin == null || basicVideo == null)
            {
                return;
            }
            int aspectX, aspectY;
            int videoWidth = 1, videoHeight = 1;

            if (basicVideo != null)
            {
                basicVideo.GetVideoSize(out videoWidth, out videoHeight);
            }
            aspectX = videoWidth;
            aspectY = videoHeight;
            if (basicVideo != null)
            {
                basicVideo.GetPreferredAspectRatio(out aspectX, out aspectY);
            }
            if (videoHeight != m_iVideoHeight || videoWidth != m_iVideoWidth ||
                aspectX != m_aspectX || aspectY != m_aspectY)
            {
                _updateNeeded = true;
                SetVideoWindow();
            }
        }
Exemplo n.º 2
0
        void TestGetPreferredAspectRatio()
        {
            int hr;
            int x, y;

            hr = m_ibv.GetPreferredAspectRatio(out x, out y);
            DsError.ThrowExceptionForHR(hr);

            Debug.Assert(x == 320, "aspectX");
            Debug.Assert(y == 240, "aspectY");
        }
Exemplo n.º 3
0
        public override void GetNativeVideoSize(out int width, out int height, out int arWidth, out int arHeight)
        {
            if (!_initialized)
            {
                Initialize(GraphBuilder, MediaWindowHandle);
                _initialized = true;
            }

            BasicVideo2.GetVideoSize(out width, out height);
            BasicVideo2.GetPreferredAspectRatio(out arWidth, out arHeight);
        }