Drawing over fullscreen video from AudioVideoPlayback

I've spent some time trying to render text or even a control on top of video being played at fullscreen using the AudioVideoPlayback namespace without any luck. Originally I was aiming to have a transparent control on top of the video, but if I can get text on top, or any control (transparent or not) I'd be happy...
Can someone point me in the right direction? Perhaps provide an example of something similar?
[418 byte] By [MilesP] at [2007-12-28]
# 1

I think a lot of video displaying uses overlays, which means the video card inserts the stream directly into the video output.

DirectShow has the ability for you to add stuff into the data stream. There is an demo on DirectShow.net (for managed code - not sure where to find an unmanaged)

http://directshownet.sourceforge.net/ - see the dxLogo sample.

TheZMan at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 2
I'll take a look when I get home - thanks for the heads up
MilesP at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 3
Unfortunately I didn't get any further using that project as an example. Regardless of what I did I never got anything but the video...
MilesP at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 4
Hi,

I am currently working on a game project (Dx9 Aug, VC++) and would like to display FMV clips in between game sections.

I am finding this difficult to achieve: DirectShow is deprecated (I couldn't actualy find it for download). I'd not heard of this AudioVideoPlayback: is it only available when writing C# managed code?
Any pointers would be appreciated.
(I know DShow is part of PlatformSDK, can I get that anywhere? I only want a simple video streamed from a file)

dx_user at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 5
Search for platform SDK on microsoft.com

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdkintro/sdkintro/devdoc_platform_software_development_kit_start_page.asp

DirectShow docs are here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directshow/htm/introductiontodirectshow.asp

AudioVideoPlayback is the namespace that the deprecated DirectShow API was including in in Managed DirectX, so only useful from managed code (not just c#, any managed code)

TheZMan at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 6
If I could find the device context it was using to render the video I could make this work, but thats been my big obstacle so far...
Any hints on that?
MilesP at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 7
Use windowless control with VMR and it will draw on your window's DC.
DouglasJordan at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 8
Hi,

After I setting windowless mode, how can I make this setting work, or make the video draw on my window?

farming

farming at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 9
After changing the rendering mode to windowless you must use IVMRWindowLessControl9's method SetVideoClippingWindow so the window can be associated with the renderer.
DouglasJordan at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 10
I tried but failed to using windowless mode. I set a MFC-based dialog

application, and I put a "picture control" on the dialog board. I gave

a member variable to the "picture control" as m_hVideoWnd. My code is:

IVMRFilterConfig9 *pFilterConfig;

IVMRWindowlessConfig9 *pWC;

IBaseFilter *pVmr;

IGraphBuilder *pGB;

pGB = NULL;

pFilterConfig = NULL;

pWC = NULL;

pVmr = NULL;

HRESULT hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,

IID_IGraphBuilder, (void **)&pGB );

// Create the VMR and add it to the filter graph.

hr = CoCreateInstance(CLSID_VideoMixingRenderer9, NULL,


CLSCTX_INPROC, IID_IBaseFilter, (void**)&pVmr);

if (SUCCEEDED(hr))

{

hr = pGB->AddFilter(pVmr, L"Video Mixing Renderer 9");

if (SUCCEEDED(hr))

{

// Set the rendering mode and number of streams


pVmr->QueryInterface(IID_IVMRFilterConfig9,

(void**)&pFilterConfig);

pFilterConfig->SetRenderingMode(VMR9Mode_Windowless);

hr =

pVmr->QueryInterface(IID_IVMRWindowlessControl9, (void**)&pWC);

if( SUCCEEDED(hr))

{


//I tried two kinds of windows, one is the dialog window, another is

the picture

// window, but

the captured video was not still played in the picture window.


//pWC->SetVideoClippingWindow(CWebCamEx5Dlg::m_hWnd); //first

try


pWC->SetVideoClippingWindow(m_hVideoWindow.m_hWnd);

//second try

//pWC->SetBorderColor(RGB(0,0,0));

}

}

}

Where is my problem? Help me.

farming at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 11

I am also trying this without luck.

I am thinking of buying a video control with this feature in it now. I've seen a couple around.

quacka at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...

Software Development for Windows Vista

Site Classified