Fog Creek Software
Discussion Board

DirectShow VMR9 Renderer

I've asked this on the Microsoft DirectX newsgroups, but figured I would try here:

I'm trying to draw on top of video in a ActiveX control that uses DirectX that I've developed. I'm rendering the video using the BmpMix9 example in the DirectX SDK, passing a DC for the surface that I'm trying to get to be displayed on the video, but it thinks that the parameters that I'm specifying are invalid.

I'm currently doing:

ZeroMemory(&alphaBitmap, sizeof(VMR9AlphaBitmap));

alphaBitmap.dwFlags = VMR9AlphaBitmap_hDC;
alphaBitmap.hdc = drawHDC; //NULL;
alphaBitmap.pDDS = pBmpSurface;
alphaBitmap.clrSrcKey = RGB(255,255,255); = 0;
alphaBitmap.rDest.left = 0;
alphaBitmap.rDest.bottom = 1; //videoHeight;
alphaBitmap.rDest.right = 1; //videoWidth;
//alphaBitmap.dwFilterMode = MixerPref_NoDecimation;
alphaBitmap.fAlpha = 1; //drawAlphaValue;
abHr = pMixBmp->SetAlphaBitmap(&alphaBitmap);

Thanks for the help.

Wednesday, March 31, 2004

Instead of writing directly on the renderer, just write another DirectShow filter that handles the bitmap manipulations before it gets the the Renderer.

Happy to be working
Thursday, April 01, 2004

*  Recent Topics

*  Fog Creek Home