Share via


MediaStreamSourceSampleRequest.Sample Property

Definition

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

public:
 property MediaStreamSample ^ Sample { MediaStreamSample ^ get(); void set(MediaStreamSample ^ value); };
MediaStreamSample Sample();

void Sample(MediaStreamSample value);
public MediaStreamSample Sample { get; set; }
var mediaStreamSample = mediaStreamSourceSampleRequest.sample;
mediaStreamSourceSampleRequest.sample = mediaStreamSample;
Public Property Sample As MediaStreamSample

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.

Applies to