Ejemplo n.º 1
0
        // VMR windowed behaves like a real windowed renderer, i.e. it must be configured after the video is rendered (compare with VMR9 windowed)
        protected override void Initialize(IGraphBuilder pGraphBuilder, IntPtr hMediaWindow)
        {
            base.Initialize(pGraphBuilder, hMediaWindow);

            IVMRAspectRatioControl pVMRAspectRatioControl = (IVMRAspectRatioControl)BaseFilter; // will be released when we release IBaseFilter

            pVMRAspectRatioControl.SetAspectRatioMode(VMR_ASPECT_RATIO_MODE.VMR_ARMODE_NONE);
        }
Ejemplo n.º 2
0
        public void TestAspectRatioMode()
        {
            int hr = 0;
            VMRAspectRatioMode ar;

            hr = arControl.SetAspectRatioMode(VMRAspectRatioMode.LetterBox);
            DsError.ThrowExceptionForHR(hr);

            hr = arControl.GetAspectRatioMode(out ar);
            DsError.ThrowExceptionForHR(hr);

            Debug.Assert(ar == VMRAspectRatioMode.LetterBox, "IVMRAspectRatioControl.GetAspectRatioMode");

            hr = arControl.SetAspectRatioMode(VMRAspectRatioMode.None);
            DsError.ThrowExceptionForHR(hr);

            hr = arControl.GetAspectRatioMode(out ar);
            DsError.ThrowExceptionForHR(hr);

            Debug.Assert(ar == VMRAspectRatioMode.None, "IVMRAspectRatioControl.GetAspectRatioMode");
        }
Ejemplo n.º 3
0
        // TODO : Implment Strech
        // TODO : Implement Mute
        void ApplySettings(SourceSettings sourceSettings, AudioSettings audioSettings)
        {
            VMRAspectRatioMode aspectRatioMode = sourceSettings.SourceAspectFit == SourceAspectFit.LetterBox ?
                                                 VMRAspectRatioMode.LetterBox :
                                                 VMRAspectRatioMode.None;

            if (aspectRatioControl != null)
            {
                aspectRatioControl.SetAspectRatioMode(aspectRatioMode);
            }
            if (aspectRatioControl9 != null)
            {
                aspectRatioControl9.SetAspectRatioMode(aspectRatioMode);
            }
        }