Show / Hide Table of Contents

Struct Filter

Represents a filter used in FFmpeg's filter graph. Provides information about filters, including their names, descriptions, inputs, outputs, and flags.

Implements
IEquatable<Filter>
IAVPointer<_AVFilter>
Inherited Members
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: FFmpeg.Filters
Assembly: FFmpeg.dll
Syntax
public readonly struct Filter : IEquatable<Filter>, IAVPointer<_AVFilter>

Properties

View Source

AllFilters

Gets a read-only collection of all available filters in FFmpeg. The filters are initialized lazily and cached for future access.

Declaration
public static ReadOnlyCollection<Filter> AllFilters { get; }
Property Value
Type Description
ReadOnlyCollection<Filter>
View Source

AudioBufferSink

Gets the audio buffer sink filter, used to receive audio frames in filter graphs.

Declaration
public static Filter AudioBufferSink { get; }
Property Value
Type Description
Filter
View Source

AudioBufferSource

Gets the audio buffer source filter, used to create audio frames in filter graphs.

Declaration
public static Filter AudioBufferSource { get; }
Property Value
Type Description
Filter
View Source

AudioFormat

Gets the audio format filter, which converts audio frames to one or more specified sample formats, sample rates, channel layouts, or channel counts.

Declaration
public static Filter AudioFormat { get; }
Property Value
Type Description
Filter
View Source

AudioNullSink

Gets the built-in audio null sink filter.

Declaration
public static Filter AudioNullSink { get; }
Property Value
Type Description
Filter
Remarks

The null sink filter consumes audio frames without producing any output. It is useful when the output of a filter graph does not need to be retrieved.

View Source

AudioNullSource

Gets the built-in audio null source filter.

Declaration
public static Filter AudioNullSource { get; }
Property Value
Type Description
Filter
Remarks

The null source filter generates synthetic audio samples and is commonly used as the starting point of a filter graph when no external audio input is available.

View Source

Description

Gets a human-readable description of the filter.

Declaration
public string? Description { get; }
Property Value
Type Description
string

A description of the filter, or null if the filter does not provide one.

View Source

FPS

Gets the FPS filter, used to change the frame rate of video streams.

Declaration
public static Filter FPS { get; }
Property Value
Type Description
Filter
View Source

Flags

Gets the filter's flags, indicating its properties and behavior.

Declaration
public FilterFlags Flags { get; }
Property Value
Type Description
FilterFlags
View Source

FramePack

Packs two video streams into a stereoscopic video using one of the supported frame packing layouts.

Declaration
public static Filter FramePack { get; }
Property Value
Type Description
Filter
Remarks

The filter combines two input video streams into a single stereoscopic output stream and sets the appropriate stereo metadata when supported by the output codec.

Both input streams must have the same frame size and frame rate. Processing stops when the shorter input stream reaches the end.

Common packing formats include side-by-side, top-and-bottom, line-interleaved, column-interleaved, and frame-sequential.

View Source

HWDownload

Gets the filter that downloads hardware-accelerated frames to system memory.

Declaration
public static Filter HWDownload { get; }
Property Value
Type Description
Filter
View Source

HWUpload

Gets the filter that uploads frames from system memory to hardware-accelerated memory.

Declaration
public static Filter HWUpload { get; }
Property Value
Type Description
Filter
View Source

HWUploadCuda

Gets the filter that uploads frames from system memory to cuda device.

Declaration
public static Filter HWUploadCuda { get; }
Property Value
Type Description
Filter
View Source

Inputs

Gets the input pads supported by the filter.

Declaration
public FilterPadList Inputs { get; }
Property Value
Type Description
FilterPadList
View Source

IsSinkFilter

Gets a value indicating whether the filter acts as a sink filter.

Declaration
public bool IsSinkFilter { get; }
Property Value
Type Description
bool
Remarks

Sink filters have no output pads and consume media from a filter graph.

View Source

IsSourceFilter

Gets a value indicating whether the filter acts as a source filter.

Declaration
public bool IsSourceFilter { get; }
Property Value
Type Description
bool
Remarks

Source filters have no input pads and generate media for a filter graph.

View Source

Name

Gets the name of the filter.

Declaration
public string? Name { get; }
Property Value
Type Description
string
View Source

Outputs

Gets the output pads supported by the filter.

Declaration
public FilterPadList Outputs { get; }
Property Value
Type Description
FilterPadList
View Source

Scale

Gets the scale filter, used to resize video frames.

Declaration
public static Filter Scale { get; }
Property Value
Type Description
Filter
View Source

VideoBufferSink

Gets the video buffer sink filter, used to receive frames in filter graphs.

Declaration
public static Filter VideoBufferSink { get; }
Property Value
Type Description
Filter
View Source

VideoBufferSource

Gets the video buffer source filter, used to create frames in filter graphs.

Declaration
public static Filter VideoBufferSource { get; }
Property Value
Type Description
Filter
View Source

VideoFormat

Gets the video format filter, which converts video frames to one or more specified pixel formats.

Declaration
public static Filter VideoFormat { get; }
Property Value
Type Description
Filter
View Source

VideoNullSink

Gets the built-in video null sink filter.

Declaration
public static Filter VideoNullSink { get; }
Property Value
Type Description
Filter
Remarks

The null sink filter consumes video frames without producing any output. It is useful when the output of a filter graph does not need to be retrieved.

View Source

VideoNullSource

Gets the built-in video null source filter.

Declaration
public static Filter VideoNullSource { get; }
Property Value
Type Description
Filter
Remarks

The null source filter generates synthetic video frames and is commonly used as the starting point of a filter graph when no external video input is available.

Methods

View Source

Equals(Filter)

Declaration
public bool Equals(Filter other)
Parameters
Type Name Description
Filter other
Returns
Type Description
bool
View Source

Equals(object?)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
ValueType.Equals(object)
View Source

GetFilterByName(string)

Retrieves a filter by its name.

Declaration
public static Filter GetFilterByName(string name)
Parameters
Type Name Description
string name

The name of the filter to retrieve.

Returns
Type Description
Filter

The filter associated with the specified name.

Exceptions
Type Condition
ArgumentException

Thrown if the filter with the specified name is not found.

View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()
View Source

ToString()

Returns the name of the filter as a string.

Declaration
public override string? ToString()
Returns
Type Description
string

The name of the filter.

Overrides
ValueType.ToString()
View Source

TryGetFilterByName(string, out Filter)

Attempts to retrieve a filter by its name.

Declaration
public static bool TryGetFilterByName(string name, out Filter filter)
Parameters
Type Name Description
string name

The name of the filter to retrieve.

Filter filter

When this method returns, contains the filter if found; otherwise, contains the default value.

Returns
Type Description
bool

true if the filter is found; otherwise, false.

Operators

View Source

operator ==(Filter, Filter)

Declaration
public static bool operator ==(Filter left, Filter right)
Parameters
Type Name Description
Filter left
Filter right
Returns
Type Description
bool
View Source

operator !=(Filter, Filter)

Declaration
public static bool operator !=(Filter left, Filter right)
Parameters
Type Name Description
Filter left
Filter right
Returns
Type Description
bool

Implements

IEquatable<T>
IAVPointer<T>
  • View Source
In this article
Back to top Generated by DocFX