Multiple Windowless Video Mixing Renderers (VMR9) Sample

This is a begged MFC code for multiple windowless video renderers. MFC project, two independent video renderers hosted by the same parent window (actually through owned controls but this makes no major difference), VMR9 in windowless mode.

Image001

(this expects C:\Windows\clock.avi file to be available which is no longer the case after Windows XP – simply copy any AVI there as a replacement)

There are no WM_PAINT/WM_ERASEBKGND handlers, IVMRWindowlessControl9::RepaintVideo calls and other basically required code, instead a minimalistic snippet to make video rendered the requested way.

A Visual C++ .NET 2008 source code is available from SVN/Trac, release binary included.

One Reply to “Multiple Windowless Video Mixing Renderers (VMR9) Sample”

  1. It is worth to mention that with regular Visual Studio .NET 2008 it might go:

    Regrettably code didnīt compile. I just get a lot of error:
    ..\microsoft visual studio 9.0\vc\atlmfc\include\afxusertoolsmanager.h(73) : error C2146: syntax error : missing ‘;’ before identifier ‘CUserToolsManager’
    ..\microsoft visual studio 9.0\vc\atlmfc\include\afxusertoolsmanager.h(73) : error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
    ..\microsoft visual studio 9.0\vc\atlmfc\include\afxcontrolbarutil.h(56) : error C2144: syntax error : ‘int’ should be preceded by ‘;’
    […]

    and the solution is:

    You was right! I installed the Service Pack 1 and it works!
    Very cool! Thanks for providing this code! Iīm sure a lot of other people will be happy about that!

Leave a Reply