Windows desktop applications
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MediaStreamSample class

Represents a media sample used by the MediaStreamSource.

Syntax


Public NotInheritable Class MediaStreamSample

Members

The MediaStreamSample class has these types of members:

Events

The MediaStreamSample class has these events.

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

 

Methods

The MediaStreamSample class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
CreateFromBuffer Creates a MediaStreamSample from an IBuffer.
CreateFromStreamAsync Asynchronously creates a MediaStreamSample from an IInputStream.

 

Properties

The MediaStreamSample class has these properties.

PropertyAccess typeDescription

Buffer

Read-only

Gets the buffer which encapsulates the MediaStreamSample data.

DecodeTimestamp

Read/write

Gets and sets the decode timestamp for this MediaStreamSample.

Discontinuous

Read/write

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

Duration

Read/write

Gets the duration of the sample.

ExtendedProperties

Read-only

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

KeyFrame

Read/write

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

Protection

Read-only

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

Read-only

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

 

Remarks

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

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps, desktop apps]

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

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06030000)]

See also

Object
MediaStreamSource Sample

 

 

Show:
© 2016 Microsoft