VideoSink.OnSample Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
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() _ )
Parameters
- sampleTimeInHundredNanoseconds
- Type: System.Int64
The time, in 100-nanosecond units, when the sample was captured.
- frameDurationInHundredNanoseconds
- Type: System.Int64
The duration of the sample, in 100-nanosecond units.
- sampleData
- Type:
System.Byte
()
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.