Exemplo n.º 1
0
        void TestDestinationPos()
        {
            int hr;
            int sl, st, sw, sh;

            hr = m_ibv.SetDestinationPosition(4, 4, 200, 210);
            DsError.ThrowExceptionForHR(hr);

            hr = m_ibv.GetDestinationPosition(out sl, out st, out sw, out sh);
            DsError.ThrowExceptionForHR(hr);

            Debug.Assert(sl == 4, "SetDestinationPositionL");
            Debug.Assert(st == 4, "SetDestinationPositiont");
            Debug.Assert(sw == 200, "SetDestinationPositionw");
            Debug.Assert(sh == 210, "SetDestinationPositionh");
        }
Exemplo n.º 2
0
        public override void Process()
        {
            if (!Playing)
            {
                return;
            }
            if (!m_bStarted)
            {
                return;
            }
            if (GUIGraphicsContext.InVmr9Render)
            {
                return;
            }
            TimeSpan ts = DateTime.Now - updateTimer;

            if (ts.TotalMilliseconds >= 800 || m_speedRate != 1)
            {
                UpdateCurrentPosition();
                updateTimer = DateTime.Now;
                if (GUIGraphicsContext.BlankScreen ||
                    (GUIGraphicsContext.Overlay == false && GUIGraphicsContext.IsFullScreenVideo == false))
                {
                    if (GUIGraphicsContext.IsWindowVisible)
                    {
                        GUIGraphicsContext.IsWindowVisible = false;
                        if (videoWin != null && GUIGraphicsContext.VideoRenderer != GUIGraphicsContext.VideoRendererType.madVR)
                        {
                            videoWin.put_Visible(OABool.False);
                        }
                        else
                        {
                            GUIGraphicsContext.VideoWindow = new Rectangle(-1, -1, 0, 0);
                            if (basicVideo != null)
                            {
                                if (!GUIGraphicsContext.IsFullScreenVideo)
                                {
                                    basicVideo.SetDestinationPosition(-100, -100, 50, 50);
                                }
                            }
                        }
                    }
                }
                else if (!GUIGraphicsContext.IsWindowVisible)
                {
                    GUIGraphicsContext.IsWindowVisible = true;
                    if (videoWin != null && GUIGraphicsContext.VideoRenderer != GUIGraphicsContext.VideoRendererType.madVR)
                    {
                        videoWin.put_Visible(OABool.True);
                    }
                    else
                    {
                        GUIGraphicsContext.VideoWindow = new Rectangle(0, 0, GUIGraphicsContext.VideoWindowWidth,
                                                                       GUIGraphicsContext.VideoWindowHeight);
                    }
                }

                CheckVideoResolutionChanges();
                updateTimer = DateTime.Now;
            }
            if (m_speedRate != 1)
            {
                DoFFRW();
            }
            OnProcess();
        }