Tag: Windows API

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

Bug in Media Foundation MPEG-4 File Source related to timestamping video frames of a fragmented MP4 file

Some recent update in Media Foundation platform introduced a new bug related to fragmented MP4 files and H.264 video. The bug shows up consistently with file versions: mfplat.dll – 10.0.14393.351 (rs1_release_inmarket.161014-1755)    15-Oct-16 05:48 mfmp4srcsnk.dll – 10.0.14393.351 (rs1_release_inmarket.161014-1755)    15-Oct-16 05:45 The nature of the problem is that MPEG-4 File Source is incorrectly time stamping the data:…

Read the full article