[Device MFT] How can i get Capture Stats Metadata Attributes?

  • Thread starter Thread starter thpd01
  • Start date Start date
T

thpd01

Guest
I want to get Capture Stats Metadata Attributes inside Device MFT, like MF_CAPTURE_METADATA_EXPOSURE_TIME or MF_CAPTURE_METADATA_ISO_GAINS, to do some post processing before streaming out.

I read document from MSDN and found that MFSampleExtension_CaptureMetaData contain all capture metadata, however I don't know how to get MFSampleExtension_CaptureMetaData bag from sample.

When receiving new sample from ProcessInput, I call GetUnknown to get MFSampleExtension_CaptureMetaData metadata attribute bag:

STDMETHODIMP CMultipinMft::ProcessInput(
_In_ DWORD dwInputStreamID,
_In_ IMFSample* pSample,
_In_ DWORD dwFlags
)
{
ComPtr<IMFAttributes> pCapMetadata = nullptr;
HRESULT hr = pSample->GetUnknown(MFSampleExtension_CaptureMetadata, IID_PPV_ARGS(pCapMetadata.GetAddressOf()));

// do other things

}


I always receive MF_E_ATTRIBUTENOTFOUND error.

Could anyone explain how to get Capture metadata from Sample inside Device MFT?

Thanks

Continue reading...
 
Back
Top