I wonder which MediaFoundation API can I use to control the brightness, contrast, hue and saturation etc? I find IMFVideoProcessor::SetProcAmpValues can modify these attributes, but these attributes are modified in graphics card; I want to modify these by capture device or by MediaFoundation interface within AVStream. thank you!
that will be the same as in DirectShow : acquire a IMFMediaSource for your video capture device and then query the IAMVideoProcAmp interface :
IMFMediaSource * pSource = NULL;
...
IAMVideoProcAmp *pProcAmp = NULL;
hr = pSource->QueryInterface(IID_PPV_ARGS(&pProcAmp));
if (SUCCEEDED(hr))
{
long lMin, lMax, lStep, lDefault, lCaps;
hr = pProcAmp->GetRange(
VideoProcAmp_Brightness,
&lMin,
&lMax,
&lStep,
&lDefault,
&lCaps
);
if (SUCCEEDED(hr))
{
hr = pProcAmp->Set(
VideoProcAmp_Brightness,
lMax,
VideoProcAmp_Flags_Manual
);
}
}