|
avcpp 3.1.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
|
Strongly typed enum-like wrapper over an FFmpeg pixel or sample format. More...
#include <ffmpeg.h>
Public Member Functions | |
| constexpr | PixSampleFmtWrapper ()=default |
| Create a wrapper holding NoneValue. | |
| constexpr | PixSampleFmtWrapper (T fmt) noexcept |
| Wrap a raw enum value. | |
| operator T () const noexcept | |
| Implicit conversion to the FFmpeg enum. | |
| T | get () const noexcept |
| The stored enum value. | |
| operator T& () noexcept | |
| Mutable access to the stored value. | |
| WrapperClass & | operator= (T fmt) noexcept |
| Assign a raw enum value. | |
| void | set (T fmt) noexcept |
| Assign a raw enum value. | |
Protected Attributes | |
| T | m_fmt = NoneValue |
| The stored enum value. | |
Friends | |
| std::ostream & | operator<< (std::ostream &ost, WrapperClass fmt) |
| Print the format name. | |
The concrete wrappers (PixelFormat, SampleFormat) add name lookup and comparison; this template supplies the storage and the conversions that let a wrapper be passed wherever FFmpeg expects the raw enum.
| WrapperClass | the derived type, for the assignment operator |
| T | the FFmpeg enum type |
| NoneValue | the value meaning "unset", usually -1 |
|
inlineconstexprnoexcept |
| fmt | the value to store |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Lets FFmpeg fill the value in place, for example through a pointer parameter.
|
inlinenoexcept |
| fmt | the value to store |
|
inlinenoexcept |
| fmt | the value to store |
|
friend |
| ost | the stream to write to |
| fmt | the wrapper to print |