Fields (2) Methods (13) Properties (5)
Namespace: CSCore.DMO

Syntax

public abstract class DmoStream : IWaveSource

Implements

Summary

Base class for all Dmo based streams.

Uses

Used by

Fields

InputIndex

The default inputStreamIndex to use.

protected readonly Int32 InputIndex

OutputIndex

The default outputStreamIndex to use.

protected readonly Int32 OutputIndex

Methods

DmoStream()

Base class for all Dmo based streams.

protected void DmoStream()

CreateMediaObject(WaveFormat inputFormat, WaveFormat outputFormat)

Creates and returns a new MediaObject instance to use for processing audio data. This can be a decoder, effect, ...

protected abstract MediaObject CreateMediaObject(WaveFormat inputFormat, WaveFormat outputFormat)

Parameters

inputFormat

WaveFormat

The input format of the MediaObject to create.

outputFormat

WaveFormat

The output format of the MediaObject to create.

Returns

The created MediaObject to use for processing audio data.

Dispose()

Disposes the DmoStream.

public void Dispose()

Dispose(Boolean disposing)

Releases the DmoStream.

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 DmoStream class.

protected void Finalize()

GetInputData(Byte[]& inputDataBuffer, Int32 requested)

Gets inputData to feed the Dmo MediaObject with.

protected abstract Int32 GetInputData(Byte[]& inputDataBuffer, Int32 requested)

Parameters

inputDataBuffer

Byte[]&

InputDataBuffer which receives the inputData. If this parameter is null or the length is less than the amount of inputData, a new byte array will be applied.

requested

Int32

The requested number of bytes.

Returns

The number of bytes read. The number of actually read bytes does not have to be the number of requested bytes.

GetInputFormat()

Gets the input format to use.

protected abstract WaveFormat GetInputFormat()

Returns

The input format.

GetOutputFormat()

Gets the output format to use.

protected abstract WaveFormat GetOutputFormat()

Returns

The output format.

Initialize()

Initializes the DmoStream. Important: This has to be called before using the DmoStream.

InputToOutput(Int64 position)

Converts a position of the inputstream to the equal position in the outputstream.

protected virtual Int64 InputToOutput(Int64 position)

Parameters

position

Int64

Any position/offset of the inputstream, in bytes.

Returns

Position in the outputstream, in bytes.

OutputToInput(Int64 position)

Translates a position of the outputstream to the equal position in the inputstream.

protected virtual Int64 OutputToInput(Int64 position)

Parameters

position

Int64

Any position/offset of the outputstream, in bytes.

Returns

Position in the inputstream, in bytes.

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

Reads a sequence of bytes from the stream.

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

Parameters

buffer

Byte[]

An array of bytes. When this method returns, the buffer contains the read bytes.

offset

Int32

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

count

Int32

The maximum number of bytes to be read from the stream

Returns

The actual number of read bytes.

CSCore.DMO.DmoStreamCSCore.DMO.MediaObjectCSCore.DMO.MediaBufferCSCore.DMO.DmoOutputDataBufferReadwhile (read < count)IsReadyForInputreturn Booleanif (isReadyForInput && isIncomplete == false)OutputToInputGetInputDataif (_inputDataBuffer.MaxLength < bytesRead)DisposeendWriteProcessInputendif (isIncomplete == false)ResetendProcessOutputReadreturn Int32endreturn Int32

save

reset

Drag to pan - Use Mousewheel + Ctrl to zoom

ResetOverflowBuffer()

Resets the overflowbuffer.

protected void ResetOverflowBuffer()

Properties

CanSeek

Gets a value indicating whether the IAudioSource supports seeking.

public abstract Boolean CanSeek { get; }

InputFormat

Gets the input format of the DmoStream.

public WaveFormat InputFormat { get; }

Length

Gets the length of the stream.

public abstract Int64 Length { get; }

Position

Gets or sets the position of the stream.

public abstract Int64 Position { get; set; }

WaveFormat

Gets the output format of the DmoStream.

public WaveFormat WaveFormat { get; }

Class Diagram

public abstract classDmoStreamInputIndexOutputIndexCreateMediaObjectDisposeDisposeFinalizeGetInputDataGetInputFormatGetOutputFormatInitializeInputToOutputOutputToInputReadResetOverflowBufferDmoStreamCanSeek { get; }InputFormat { get; }Length { get; }Position { get; set; }WaveFormat { get; }public interfaceIWaveSourcepublic classDmoMp3DecoderCreateMediaObjectDisposeGetInputDataGetInputFormatGetOutputFormatReadDmoMp3DecoderDmoMp3DecoderCanSeek { get; }Length { get; }Position { get; set; }public classMp3WebStreamConnectionEstablishedDisposeDisposeFinalizeReadMp3WebStreamMp3WebStreamMp3WebStreamMp3WebStreamBufferedBytes { get; }BufferSize { get; }CanSeek { get; }Length { get; }Position { get; set; }StreamAddress { get; }WaveFormat { get; }public abstract classDmoEffectBaseCreateComObjectCreateMediaObjectGetOutputFormatReadSetValueDmoEffectBaseEffect { get; }IsEnabled { get; set; }public structDmoOutputDataBufferBufferStatusTimeLengthTimestampDisposeReadReadResetDmoOutputDataBufferDmoOutputDataBufferLength { get; }public classMediaBufferDisposeFinalizeGetBufferAndLengthGetMaxLengthReadReadSetLengthWriteMediaBufferLength { get; set; }MaxLength { get; }public classMediaObjectAllocateStreamingResourcesAllocateStreamingResourcesNativeClearInputTypeClearOutputTypeDiscontinuityDiscontinuityNativeFlushFlushNativeFreeStreamingResourcesFreeStreamingResourcesNativeFromComObjectGetInputCurrentTypeGetInputCurrentTypeGetInputMaxLatencyGetInputMaxLatencyNativeGetInputSizeInfoGetInputSizeInfoNativeGetInputStatusGetInputStatusNativeGetInputStreamInfoGetInputStreamInfoNativeGetInputTypeGetInputTypeNativeGetOutputCurrentTypeGetOutputCurrentTypeGetOutputSizeInfoGetOutputSizeInfoNativeGetOutputStreamInfoGetOutputStreamInfoNativeGetOutputTypeGetOutputTypeNativeGetStreamCountGetStreamCountNativeIsReadyForInputLockLockLockNativeProcessInputProcessInputProcessInputProcessInputNativeProcessOutputProcessOutputProcessOutputNativeSetInputMaxLatencySetInputMaxLatencyNativeSetInputTypeSetInputTypeSetInputTypeNativeSetOutputTypeSetOutputTypeSetOutputTypeNativeSupportsInputFormatSupportsInputFormatSupportsOutputFormatSupportsOutputFormatMediaObjectInputStreamCount { get; }OutputStreamCount { get; }

save

reset

Drag to pan - Use Mousewheel + Ctrl to zoom