Microsoft Silverlight will reach end of support after October 2021. Learn more.
When overridden in a derived class, is invoked when a video device captures a complete video sample.
Assembly: System.Windows (in System.Windows.dll)
'Declaration Protected MustOverride Sub OnSample ( _ sampleTimeInHundredNanoseconds As Long, _ frameDurationInHundredNanoseconds As Long, _ sampleData As Byte() _ )
protected abstract void OnSample( long sampleTimeInHundredNanoseconds, long frameDurationInHundredNanoseconds, byte sampleData )
The time, in 100-nanosecond units, when the sample was captured.
The duration of the sample, in 100-nanosecond units.
A byte stream that contains video data. The byte stream should be processed into samples according to the relevant video format information.
A complete sample is one video frame, with the frame rate reported in VideoFormat.FramesPerSecond for the associated VideoCaptureDevice. To work with the sampleData, you may also need to know other properties as reported in VideoFormat.
Each time a frame is ready from a video capture device, this method is called.
Supported in: 5, 4
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.