ICImagingControl.DeviceCurrentActualFrameRate Property

Returns the frame rate currently used by the video capture device. A value of 0 indicates that this property is not supported by the video capture device.
Syntax:
Public DeviceCurrentActualFrameRate As Single
Limitations:

Run time only, read only. Only available in live mode.

Remarks:

DeviceCurrentActualFrameRate returns the number of frames actually sent by the video capture device. The actual frame rate depends on the bandwith and the video format. Therefore, the DeviceCurrentActualFrameRate may differ from the desired frame rate that has been set with the ICImagingControl.DeviceFrameRate property. It can be less than the desired frame rate if the bandwith is too low, but will never be greater.

If an application needs to display the actual frame rate, it is recommended to check the frame rate with DeviceCurrentActualFrameRate as shown in the example below.

Sample:

This example shows how to display the actual frame rate of the video capture device. A timer has been added to the application in order to update the display of the current frame rate periodically.

Private Sub Timer1_Timer()
    Dim currentFrameRate As Single
    currentFrameRate = 0

    ' Check whether the device is valid.
    If ICImagingControl1.DeviceValid Then

        ' Check whether the live video is running.
        If ICImagingControl1.LiveVideoRunning Then

            ' Get the current frame rate from ImagingControl.
            currentFrameRate = ICImagingControl1.DeviceCurrentActualFrameRate

            ' If it is greater than 0, the current frame rate is valid.
            If currentFrameRate > 0 Then
                ActFrameRate.Caption = Str(currentFrameRate)
            End If
        End If
    End If

   ' If currentFrameRate is equal to 0, it is not valid. That
   ' means that either the live video is not running, the device
   ' is invalid, or the device does not support this property.
    If currentFrameRate = 0 Then
        ActFrameRate.Caption = "n/a"
    End If
End Sub
See also: ICImagingControl, ICImagingControl.DeviceFrameRateAvailable, ICImagingControl.DeviceFrameRate, ICImagingControl.DeviceFrameRates

<< ICImagingControl