Another option is to render bot the video and the text to a texture, and an example on how to render the video to a texture is included with the SDK:
Source: (SDK root)\Samples\C++\DirectShow\Players\Texture3D[
^]
To render the text you do something like this:
Enable transparency:
device.RenderState.AlphaTestEnable = true;
device.RenderState.AlphaFunction = Compare.Greater;
device.RenderState.ReferenceAlpha = 0;
Create font and sprite:
D3DX10CreateFont(device, 16, 0, FW_BOLD, 0, FALSE,
DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, ANTIALIASED_QUALITY,
DEFAULT_PITCH | FF_DONTCARE, L"Verdana", &font);
D3DX10CreateSprite(device, 256, &sprite);
Render:
hr = sprite->Begin(0);
std::wstring left = L"Hurray, text on a sprite!";
RECT r;
r.top = 0;
r.bottom = window->height;
r.left = 0;
r.right = window->width;
hr = font->DrawTextW(sprite, left.c_str(), -1, &r,
DT_LEFT | DT_TOP, D3DXCOLOR(0.0f, 1.0f, 0.0f, 1.0f));
hr = sprite->End();
Best regards
Espen Harlinn