A four-character code (FourCC) identifier. More...
#include <fourcc.h>
Public Member Functions | |
| constexpr | FourCC (char c0, char c1, char c2, char c3) |
| Constructs a FourCC from four individual characters. | |
| template<size_t N> | |
| constexpr | FourCC (const char(&str)[N]) |
| Constructs a FourCC from a string literal. | |
| constexpr uint32_t | value () const |
| Returns the packed 32-bit integer value. | |
Friends | |
| constexpr bool | operator== (const FourCC &a, const FourCC &b) |
| Returns true if both FourCC values are equal. | |
| constexpr bool | operator!= (const FourCC &a, const FourCC &b) |
| Returns true if the FourCC values are not equal. | |
| constexpr bool | operator< (const FourCC &a, const FourCC &b) |
| Less-than comparison by numeric value. | |
| constexpr bool | operator> (const FourCC &a, const FourCC &b) |
| Greater-than comparison by numeric value. | |
| constexpr bool | operator<= (const FourCC &a, const FourCC &b) |
| Less-than-or-equal comparison by numeric value. | |
| constexpr bool | operator>= (const FourCC &a, const FourCC &b) |
| Greater-than-or-equal comparison by numeric value. | |
A four-character code (FourCC) identifier.
Stores four ASCII characters packed into a 32-bit integer in big-endian order. Commonly used to identify codecs, pixel formats, and container formats in multimedia applications. All operations are constexpr and suitable for use as compile-time constants.
Constructs a FourCC from four individual characters.
| c0 | First (most significant) character. |
| c1 | Second character. |
| c2 | Third character. |
| c3 | Fourth (least significant) character. |
Constructs a FourCC from a string literal.
| N | The size of the string literal (must be 5, including null terminator). |
| str | A 4-character string literal (e.g. "RIFF"). |
Returns the packed 32-bit integer value.