Share via


MediaStreamSample.CreateFromStreamAsync Method

Definition

Asynchronously creates a MediaStreamSample from an IInputStream.

public:
 static IAsyncOperation<MediaStreamSample ^> ^ CreateFromStreamAsync(IInputStream ^ stream, unsigned int count, TimeSpan timestamp);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<MediaStreamSample> CreateFromStreamAsync(IInputStream const& stream, uint32_t const& count, TimeSpan const& timestamp);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<MediaStreamSample> CreateFromStreamAsync(IInputStream stream, uint count, System.TimeSpan timestamp);
function createFromStreamAsync(stream, count, timestamp)
Public Shared Function CreateFromStreamAsync (stream As IInputStream, count As UInteger, timestamp As TimeSpan) As IAsyncOperation(Of MediaStreamSample)

Parameters

stream
IInputStream

The stream that contains the media data used to create the MediaStreamSample.

count
UInt32

unsigned int

uint32_t

The length of the data in the sample. This is the number of bytes that will be read from stream.

timestamp
TimeSpan TimeSpan

The presentation time of this MediaStreamSample.

Returns

When this method completes, it returns the new file as a MediaStreamSample.

Attributes

Remarks

For certain formats, the decode time and the presentation time of a MediaStreamSample are different. The decode time can be accessed through the DecodeTimestamp property.

Applies to