Published by Roman on 09 Oct 2009 at 07:04 pm
How to use windowless Video Mixing Renderer Filter to show video fullscreen
The question is being asked from time to time. Everyone knows what is full screen video. Video renderers implement full screen capability since long ago through their IVideoWindow::put_FullScreenMode property, and even Filter Graph Manager exposes its own IVideoWindow interface to forward calls to filter’s implementation of IVideoWindow interface.
However, for Video Mixing Renderers, version 7 and 9, the preferred and recommended mode is windowless, where no IVideoWindow interface is available.
Note The IVMRWindowlessControl or IVMRWindowlessControl9 interface is now preferred over IVideoWindow. For more information, see Using Windowless Mode.
So in order to implement full screen mode it takes the application to attach Video Mixing Renderer filter to a private frameless window, to its entire client area and expand the window to entire monitor area.
The sample project FullScreenWindowlessVmrSample01 is illustrating this technique.

Main application dialog owns a special window to host renderer, implemented by CRendererDialog class.
class CRendererDialog : public CDialogImpl<CRendererDialog> { public: enum { IDD = IDD_RENDERER }; BEGIN_MSG_MAP_EX(CRendererDialog) MSG_WM_INITDIALOG(OnInitDialog) MSG_WM_DESTROY(OnDestroy) MSG_WM_ERASEBKGND(OnEraseBkgnd) MSG_WM_PAINT(OnPaint) MSG_WM_DISPLAYCHANGE(OnDisplayChange) MSG_WM_KEYDOWN(OnKeyDown) COMMAND_ID_HANDLER_EX(IDCANCEL, OnCancel) END_MSG_MAP() private: CMainDialog& m_Owner; //...
The dialog template does not have a caption, it has no frame and has its window rectangle equal to client area. As a result, spanning the Video Mixing Renderer to the entire client area and proper positioning of the dialog window is showing video on the entire monitor.
ATLVERIFY(m_RendererDialog.Create(m_hWnd)); ATLVERIFY(m_RendererDialog.MoveWindow(MonitorData.m_Position)); m_RendererDialog.ShowWindow(SW_SHOWNORMAL); // ... ATLENSURE_SUCCEEDED(pVmrWindowlessControl->SetVideoClippingWindow(m_RendererDialog)); ATLENSURE_SUCCEEDED(pVmrWindowlessControl->SetVideoPosition(NULL, m_RendererDialog.GetVideoPosition()));
Visual C++ .NET 2008 source code is available from SVN, release binary included. The project is using ATL and WTL libraries.
Tags: DirectShow, fullscreen, IVideoWidow, IVMRWindowlessControl, renderer, sample, Source, Video, VMR, windowless
One Response to “How to use windowless Video Mixing Renderer Filter to show video fullscreen”
Leave a Reply
You must be logged in to post a comment.

Roman on 28 Oct 2009 at 13:29 #
Since there is no clock.avi on Windows 7, the application looks for an .AVI file in the following order:
It might be required to provide an .AVI file for the application to start working.