Class MediaFoundationTransform
- Namespace
- NAudio.MediaFoundation
- Assembly
- NAudio.Wasapi.dll
An abstract base class for simplifying working with Media Foundation Transforms. You need to override the method that actually creates and configures the transform.
public abstract class MediaFoundationTransform : IWaveProvider, IDisposable
- Inheritance
-
MediaFoundationTransform
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
MediaFoundationTransform(IWaveProvider, WaveFormat)
Constructs a new MediaFoundationTransform wrapper. Uses a short input chunk size to balance latency and throughput.
public MediaFoundationTransform(IWaveProvider sourceProvider, WaveFormat outputFormat)
Parameters
sourceProviderIWaveProviderThe source provider for input data to the transform
outputFormatWaveFormatThe desired output format
Fields
outputWaveFormat
The Output WaveFormat
protected readonly WaveFormat outputWaveFormat
Field Value
sourceProvider
The Source Provider
protected readonly IWaveProvider sourceProvider
Field Value
Properties
WaveFormat
The output WaveFormat of this Media Foundation Transform
public WaveFormat WaveFormat { get; }
Property Value
Methods
Dispose()
Disposes this Media Foundation Transform
public void Dispose()
Dispose(bool)
Disposes this MediaFoundation transform
protected virtual void Dispose(bool disposing)
Parameters
disposingbool
Read(Span<byte>)
Reads data out of the source, passing it through the transform
public int Read(Span<byte> buffer)
Parameters
Returns
Reposition()
Indicate that the source has been repositioned and completely drain out the transforms buffers
public void Reposition()