IltmmVideoProcAmp::GetRange Example for C++
HRESULT hr;
long lMin, lMax, lSteppingDelta, lDefault, lCapsFlags;
long lFlags, lVal;
IltmmVideoProcAmp* pVidProcAmp = NULL;
hr = m_capture->get_VideoProcAmp (&pVidProcAmp);
if (FAILED(hr))
{
pVidProcAmp->Release();
return hr;
}
hr = pVidProcAmp->GetRange (ltmmVideoProcAmp_Brightness,
&lMin, &lMax, &lSteppingDelta,
&lDefault, &lCapsFlags);
if (FAILED(hr))
{
pVidProcAmp->Release();
return hr;
}
hr = pVidProcAmp->Get (ltmmVideoProcAmp_Brightness,
&lVal, &lFlags);
if (FAILED(hr))
{
pVidProcAmp->Release();
pVidProcAmp = NULL;
return hr;
}
lVal = min(lVal + 10, lMax);
hr = pVidProcAmp->Set (ltmmVideoProcAmp_Brightness,
lVal, ltmmVideoProcAmp_Flags_Manual);
if (FAILED(hr))
{
pVidProcAmp->Release();
pVidProcAmp = NULL;
return hr;
}
pVidProcAmp->Release();
pVidProcAmp = NULL;