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

Owner of AVHWFramesConstraints. More...

#include <hwcontext.h>

Public Member Functions

 FrameConstraints ()=default
 Create an empty value; isValid() is false.
bool isValid () const noexcept
 Whether constraints were obtained.
PixelFormatRange hwFormats () const noexcept
 Hardware surface formats the device supports.
PixelFormatRange swFormats () const noexcept
 System-memory formats that can be transferred to the device.
int minWidth () const noexcept
 Smallest supported width.
int maxWidth () const noexcept
 Largest supported width.
int minHeight () const noexcept
 Smallest supported height.
int maxHeight () const noexcept
 Largest supported height.

Static Public Member Functions

static FrameConstraints query (const DeviceContext &device, OptionalErrorCode ec=throws())
 Ask the device for its frame constraints.

Detailed Description

hwFormats() and swFormats() return non-owning views into the owned struct.

Examples
api2-hw-probe.cpp.

Member Function Documentation

◆ hwFormats()

PixelFormatRange av::hw::FrameConstraints::hwFormats ( ) const
noexcept
Returns
a non-owning view into the owned structure
Examples
api2-hw-probe.cpp.

◆ isValid()

bool av::hw::FrameConstraints::isValid ( ) const
inlinenoexcept
Returns
true when the value owns a constraints structure
Examples
api2-hw-probe.cpp.

◆ maxHeight()

int av::hw::FrameConstraints::maxHeight ( ) const
noexcept
Returns
the maximum height in pixels
Examples
api2-hw-probe.cpp.

◆ maxWidth()

int av::hw::FrameConstraints::maxWidth ( ) const
noexcept
Returns
the maximum width in pixels
Examples
api2-hw-probe.cpp.

◆ minHeight()

int av::hw::FrameConstraints::minHeight ( ) const
noexcept
Returns
the minimum height in pixels
Examples
api2-hw-probe.cpp.

◆ minWidth()

int av::hw::FrameConstraints::minWidth ( ) const
noexcept
Returns
the minimum width in pixels
Examples
api2-hw-probe.cpp.

◆ query()

FrameConstraints av::hw::FrameConstraints::query ( const DeviceContext & device,
OptionalErrorCode ec = throws() )
static
Parameters
devicethe device to query
echolder for the error code
Returns
an owning value; invalid when the device reports no constraints
Note
Some backends report very wide bounds, from 0x0 to INT_MAX. Treat the numbers as allowed ranges, not as the capabilities of the silicon.
Examples
api2-hw-probe.cpp.

◆ swFormats()

PixelFormatRange av::hw::FrameConstraints::swFormats ( ) const
noexcept
Returns
a non-owning view into the owned structure
Examples
api2-hw-probe.cpp.

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