Show / Hide Table of Contents

Class AudioFormat

Represents an audio format filter that constrains the sample format, sample rate, and channel layout of audio passing through a filter graph.

Inheritance
object
OptionQueryableBase
FilterContext
AudioFormat
Implements
IOptionQueryable
ILoggingContext
IAVPointer<_AVFilterContext>
IBufferSource
IBufferSink
Inherited Members
FilterContext.Allocate(string, Filter, FilterGraph)
FilterContext.Create(string, Filter, FilterGraph)
FilterContext.Create(string, Filter, string, FilterGraph)
FilterContext.Create(string, Filter, AVDictionary, FilterGraph)
FilterContext.Create(string, Filter, IDictionary<string, string>, FilterGraph)
FilterContext.Create(string, Filter, AVMultiDictionary, FilterGraph)
FilterContext.As<T>()
FilterContext.Init(string)
FilterContext.Init()
FilterContext.Init(AVDictionary)
FilterContext.Init(AVMultiDictionary)
FilterContext.Init(IDictionary<string, string>)
FilterContext.ToString()
FilterContext.GetInputFilterPad(int)
FilterContext.GetOutputFilterPad(int)
FilterContext.GetInputFilterLink(int)
FilterContext.GetOutputFilterLink(int)
FilterContext.Delete()
FilterContext.Pointer
FilterContext.Filter
FilterContext.Name
FilterContext.Threads
FilterContext.HwDeviceContext
FilterContext.ExtraHWFrames
FilterContext.InputCount
FilterContext.OutputCount
FilterContext.InputFilterPads
FilterContext.OutputFilterPads
FilterContext.InputFilterLinks
FilterContext.OutputFilterLinks
OptionQueryableBase.ResetOptions()
OptionQueryableBase.GetOptions(bool)
OptionQueryableBase.FindOption(string, bool)
OptionQueryableBase.SetOption(string, string, bool)
OptionQueryableBase.SetOption(string, long, bool)
OptionQueryableBase.SetOption(string, bool, bool)
OptionQueryableBase.SetOption(string, double, bool)
OptionQueryableBase.SetOption(string, Rational, bool)
OptionQueryableBase.SetOption(string, ReadOnlySpan<byte>, bool)
OptionQueryableBase.SetOption(string, ReadOnlyMemory<byte>, bool)
OptionQueryableBase.SetOption(string, int, int, bool)
OptionQueryableBase.SetOption(string, (int Width, int Height), bool)
OptionQueryableBase.SetOption(string, PixelFormat, bool)
OptionQueryableBase.SetOption(string, SampleFormat, bool)
OptionQueryableBase.SetOption(string, IDictionary<string, string>, bool)
OptionQueryableBase.SetOption(string, ILookup<string, string>, bool)
OptionQueryableBase.SetOption(IDictionary<string, string>, bool)
OptionQueryableBase.SetOption(string, ref ILookup<string, string>, bool)
OptionQueryableBase.SetOption<T>(string, T, bool)
OptionQueryableBase.SetOption(string, object, bool)
OptionQueryableBase.SetOption(Option, string, bool)
OptionQueryableBase.SetOption(Option, bool, bool)
OptionQueryableBase.SetOption(Option, long, bool)
OptionQueryableBase.SetOption(Option, double, bool)
OptionQueryableBase.SetOption(Option, Rational, bool)
OptionQueryableBase.SetOption(Option, ReadOnlySpan<byte>, bool)
OptionQueryableBase.SetOption(Option, ReadOnlyMemory<byte>, bool)
OptionQueryableBase.SetOption(Option, int, int, bool)
OptionQueryableBase.SetOption(Option, (int Width, int Height), bool)
OptionQueryableBase.SetOption(Option, PixelFormat, bool)
OptionQueryableBase.SetOption(Option, SampleFormat, bool)
OptionQueryableBase.SetOption(Option, IDictionary<string, string>, bool)
OptionQueryableBase.SetOption(Option, ILookup<string, string>, bool)
OptionQueryableBase.SetOption<T>(Option, T, bool)
OptionQueryableBase.SetOption(Option, object, bool)
OptionQueryableBase.TryGetOption(string, out string, bool)
OptionQueryableBase.TryGetOption(string, out long, bool)
OptionQueryableBase.TryGetOption<T>(string, out T, bool)
OptionQueryableBase.TryGetOption(string, out ulong, bool)
OptionQueryableBase.TryGetOption(string, out int, bool)
OptionQueryableBase.TryGetOption(string, out bool, bool)
OptionQueryableBase.TryGetOption(string, out uint, bool)
OptionQueryableBase.TryGetOption(string, out double, bool)
OptionQueryableBase.TryGetOption(string, out Rational, bool)
OptionQueryableBase.TryGetOption(string, out PixelFormat, bool)
OptionQueryableBase.TryGetOption(string, out SampleFormat, bool)
OptionQueryableBase.TryGetOption(string, out IDictionary<string, string>, bool)
OptionQueryableBase.TryGetOption(string, out Dictionary<string, string>, bool)
OptionQueryableBase.TryGetOption(string, out AVDictionary, bool)
OptionQueryableBase.TryGetOption(string, out ILookup<string, string>, bool)
OptionQueryableBase.TryGetOption(string, out AVMultiDictionary, bool)
OptionQueryableBase.TryGetOption(string, out int, out int, bool)
OptionQueryableBase.TryGetOption(string, out (int Width, int Height), bool)
OptionQueryableBase.TryGetOption(string, Span<byte>, bool)
OptionQueryableBase.TryGetOption(string, out byte[], bool)
OptionQueryableBase.TryGetOption(string, out Memory<byte>, bool)
OptionQueryableBase.TryGetOption(string, out ReadOnlyMemory<byte>, bool)
OptionQueryableBase.TryGetOption(string, out object, bool)
OptionQueryableBase.TryGetOption(Option, out string, bool)
OptionQueryableBase.TryGetOption(Option, out long, bool)
OptionQueryableBase.TryGetOption<T>(Option, out T, bool)
OptionQueryableBase.TryGetOption(Option, out ulong, bool)
OptionQueryableBase.TryGetOption(Option, out int, bool)
OptionQueryableBase.TryGetOption(Option, out bool, bool)
OptionQueryableBase.TryGetOption(Option, out uint, bool)
OptionQueryableBase.TryGetOption(Option, out double, bool)
OptionQueryableBase.TryGetOption(Option, out Rational, bool)
OptionQueryableBase.TryGetOption(Option, out PixelFormat, bool)
OptionQueryableBase.TryGetOption(Option, out SampleFormat, bool)
OptionQueryableBase.TryGetOption(Option, out IDictionary<string, string>, bool)
OptionQueryableBase.TryGetOption(Option, out Dictionary<string, string>, bool)
OptionQueryableBase.TryGetOption(Option, out AVDictionary, bool)
OptionQueryableBase.TryGetOption(Option, out ILookup<string, string>, bool)
OptionQueryableBase.TryGetOption(Option, out AVMultiDictionary, bool)
OptionQueryableBase.TryGetOption(Option, out int, out int, bool)
OptionQueryableBase.TryGetOption(Option, out (int Width, int Height), bool)
OptionQueryableBase.TryGetOption(Option, out byte[], bool)
OptionQueryableBase.TryGetOption(Option, out Memory<byte>, bool)
OptionQueryableBase.TryGetOption(Option, out ReadOnlyMemory<byte>, bool)
OptionQueryableBase.TryGetOption(Option, Span<byte>, bool)
OptionQueryableBase.TryGetOption(Option, out object, bool)
OptionQueryableBase.SetOption(string, ChannelLayout, bool)
OptionQueryableBase.SetOption(Option, ChannelLayout, bool)
OptionQueryableBase.TryGetOption(string, out ChannelLayout, bool)
OptionQueryableBase.TryGetOption(Option, out ChannelLayout, bool)
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: FFmpeg.Filters.AudioFilters
Assembly: FFmpeg.dll
Syntax
public class AudioFormat : FilterContext, IOptionQueryable, ILoggingContext, IAVPointer<_AVFilterContext>, IBufferSource, IBufferSink
Remarks

