IltmmVideoProcAmp::GetRange Example for C

HRESULT IltmmVideoProcAmp_GetRange_Example (IltmmCapture *pCapture) 
{ 
   HRESULT   hr;  
   long      lMin, lMax, lSteppingDelta, lDefault, lCapsFlags;  
   long      lFlags, lVal;  
 
   IltmmVideoProcAmp* pVidProcAmp = NULL;  
 
   hr = IltmmCapture_get_VideoProcAmp (pCapture, &pVidProcAmp);  
   if (FAILED(hr))  
   { 
      IltmmVideoProcAmp_Release(pVidProcAmp);  
      pVidProcAmp = NULL;  
      return hr;  
   } 
 
   hr = IltmmVideoProcAmp_GetRange (pVidProcAmp, ltmmVideoProcAmp_Brightness,  
      &lMin, &lMax, &lSteppingDelta,  
      &lDefault, &lCapsFlags);  
   if (FAILED(hr))  
   { 
      IltmmVideoProcAmp_Release(pVidProcAmp);  
      pVidProcAmp = NULL;  
      return hr;  
   } 
 
   hr = IltmmVideoProcAmp_Get (pVidProcAmp, ltmmVideoProcAmp_Brightness,  
      &lVal, &lFlags);  
   if (FAILED(hr))  
   { 
      IltmmVideoProcAmp_Release(pVidProcAmp);  
      pVidProcAmp = NULL;  
      return hr;  
   } 
 
   lVal = min(lVal + 10, lMax);  
 
   hr = IltmmVideoProcAmp_Set(pVidProcAmp, ltmmVideoProcAmp_Brightness,  
      lVal, ltmmVideoProcAmp_Flags_Manual);  
   if (FAILED(hr))  
   { 
      IltmmVideoProcAmp_Release(pVidProcAmp);  
      pVidProcAmp = NULL;  
      return hr;  
   } 
 
   IltmmVideoProcAmp_Release(pVidProcAmp);  
   pVidProcAmp = NULL;  
 
   return S_OK; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Multimedia C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.