Category: ATL

Active Template Library related

How to overlay a bitmap on top of video with Video Mixing Renderer (VMR-9)

A 100-lines code snippet which illustrates how a bitmap is overlaid over displayed video with Video Mixing Renderer 9 Filter using IVMRMixerBitmap9 interface. A video clip is played (default is Windows clock.avi, but you can replace it with your longer one to see overlay is really in a loop). http://code.assembla.com/…/VmrMixerBitmapSample01/… VMR9AlphaBitmap AlphaBitmap; ZeroMemory(&AlphaBitmap, sizeof AlphaBitmap);…

Read the full article

IAMGraphBuilderCallback and Intelligent Connect tuning

There was a question asked about how IAMGraphBuilderCallback interface is used to prevent from particular filter insertion during Intelligent Connect. First of all, there is sample code at The March Hare‘s website: The IAMGraphBuilderCallback class can be used to remove problematic dshow filters when building a graph with intelligent connect.  This sample does not provide…

Read the full article

RegSetKeySecurity, CRegKey::SetKeySecurity and CSecurityDesc

One thing is worth special mentioning in connection with previous post on DirectShow Filter Graph Spy on Microsoft Vista system: ATL’s CSecurityDesc class caused to waste some time. CRegKey Key; ATLENSURE_SUCCEEDED(HRESULT_FROM_WIN32(Key.Open(HKEY_CLASSES_ROOT, pszKeyName, READ_CONTROL | WRITE_OWNER))); CSecurityDesc AdministratorsOwnerSecurityDescriptor; AdministratorsOwnerSecurityDescriptor.SetOwner(Sids::Admins()); ATLENSURE_SUCCEEDED(HRESULT_FROM_WIN32(Key.SetKeySecurity(OWNER_SECURITY_INFORMATION, &AdministratorsOwnerSecurityDescriptor))); The code compiles fine, but on runtime it gives error 87 (ERROR_INVALID_PARAMETER, E_INVALIDARG) in the…

Read the full article

MediaTools: Tone Source Filter to generate reference audio feed, dual Audio Source Filter and Virtual Audio Capture Device

In order to obtain a reference audio source and especially useful for debugging purposes, including: audio input device unrelated to physical device, to avoid conditions when device is already in use by someone else non-zero audio signal which is independent of certain speaker or broadcasting service, including one that makes capture, transmission or rendering issues…

Read the full article