示例#1
0
        private static RendererBase GetRenderer(Renderer preferredVideoRenderer)
        {
            // switch for now
            RendererBase renderer;

            switch (preferredVideoRenderer)
            {
            case Renderer.VMR_Windowed:
                renderer = new VMRWindowed();
                break;

            case Renderer.VMR_Windowless:
                renderer = new VMRWindowless();
                break;

            case Renderer.VMR9_Windowed:
                renderer = new VMR9Windowed();
                break;

            case Renderer.VMR9_Windowless:
                renderer = new VMR9Windowless();
                break;

            case Renderer.EVR:
                renderer = new EVR();
                break;

            default:
                renderer = new VideoRenderer();
                break;
            }
            return(renderer);
        }
示例#2
0
        public static RendererBase GetRenderer(Guid ClsId)
        {
            RendererBase renderer = null;

            if (ClsId == Clsid.VideoRenderer)
            {
                renderer = new VideoRenderer();
            }
            else if (ClsId == Clsid.VideoMixingRenderer)
            {
                renderer = new VMRWindowed(); // by default VMR operates in windowed mode with a single video stream, also called compatibility mode
            }
            else if (ClsId == Clsid.VideoMixingRenderer9)
            {
                renderer = new VMR9Windowed(); // VMR-9 defaults to windowed mode with four input pins
            }
            else if (ClsId == Clsid.EnhancedVideoRenderer)
            {
                renderer = new EVR(); // EVR is windowless with 1 input pin
            }
            return(renderer);
        }