Sample | sample property
Collapse the table of content
Expand the table of content

MediaStreamSourceSampleRequest.Sample | sample property

Sets the MediaStreamSample requested by the MediaStreamSource. Applications deliver a MediaStreamSample to the MediaStreamSource by assigning a value to this property.


Public Property Sample As MediaStreamSample

Property value

Type: MediaStreamSample

The sample which is delivered to the MediaStreamSource when this property is set. The default value is null.


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.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0


Windows::Media::Core [C++]



Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]


Windows::Media::Core [C++]



See also




© 2016 Microsoft