The audio format filter does not perform a standalone conversion itself. Instead, it specifies the audio formats that are acceptable for the output of the filter, allowing FFmpeg's filter graph negotiation to select or insert the appropriate conversion when necessary.

Properties

View Source

ChannelLayouts

Gets or sets the channel layouts accepted by the filter.

Declaration
public IReadOnlyList<ChannelLayout> ChannelLayouts { get; set; }
Property Value
Type Description
IReadOnlyList<ChannelLayout>

A collection containing the accepted channel layouts. An empty collection indicates that no channel layout constraint is configured.

View Source

SampleFormats

Gets or sets the sample formats accepted by the filter.

Declaration
public IReadOnlyList<SampleFormat> SampleFormats { get; set; }
Property Value
Type Description
IReadOnlyList<SampleFormat>

A collection containing the accepted sample formats. An empty collection indicates that no sample format constraint is configured.

View Source

SampleRates

Gets or sets the sample rates accepted by the filter.

Declaration
public IReadOnlyList<int> SampleRates { get; set; }
Property Value
Type Description
IReadOnlyList<int>

A collection containing the accepted sample rates in samples per second. An empty collection indicates that no sample rate constraint is configured.

Methods

View Source

Allocate(string, FilterGraph)

Allocates an uninitialized audio format filter.

