MediaSampleInfo.DeviceFrameNumber Property

If available, then this contains the frame number the device assigned this frame.
Syntax:
[C#]
public ulong DeviceFrameNumber { get; }
Remarks:

This may be unavailable when the device does not support frame numbers. The number is device and protocol specific so may wrap and may not contain certain values. E.g. Gigabit Ethernet cameras have a framenumber in the range of [1;65535] and wrap from 65535 to 1. E.g. UVC cameras only have a frame id of 0 or 1.

Information:

This property is deprecated since version 3.5.
Use IFrame.FrameMetadata.

<< MediaSampleInfo