Tag: Windows API

Effects of IMFVideoProcessorControl2::EnableHardwareEffects

IMFVideoProcessorControl2::EnableHardwareEffects method: Enables effects that were implemented with IDirectXVideoProcessor::VideoProcessorBlt. […] Specifies whether effects are to be enabled. TRUE specifies to enable effects. FALSE specifies to disable effects. All right, it is apparently not IDirectXVideoProcessor and MSDN link behind the identifier takes one to correct Direct3D 11 API method: ID3D11VideoContext::VideoProcessorBlt. Worse news is that having the…

Read the full article

No conversion with MF_CONNECT_ALLOW_CONVERTER

Microsoft Media Foundation Media Session API topology resolution is way less clear compared to DirectShow. The API takes away a part of component connection process and makes it less transparent to API consumer. Then, while DirectShow Intelligent Connect is use scenario agnostic,  Media Foundation Media Session apparently targets playback scenarios, and its topology resolution process…

Read the full article

Reference Signal Source: audio as Media Foundation source

Reference signal source for DirectShow in its video part already received Media Foundation Source interface earlier. This time, the update implements a separate Media Foundation source for audio. MfGenerate2 sample code gives an idea on how to initialize the source: using namespace AlaxInfoDirectShowReferenceSource; CComPtr<IAudioMediaSource> pSource; __C(pSource.CoCreateInstance(__uuidof(AudioMediaSource))); __C(pSource->SetMediaType(NULL, g_nSampleRate, g_nChannelCount, g_nBitDepth)); __C(pSource->put_Duration((DOUBLE) g_nDuration)); CComPtr<IMFMediaSource> pAudioMediaSource =…

Read the full article

IMFAttributes::CopyAllItems freeze on copying to self

An attempt to copy Media Foundation attribute collection to itself results in a deadlock. Well, it’s not a good idea and a practical one to do a nonsense like this, but the implementation should be resistant to such use either, esp. avoiding the unexpected deadlock. #include “stdafx.h” #include <mfapi.h> #pragma comment(lib, “mfplat.lib”) #pragma comment(lib, “mfuuid.lib”)…

Read the full article