Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

MediaStreamSample Constructor (MediaStreamDescription, Stream, Int64, Int64, Int64, IDictionary<MediaSampleAttributeKeys, String>)

Silverlight

Instantiates a new instance of the MediaStreamSample class.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)
public MediaStreamSample(
	MediaStreamDescription mediaStreamDescription,
	Stream stream,
	long offset,
	long count,
	long timestamp,
	IDictionary<MediaSampleAttributeKeys, string> attributes
)

Parameters

mediaStreamDescription
Type: System.Windows.Media.MediaStreamDescription
A description of the stream this sample was pulled from.
stream
Type: System.IO.Stream
A stream containing the desired media sample. Set to null to report the end of a stream.
offset
Type: System.Int64
The offset into the stream where the actual sample data begins.
count
Type: System.Int64
The number of bytes that comprises the sample data.
timestamp
Type: System.Int64
The time from the beginning of the media file at which this sample should be rendered as expressed using 100 nanosecond increments.
attributes
Type: System.Collections.Generic.IDictionary<MediaSampleAttributeKeys, String>
A collection of pairs describing other attributes of the media sample.
ExceptionCondition
InvalidOperationException

One or more parameters are invalid.

ArgumentException

DRMAlgorithmID value passed in was invalid.

ArgumentException

DRMAlgorithmID was set to "Unprotected" while DRMKeyIdentifier was set to a non Guid.Empty value.

ArgumentException

DRMAlgorithmID was not set but DRMKeyIdentifier was set to a non Guid.Empty value.

ArgumentException

DRMKeyIdentifier was not set to a correctly formatted value.

ArgumentException

DRMKeyIdentifier was not set or set to Guid.Empty, but DRMAlgorithmID was specified and not set to "Unprotected".

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.