Dela via


MediaStreamSample.CreateFromBuffer(IBuffer, TimeSpan) Method

Definition

Creates a MediaStreamSample from an IBuffer.

public:
 static MediaStreamSample ^ CreateFromBuffer(IBuffer ^ buffer, TimeSpan timestamp);
 static MediaStreamSample CreateFromBuffer(IBuffer const& buffer, TimeSpan const& timestamp);
public static MediaStreamSample CreateFromBuffer(IBuffer buffer, System.TimeSpan timestamp);
function createFromBuffer(buffer, timestamp)
Public Shared Function CreateFromBuffer (buffer As IBuffer, timestamp As TimeSpan) As MediaStreamSample

Parameters

buffer
IBuffer

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

timestamp
TimeSpan TimeSpan

The presentation time of this sample.

Returns

The sample created from the data in buffer.

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