avcpp 3.2.1
Wrapper for the FFmpeg that simplify usage from C++ projects.
Loading...
Searching...
No Matches
av::Filter Class Reference

A filter descriptor: the static description of one filter. More...

#include <filter.h>

Inheritance diagram for av::Filter:

Public Member Functions

 Filter (const AVFilter *ptr)
 Wrap an FFmpeg filter descriptor.
 Filter (const std::string &name)
 Look a filter up by name.
 Filter (const char *name)
 Look a filter up by name.
bool setFilter (const std::string &name)
 Point the wrapper at another filter.
bool setFilter (const char *name)
 Point the wrapper at another filter.
std::string name () const
 Name of the filter.
std::string description () const
 Description of what the filter does.
FilterPadList inputs () const
 Inputs of the filter.
FilterPadList outputs () const
 Outputs of the filter.
int flags () const
 AVFILTER_FLAG_* flags of the filter.
 operator bool () const
 Whether the wrapper points at a filter.
Public Member Functions inherited from FFWrapperPtr< const AVFilter >
 FFWrapperPtr ()=default
 Create an empty wrapper; isNull() is true.
const const AVFilter * raw () const
 Read access to the wrapped object.
void reset (const AVFilter *raw=nullptr)
 Replace the stored pointer.
bool isNull () const
 Whether the wrapper is empty.
void _log (int level, const char *fmt) const
 Log through the FFmpeg log system, using this wrapper as the context.

Additional Inherited Members

Protected Attributes inherited from FFWrapperPtr< const AVFilter >
const AVFilter * m_raw
 The wrapped pointer; owned by the derived class, not by this template.

Detailed Description

A descriptor says what the filter is called, what it does, how many inputs and outputs it has and which flags it sets. It is not a filter instance: to use one, add it to a FilterGraph.

Examples
api2-decode-filter-encode.cpp.

Constructor & Destructor Documentation

◆ Filter() [1/3]

av::Filter::Filter ( const AVFilter * ptr)
Parameters
ptrthe descriptor; the library owns it

◆ Filter() [2/3]

av::Filter::Filter ( const std::string & name)
explicit
Parameters
namethe filter name, for example "scale"

◆ Filter() [3/3]

av::Filter::Filter ( const char * name)
explicit
Parameters
namethe filter name, for example "scale"

Member Function Documentation

◆ description()

std::string av::Filter::description ( ) const
Returns
the description text, or an empty string when the wrapper is empty

◆ flags()

int av::Filter::flags ( ) const
Returns
the flag mask

◆ inputs()

FilterPadList av::Filter::inputs ( ) const
Returns
a non-owning list of pads

◆ name()

std::string av::Filter::name ( ) const
Returns
the name, or an empty string when the wrapper is empty

◆ operator bool()

av::Filter::operator bool ( ) const
Returns
true when a descriptor is set

◆ outputs()

FilterPadList av::Filter::outputs ( ) const
Returns
a non-owning list of pads

◆ setFilter() [1/2]

bool av::Filter::setFilter ( const char * name)
Parameters
namethe filter name
Returns
true when the name was found

◆ setFilter() [2/2]

bool av::Filter::setFilter ( const std::string & name)
Parameters
namethe filter name
Returns
true when the name was found

The documentation for this class was generated from the following file: