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

Forward iterator over the codecs FFmpeg was built with.

#include <hwcontext.h>

Public Types

using iterator_category = std::forward_iterator_tag
 Standard iterator category tag.
using value_type = Codec
 Type produced by dereferencing.
using difference_type = std::ptrdiff_t
 Distance type required by the iterator traits.
using pointer = void
 No pointer-to-element type: the value is produced on dereference.
using reference = Codec
 Dereference result type.

Public Member Functions

 iterator ()=default
 End iterator.
 iterator (AVCodecID id, DeviceType type, bool encoders)
 Start the iteration and skip everything that does not match.
Codec operator* () const noexcept
 Codec at the current position.
iterator & operator++ () noexcept
 Advance to the next matching codec.
iterator operator++ (int) noexcept
 Advance, returning the previous position.
bool operator== (const iterator &other) const noexcept
 Compare positions.
bool operator!= (const iterator &other) const noexcept
 Compare positions.

Constructor & Destructor Documentation

◆ iterator()

av::hw::CodecRange::iterator::iterator ( AVCodecID id,
DeviceType type,
bool encoders )
inline
Parameters
idthe codec identifier to accept, or AV_CODEC_ID_NONE for any
typethe device type the codec must support
encoderstrue to look for encoders, false for decoders

Member Function Documentation

◆ operator!=()

bool av::hw::CodecRange::iterator::operator!= ( const iterator & other) const
inlinenoexcept
Parameters
otherthe iterator to compare with
Returns
true when the iterators point at different codecs

◆ operator*()

Codec av::hw::CodecRange::iterator::operator* ( ) const
inlinenoexcept
Returns
a wrapper around the FFmpeg codec

◆ operator++() [1/2]

iterator & av::hw::CodecRange::iterator::operator++ ( )
inlinenoexcept
Returns
this iterator

◆ operator++() [2/2]

iterator av::hw::CodecRange::iterator::operator++ ( int )
inlinenoexcept
Returns
a copy of the iterator before advancing

◆ operator==()

bool av::hw::CodecRange::iterator::operator== ( const iterator & other) const
inlinenoexcept
Parameters
otherthe iterator to compare with
Returns
true when both point at the same codec

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