MediaStreamSample MediaStreamSample MediaStreamSample MediaStreamSample MediaStreamSample Class

Definition

Represents a media sample used by the MediaStreamSource.

public : sealed class MediaStreamSample
struct winrt::Windows::Media::Core::MediaStreamSample
public sealed class MediaStreamSample
Public NotInheritable Class MediaStreamSample
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

See the MediaStreamSource Sample for an example of using Media Stream Source in a Universal Windows app.

Version history

Windows version SDK version Value added
1809 17763 CreateFromDirect3D11Surface
1809 17763 Direct3D11Surface

Properties

Buffer Buffer Buffer Buffer Buffer

Gets the buffer which encapsulates the MediaStreamSample data.

DecodeTimestamp DecodeTimestamp DecodeTimestamp DecodeTimestamp DecodeTimestamp

Gets and sets the decode timestamp for this MediaStreamSample.

Direct3D11Surface Direct3D11Surface Direct3D11Surface Direct3D11Surface Direct3D11Surface

Gets the IDirect3DSurface which encapsulates the MediaStreamSample data.

Discontinuous Discontinuous Discontinuous Discontinuous Discontinuous

Gets or sets a value to indicate that the previous MediaStreamSample in the sequence is missing.

Duration Duration Duration Duration Duration

Gets the duration of the sample.

ExtendedProperties ExtendedProperties ExtendedProperties ExtendedProperties ExtendedProperties

Gets the extended property set which enables getting and setting properties on the MediaStreamSample.

KeyFrame KeyFrame KeyFrame KeyFrame KeyFrame

Gets or sets a value that indicates the MediaStreamSample contains a keyframe.

Protection Protection Protection Protection Protection

Gets a MediaStreamSampleProtectionProperties object, which is used for getting and setting properties that are specific to the Digital Rights Management (DRM) protection of the MediaStreamSample.

Timestamp Timestamp Timestamp Timestamp Timestamp

Gets the time at which a sample should be rendered. This is also referred to as the presentation time.

Methods

CreateFromBuffer(IBuffer, TimeSpan) CreateFromBuffer(IBuffer, TimeSpan) CreateFromBuffer(IBuffer, TimeSpan) CreateFromBuffer(IBuffer, TimeSpan) CreateFromBuffer(IBuffer, TimeSpan)

Creates a MediaStreamSample from an IBuffer.

CreateFromDirect3D11Surface(IDirect3DSurface, TimeSpan) CreateFromDirect3D11Surface(IDirect3DSurface, TimeSpan) CreateFromDirect3D11Surface(IDirect3DSurface, TimeSpan) CreateFromDirect3D11Surface(IDirect3DSurface, TimeSpan) CreateFromDirect3D11Surface(IDirect3DSurface, TimeSpan)

Creates a MediaStreamSample from an IDirect3DSurface.

CreateFromStreamAsync(IInputStream, UInt32, TimeSpan) CreateFromStreamAsync(IInputStream, UInt32, TimeSpan) CreateFromStreamAsync(IInputStream, UInt32, TimeSpan) CreateFromStreamAsync(IInputStream, UInt32, TimeSpan) CreateFromStreamAsync(IInputStream, UInt32, TimeSpan)

Asynchronously creates a MediaStreamSample from an IInputStream.

Events

Processed Processed Processed Processed Processed

Occurs when the MediaStreamSample has been processed by the media pipeline.

See also