Immutable codec identity owned by Registry.
More...
#include <StormByte/multimedia/codec.hxx>
Immutable codec identity owned by Registry.
Codec identity owned by the multimedia registry.
Immutable codec identity and implementation discovery.
Name() is the StormByte key. FFmpeg ids live only in the registry map.
◆ Codec() [1/2]
| StormByte::Multimedia::Codec::Codec |
( |
const Codec & | other | ) |
|
|
deletenoexcept |
Copy is disabled; instances are unique in the registry.
- Parameters
-
◆ Codec() [2/2]
| StormByte::Multimedia::Codec::Codec |
( |
Codec && | other | ) |
|
|
noexcept |
Move constructor executed by the multimedia provider.
- Parameters
-
◆ ~Codec()
| StormByte::Multimedia::Codec::~Codec |
( |
| ) |
|
|
noexcept |
Destroy the identity in the multimedia provider.
◆ Decoders()
Lists decoder implementations usable by this codec's backend.
- Parameters
-
| need | Input capabilities required from each implementation; empty lists all. |
- Returns
- Matching implementations with FFmpeg's unpinned default first, followed by table alternatives in stable preference order. Empty when no matching decoder is available.
- Note
- Names can pin the decoder, not the encoder. Each pin must match the source stream's codec id. Hardware-only and experimental decoders are excluded because the backend does not configure their prerequisites. This includes FFmpeg's native hardware-only av1 decoder even when its capability flags do not identify the hardware requirement. Unclassified generic and subtitle defaults have empty features and only satisfy empty requirements. Filtering never changes the unpinned backend default: pin the returned name to select a filtered alternative. Availability does not guarantee that damaged or unsupported input opens.
◆ Description()
| std::string_view StormByte::Multimedia::Codec::Description |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Human description.
- Returns
- View to a process-lifetime literal.
◆ Encoders()
Lists the available encoder implementations for this codec.
- Parameters
-
| need | Features each listed implementation must preserve; empty lists all. |
- Returns
- Implementations ordered by preference. The first one is the implementation Multimedia picks when no encoder is pinned and
need is the required feature set. Empty when the codec is not writable.
- Note
- Availability means the linked FFmpeg provides the encoder; hardware devices are not probed.
◆ HasAccess() [1/2]
| bool StormByte::Multimedia::Codec::HasAccess |
( |
Access | access | ) |
const |
|
noexcept |
Tests Read/Write flags.
- Parameters
-
- Returns
- true if every bit in
access is set.
◆ HasAccess() [2/2]
| bool StormByte::Multimedia::Codec::HasAccess |
( |
Access | access, |
|
|
const Features & | need ) const |
|
noexcept |
Tests access while preserving all requested features.
- Parameters
-
| access | Flags to test; Read and Write are checked independently. |
| need | Features required from a single implementation per direction. |
- Returns
- true if the generic access flags are set and each requested direction has an available implementation whose table row covers
need.
- Note
- Empty features are identical to HasAccess(access). Nonempty features use StormByte codec names and FFmpeg implementation names, never the generic FFmpeg codec-id fallback. Missing rows return false. This does not probe hardware devices, settings or container compatibility.
◆ Name()
| std::string_view StormByte::Multimedia::Codec::Name |
( |
| ) |
const |
|
inlineconstexprnoexcept |
StormByte codec name.
- Returns
- View to a process-lifetime literal.
◆ operator!=()
| bool StormByte::Multimedia::Codec::operator!= |
( |
const Codec & | other | ) |
const |
|
noexcept |
Identity inequality.
- Parameters
-
- Returns
- true if they are different instances.
◆ operator=() [1/2]
| Codec & StormByte::Multimedia::Codec::operator= |
( |
Codec && | other | ) |
|
|
noexcept |
Move assignment executed by the multimedia provider.
- Parameters
-
- Returns
- *this.
◆ operator=() [2/2]
| Codec & StormByte::Multimedia::Codec::operator= |
( |
const Codec & | other | ) |
|
|
deletenoexcept |
Copy assignment is disabled.
- Parameters
-
- Returns
- *this.
◆ operator==()
| bool StormByte::Multimedia::Codec::operator== |
( |
const Codec & | other | ) |
const |
|
noexcept |
Identity equality (same registry slot).
- Parameters
-
- Returns
- true if both refer to the same instance.
◆ SubtitleKind()
Classifies subtitle content independently of codec availability.
- Returns
- Empty for non-subtitle codecs; Text, Bitmap or Unknown otherwise.
- Note
- Describes the format, not decoder output or OCR availability. Binary-packed text such as mov_text is Text, not Bitmap.
◆ Type()
| enum Type StormByte::Multimedia::Codec::Type |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Media kind of this codec.
- Returns
- Type value.
◆ Registry
Registry creates codec identities from static tables.
The documentation for this class was generated from the following file: