public void OpenOverlay(Guid gPresenter) { object o; if (m_ImageHandlers != null) { foreach (ImageHandler ih in m_ImageHandlers) { ih.Dispose(); } m_ImageHandlers = null; } m_ImageHandlers = new ImageHandler[2]; m_ImageHandlers[0] = new ImageFromPixels(30, new FourCC("YUY2"), 320, 240, 16); //m_ImageHandlers[0] = new ImageFromPixels(30, new FourCC(3), 320, 240, 32, 255); //m_ImageHandlers[0] = new ImageFromPixels(30, new FourCC("AYUV"), 320, 240, 32, 255); //m_ImageHandlers[0] = new ImageFromPixels(30, new FourCC("NV12"), 320, 240, 12, 255); //m_ImageHandlers[1] = new ImageFromText(30, new FourCC(3), 320, 240, 32); m_ImageHandlers[1] = new ImageFromText(30, new FourCC("AYUV"), 320, 240, 32); InitializeGraph(); SetupGraph(gPresenter); IMFGetService pGetService = (IMFGetService)m_pEVR; pGetService.GetService(MFServices.MR_VIDEO_MIXER_SERVICE, typeof(IMFVideoMixerControl).GUID, out o); m_pMixer = (IMFVideoMixerControl)o; pGetService.GetService(MFServices.MR_VIDEO_RENDER_SERVICE, typeof(IMFVideoPositionMapper).GUID, out o); m_pMapper = (IMFVideoPositionMapper)o; }