Windows.Media.Core.MediaStreamSourceSampleRequest.Sample
May 17, 2019 ยท View on GitHub
-description
Sets the MediaStreamSample requested by the MediaStreamSource. Applications deliver a MediaStreamSample to the MediaStreamSource by assigning a value to this property.
-property-value
The sample which is delivered to the MediaStreamSource when this property is set. The default value is null.
-remarks
The initial value of this property is null.
The application should allocate a MediaStreamSample and deliver it to the MediaStreamSource by assigning the MediaStreamSample to this property.
If there are no more MediaStreamSamples to deliver to the stream identified by the StreamDescriptor property because the end of the stream has been reached, then the application should set the Sample property to null.
If the application needs to perform an asynchronous operation to retrieve the MediaStreamSample, it should invoke the GetDeferral method to indicate that the assignment of the Sample property has been deferred.
If a MediaStreamSample is not currently available, for example, because it has not yet been downloaded from a server, the application should call GetDeferral and also call ReportSampleProgress on as the necessary data is being downloaded.
The recommended interval between each invocation of ReportSampleProgress is 500 milliseconds.