Methods (7) Properties (4)
Namespace: CSCore.MediaFoundation

Syntax

public class MediaFoundationDecoder : IWaveSource

Implements

Summary

The MediaFoundationDecoder is a generic decoder for all installed Mediafoundation codecs.

Uses

Methods

MediaFoundationDecoder(MFByteStream byteStream)

Initializes a new instance of the MediaFoundationDecoder class.

public void MediaFoundationDecoder(MFByteStream byteStream)

Parameters

byteStream

MFByteStream

Stream which provides the audio data to decode.

MediaFoundationDecoder(Stream stream)

Initializes a new instance of the MediaFoundationDecoder class.

public void MediaFoundationDecoder(Stream stream)

Parameters

stream

Stream

Stream which provides the audio data to decode.

MediaFoundationDecoder(String url)

Initializes a new instance of the MediaFoundationDecoder class.

public void MediaFoundationDecoder(String url)

Parameters

url

String

Uri which points to an audio source which can be decoded.

Dispose()

Disposes the MediaFoundationDecoder.

public void Dispose()

Dispose(Boolean disposing)

Disposes the MediaFoundationDecoder and its internal resources.

protected virtual void Dispose(Boolean disposing)

Parameters

disposing

Boolean

True to release both managed and unmanaged resources; false to release only unmanaged resources.

Finalize()

Finalizes an instance of the MediaFoundationDecoder class.

protected void Finalize()

Read(Byte[] buffer, Int32 offset, Int32 count)

Reads a sequence of bytes from the MediaFoundationDecoder and advances the position within the stream by the number of bytes read.

public Int32 Read(Byte[] buffer, Int32 offset, Int32 count)

Parameters

buffer

Byte[]

An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.

offset

Int32

The zero-based byte offset in the buffer at which to begin storing the data read from the current stream.

count

Int32

The maximum number of bytes to read from the current source.

Returns

The total number of bytes read into the buffer.

save

reset

Drag to pan - Use Mousewheel + Ctrl to zoom

Properties

CanSeek

Gets a value which indicates whether the seeking is supported. True means that seeking is supported. False means that seeking is not supported.

public Boolean CanSeek { get; }

Length

Gets the total length of the decoded audio, in bytes.

public Int64 Length { get; }

Position

Gets or sets the position of the output stream, in bytes.

public Int64 Position { get; set; }

WaveFormat

Gets the format of the decoded audio data provided by the Read method.

public WaveFormat WaveFormat { get; }

Class Diagram

public classMediaFoundationDecoderDisposeDisposeFinalizeReadMediaFoundationDecoderMediaFoundationDecoderMediaFoundationDecoderCanSeek { get; }Length { get; }Position { get; set; }WaveFormat { get; }public interfaceIWaveSourcepublic classMFMediaBufferGetCurrentLengthGetCurrentLengthNativeGetMaxLengthGetMaxLengthNativeLockLockLockNativeSetCurrentLengthSetCurrentLengthNativeUnlockUnlockNativeMFMediaBufferMFMediaBufferCurrentLength { get; set; }MaxLength { get; }public classMFSampleAddBufferAddBufferNativeConvertToContiguousBufferConvertToContiguousBufferNativeCopyToBufferCopyToBufferNativeGetBufferByIndexGetBufferByIndexNativeGetBufferCountGetBufferCountNativeGetSampleDurationGetSampleDurationNativeGetSampleFlagsGetSampleFlagsNativeGetSampleTimeGetSampleTimeNativeGetTotalLengthGetTotalLengthNativeRemoveAllBuffersRemoveAllBuffersNativeRemoveBufferByIndexRemoveBufferByIndexNativeSetSampleDurationSetSampleDurationNativeSetSampleFlagsSetSampleFlagsNativeSetSampleTimeSetSampleTimeNativeMFSampleMFSamplepublic classMFSourceReaderFlushFlushNativeGetCurrentMediaTypeGetCurrentMediaTypeNativeGetNativeMediaTypeGetNativeMediaTypeNativeGetPresentationAttributeGetPresentationAttributeNativeGetServiceForStreamGetServiceForStreamNativeGetStreamSelectionGetStreamSelectionNativeReadSampleReadSampleNativeSetCurrentMediaTypeSetCurrentMediaTypeNativeSetCurrentPositionSetCurrentPositionNativeSetStreamSelectionSetStreamSelectionNativeMFSourceReaderMFSourceReaderCanSeek { get; }MediaSourceCharacteristics { get; }

save

reset

Drag to pan - Use Mousewheel + Ctrl to zoom