Grabber::getCurrentActualFrameRate Method

Returns the current actual frame rate.
Syntax:
long getCurrentActualFrameRate() const;
Return value:

The actual time between two frames in milliseconds. A return value of 0 indicates that an error occurred.

Remarks:

This method returns the actual time between two frames. This time may be greater than the desired time, returned by Grabber::getFrameRate.

This method is only available if a device is open and valid. Further the method does only work in live mode.

If the bandwidth is too low, the desired frame rate cannot be achieved. In this case getCurrentActualFrameRate would return a value greater than the default value of the video capture device or the passed value to Grabber::setFrameRate. Also the returned values of Grabber::getFrameRate and getCurrentActualFrameRate would differ. The returned value of getCurrentActualFrameRate would be bigger than the value of Grabber::getFrameRate.

It is recommended to call getCurrentActualFrameRate continuously to check the current achieved frame rate, because USB devices and 1394 devices can have variable frame rates.

If an error occurs or the method is not supported by the current video capture device, getCurrentActualFrameRate returns 0. GetLastError() will be set to one of the following values:

  • eNO_DEVICE_OPENED
  • eDEVICE_INVALID
  • eOPTION_NOT_AVAILABLE
  • eFUNC_ONLY_AVAIL_IN_LIVEMODE
See also: Grabber, Grabber::setFrameRate, Grabber::getFrameRate, Grabber::getAvailableFrameRates

<< Grabber

This site is part of The Imaging Source Network. Other sites include Company Portal, Image Processing, Astronomy Cameras, Astronomy Cameras Blog, Blog caméras d'astronomie, Astronomy Cameras Competition, TX Text Control, TX Text Control Blog and Forums.