Drawing over fullscreen video from AudioVideoPlayback
Can someone point me in the right direction? Perhaps provide an example of something similar?
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.
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)
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)
After I setting windowless mode, how can I make this setting work, or make the video draw on my window?
farming
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.
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.