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

Forward iterator that creates and destroys one device per step.

#include <hwcontext.h>

Public Types

using iterator_category = std::forward_iterator_tag
 Standard iterator category tag.
using value_type = DeviceProbe
 Type produced by dereferencing.
using difference_type = std::ptrdiff_t
 Distance type required by the iterator traits.
using pointer = const DeviceProbe*
 Pointer to the probe result.
using reference = const DeviceProbe&
 Reference to the probe result.

Public Member Functions

 iterator ()=default
 End iterator.
 iterator (DeviceType type, const char *device)
 Start at the given type and probe it immediately.
reference operator* () const noexcept
 Result of the current probe.
pointer operator-> () const noexcept
 Result of the current probe.
iterator & operator++ () noexcept
 Move to the next type and probe it.
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::DeviceProbeRange::iterator::iterator ( DeviceType type,
const char * device )
inline
Parameters
typethe first device type to probe
devicebackend-specific selector, borrowed for the whole iteration

Member Function Documentation

◆ operator!=()

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

◆ operator*()

reference av::hw::DeviceProbeRange::iterator::operator* ( ) const
inlinenoexcept
Returns
the probe of the type the iterator points at

◆ operator++() [1/2]

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

◆ operator++() [2/2]

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

◆ operator->()

pointer av::hw::DeviceProbeRange::iterator::operator-> ( ) const
inlinenoexcept
Returns
a pointer to the probe result

◆ operator==()

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

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