|
avcpp 3.1.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
|
Owner of an AVHWFramesContext. More...
#include <hwcontext.h>
Public Member Functions | |
| bool | isValid () const noexcept |
| Whether the wrapper holds a pool. | |
| DeviceContext | device () const noexcept |
| The device this pool belongs to. | |
| PixelFormat | format () const noexcept |
| The hardware format of the surfaces in the pool. | |
| PixelFormat | swFormat () const noexcept |
| The system-memory format used to transfer frames into and out of the pool. | |
| int | width () const noexcept |
| Surface width. | |
| int | height () const noexcept |
| Surface height. | |
| PixelFormatList | transferFormats (AVHWFrameTransferDirection direction, OptionalErrorCode ec=throws()) const |
| Formats that frames can be transferred to or from this pool. | |
| AVHWFramesContext * | raw () const noexcept |
| The underlying FFmpeg frames context. | |
| AVBufferRef * | bufferRef () const noexcept |
| The reference-counted buffer that owns the frames context. | |
Static Public Member Functions | |
| static FramesContext | create (const DeviceContext &device, PixelFormat format, PixelFormat swFormat, int width, int height, int initialPoolSize=0, OptionalErrorCode ec=throws()) |
| Create and initialize a hardware frames context (a pool of surfaces). | |
| static FramesContext | wrap (AVBufferRef *ref) noexcept |
| Take a reference to an existing AVHWFrameContext buffer. | |
|
noexcept |
|
static |
| device | the device the surfaces live on |
| format | the hardware surface format, usually hwPixelFormat(device.type()) |
| swFormat | the format used when a frame is transferred to system memory; AV_PIX_FMT_NONE lets FFmpeg choose |
| width | frame width in pixels |
| height | frame height in pixels |
| initialPoolSize | number of surfaces; zero lets FFmpeg choose |
| ec | holder for the error code |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
| PixelFormatList av::hw::FramesContext::transferFormats | ( | AVHWFrameTransferDirection | direction, |
| OptionalErrorCode | ec = throws() ) const |
| direction | AV_HWFRAME_TRANSFER_DIRECTION_TO for uploads into the pool, AV_HWFRAME_TRANSFER_DIRECTION_FROM for downloads |
| ec | holder for the error code |
|
noexcept |
|
staticnoexcept |
| ref | the buffer to reference; may be null |