MediaStreamSourceSampleRequest.Sample | sample property

Applies to Windows and Windows Phone

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

Syntax


public MediaStreamSample Sample { get; set; }

Property value

Type: MediaStreamSample

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.

Requirements

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]

Namespace

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

Metadata

Windows.winmd

See also

MediaStreamSourceSampleRequest

 

 

Show:
© 2014 Microsoft