Skip to main content
Version: 2.x

Class MediaDecoder

Odin Playback Media

Assembly: cs.temp.dll.dll
Declaration
public class MediaDecoder : IMedia, IDisposable

Implements:
Odin.IDisposable

Properties

Id

Media id

Declaration
public ushort Id { get; }

MediaProperties

Arbitrary media data

Declaration
public MediaRpcProperties MediaProperties { get; }

IsPaused

Declaration
public bool IsPaused { get; }

Samplerate

Output samplerate

Declaration
public uint Samplerate { get; }

Stereo

Output channel flag

Declaration
public bool Stereo { get; }

Pipeline

Odin effect pipeline

Declaration
public MediaPipeline Pipeline { get; set; }

Parent

Default value

null
indicates root or not set

Declaration
public IPeer Parent { get; set; }

Methods

Create(ushort, uint, bool)

Create a new dangling output media.

Declaration
public static MediaDecoder Create(ushort mediaId, uint samplerate, bool stereo)
Returns

OdinNative.Wrapper.MediaDecoder: output media

Parameters
TypeNameDescription
System.UInt16mediaIdoutput media id
System.UInt32sampleratesamplerate
System.Booleanstereostereo flag

GetPipeline()

Get native effect pipeline

Declaration
public MediaPipeline GetPipeline()
Returns

OdinNative.Wrapper.MediaPipeline: managed effect pipeline### Pop(ref float[], out bool) Pop output audio from the media

Declaration
public bool Pop(ref float[] audio, out bool isSilent)
Returns

System.Boolean: true on success or false

Parameters
TypeNameDescription
System.Single[]audiosamples
System.BooleanisSilent

Push(float[])

Push output audio into the media for effect processing

Declaration
public bool Push(float[] datagram)
Returns

System.Boolean: true on success or false

Parameters
TypeNameDescription
System.Single[]datagramsamples

Push(IntPtr, int)

Declaration
protected bool Push(IntPtr datagramPtr, int datagramLength)
Returns

System.Boolean

Parameters
TypeName
Odin.IntPtrdatagramPtr
System.Int32datagramLength

Dispose(bool)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
TypeName
System.Booleandisposing

Dispose()

Free native media decoder

Declaration
public void Dispose()

Implements

  • Odin.IDisposable