Declaration
public static AudioFormat Allocate(string name, FilterGraph graph)
Parameters
Type Name Description
string name

The name of the filter instance.

FilterGraph graph

The filter graph that will own the filter.

Returns
Type Description
AudioFormat

The allocated, uninitialized audio format filter.

Exceptions
Type Condition
FFmpegException

The filter could not be allocated.

View Source

Create(string, SampleFormat, int, ChannelLayout, FilterGraph)

Creates and initializes an audio format filter configured for a specific sample format, sample rate, and channel layout.

Declaration
public static AudioFormat Create(string name, SampleFormat sampleFormat, int sampleRate, ChannelLayout channelLayout, FilterGraph graph)
Parameters
Type Name Description
string name

The name of the filter instance.

SampleFormat sampleFormat

The sample format accepted by the filter.

int sampleRate

The sample rate accepted by the filter, in samples per second.

ChannelLayout channelLayout

The channel layout accepted by the filter.

FilterGraph graph

The filter graph that will own the filter.

Returns
Type Description
AudioFormat

The initialized audio format filter.

Exceptions
Type Condition
ArgumentOutOfRangeException

sampleRate is less than or equal to zero.

FFmpegException

The filter could not be configured or initialized.

View Source

Create(string, ReadOnlySpan<SampleFormat>, ReadOnlySpan<int>, ReadOnlySpan<ChannelLayout>, FilterGraph)

Creates and initializes an audio format filter configured with one or more acceptable sample formats, sample rates, and channel layouts.

Declaration
public static AudioFormat Create(string name, ReadOnlySpan<SampleFormat> sampleFormats, ReadOnlySpan<int> sampleRates, ReadOnlySpan<ChannelLayout> channelLayouts, FilterGraph graph)
Parameters
Type Name Description
string name

The name of the filter instance.

ReadOnlySpan<SampleFormat> sampleFormats

The sample formats accepted by the filter. An empty span leaves the sample format unconstrained.

ReadOnlySpan<int> sampleRates

The sample rates accepted by the filter, in samples per second. An empty span leaves the sample rate unconstrained.

ReadOnlySpan<ChannelLayout> channelLayouts

The channel layouts accepted by the filter. An empty span leaves the channel layout unconstrained.

FilterGraph graph

The filter graph that will own the filter.

Returns
Type Description
AudioFormat

The initialized audio format filter.

Exceptions
Type Condition
ArgumentException

One of the specified sample rates is less than or equal to zero.

FFmpegException

The filter could not be configured or initialized.

Implements

IOptionQueryable
ILoggingContext
IAVPointer<T>
IBufferSource
IBufferSink

Extension Methods

LoggingContextExtensions.Debug(ILoggingContext, string)
LoggingContextExtensions.Error(ILoggingContext, string)
LoggingContextExtensions.Fatal(ILoggingContext, string)
LoggingContextExtensions.Info(ILoggingContext, string)
LoggingContextExtensions.Log(ILoggingContext, LogLevel, string)
LoggingContextExtensions.Panic(ILoggingContext, string)
LoggingContextExtensions.Trace(ILoggingContext, string)
LoggingContextExtensions.Verbose(ILoggingContext, string)
LoggingContextExtensions.Warning(ILoggingContext, string)
  • View Source
In this article
Back to top Generated by DocFX