Windows.Media.Core.MediaStreamSource.SampleRequested

August 14, 2018 ยท View on GitHub

-description

Occurs when the MediaStreamSource request a MediaStreamSample for a specified stream.

-remarks

Upon receiving this event, the application should assign a MediaStreamSample for the requested stream to the Sample property of the MediaStreamSourceSampleRequest object.

If the application is temporarily unable to deliver the MediaStreamSample, it should obtain the MediaStreamSourceSampleRequestDeferral object and invoke ReportSampleProgress on a regular basis until it assigns a MediaStreamSample to the Sample property and calls Complete on the MediaStreamSourceSampleRequestDeferral object. The recommended interval between each invocation of ReportSampleProgress is 500 milliseconds.

If the specified stream does not have any more samples, the application should leave the Sample property unassigned or set it to null.

-examples

-see-also

MediaStreamSourceSampleRequestedEventArgs