microsoft / Windows-driver-samples

This repo contains driver samples prepared for use with Microsoft Visual Studio and the Windows Driver Kit (WDK). It contains both Universal Windows Driver and desktop-only driver samples.
Microsoft Public License
6.92k stars 4.93k forks source link

[sampledevicemft] Unable to get MFSampleExtension_CaptureMetadata from pSample #1060

Open whenshan opened 10 months ago

whenshan commented 10 months ago

avstream/sampledevicemft

After we enabled Platform Dmft (as shown below), obtaining MFSampleExtension_CaptureMetadata in CMultipinMft::ProcessInput failed. And this problem will not appear on all computers, but some computers will always have this problem. How do we solve this problem?

[in INF file] HKR,,EnablePlatformDmft,0x00010001,1

[In sampledevicemft] In the following code pCaptureMetadata returns NULL.

STDMETHODIMP  CMultipinMft::ProcessInput(...)
{
....
  ComPtr<IMFAttributes> pCaptureMetadata = NULL;
  hr = pSample->GetUnknown(MFSampleExtension_CaptureMetadata, __uuidof(IMFAttributes), &pCaptureMetadata);
...
}

Thank you very much!