StormByte-Multimedia 3.3.2
C++26 multimedia processing module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Multimedia::Pipeline::Config::Audio Class Reference

Audio-track encoding intention, or Remux without a codec. More...

#include <StormByte/multimedia/pipeline/config/audio.hxx>

Inheritance diagram for StormByte::Multimedia::Pipeline::Config::Audio:
Collaboration diagram for StormByte::Multimedia::Pipeline::Config::Audio:

Public Member Functions

PointerType Clone () const override
 Deep copy in Multimedia; the registry codec remains borrowed.
PointerType Move () override
 Move into a new pointer in Multimedia.
Lifecycle
 Audio ()
 Empty audio config (Remux until Codec is set).
 Audio (const Audio &other)
 Copy constructor.
 Audio (Audio &&other)
 Move constructor.
virtual ~Audio () noexcept override
 Destructor.
Audio & operator= (const Audio &other)
 Copy assignment.
Audio & operator= (Audio &&other) noexcept
 Move assignment.
Encode
const StormByte::Multimedia::Codec * Codec () const noexcept
 Destination codec.
void Codec (const StormByte::Multimedia::Codec &codec) noexcept
 Sets the destination codec (Encode).
const StormByte::Safe::Optional< double > & CRF () const noexcept
 Constant quality in the encoder's native scale.
void CRF (double value)
 Sets constant quality and clears BitRate.
const StormByte::Safe::Optional< std::int64_t > & BitRate () const noexcept
 Target bitrate.
void BitRate (std::int64_t bits_per_second)
 Sets target bitrate and clears CRF.
const StormByte::Safe::Optional< std::int64_t > & MaxBitRate () const noexcept
 Maximum bitrate.
void MaxBitRate (std::int64_t bits_per_second)
 Sets maximum bitrate.
const StormByte::Safe::Optional< StormByte::Safe::String > & Preset () const noexcept
 Encoder preset, if the implementation has one.
void Preset (StormByte::Safe::String name)
 Sets the preset.
const StormByte::Safe::Map< StormByte::Safe::String, StormByte::Safe::String > & FineTune () const noexcept
 Vendor leftovers.
void FineTune (StormByte::Safe::Map< StormByte::Safe::String, StormByte::Safe::String > options) noexcept
 Replaces the vendor dict.
Public Member Functions inherited from StormByte::Multimedia::Pipeline::Config::Base
 Base (const Base &other)
 Copy constructor.
 Base (Base &&other) noexcept
 Move constructor.
virtual ~Base () noexcept override
 Destructor.
Base & operator= (const Base &other)
 Copy assignment.
Base & operator= (Base &&other) noexcept
 Move assignment.
constexpr enum StormByte::Multimedia::Type Type () const noexcept
 Media stamped by the leaf constructor.
const StormByte::Safe::Optional< StormByte::Safe::String > & Language () const noexcept
 Language override.
void Language (StormByte::Safe::String language)
 Sets the language override.
void RemoveLanguage ()
 Writes the track without a language tag, even if the source has one.
const StormByte::Safe::Optional< StormByte::Safe::String > & Title () const noexcept
 Title override.
void Title (StormByte::Safe::String title)
 Sets the title override.
void RemoveTitle ()
 Writes the track without a title, even if the source has one.
const StormByte::Safe::Optional< bool > & Default () const noexcept
 Default-disposition override.
void Default (StormByte::Safe::Optional< bool > value) noexcept
 Sets or clears the default-disposition override.
const StormByte::Safe::Optional< bool > & Forced () const noexcept
 Forced-disposition override.
void Forced (StormByte::Safe::Optional< bool > value) noexcept
 Sets or clears the forced-disposition override.
const struct Implementation & Implementation () const noexcept
 Decoder / encoder pins.
void Implementation (struct Implementation implementation) noexcept
 Replaces both pins.
Public Member Functions inherited from StormByte::Safe::Clonable< Base, StormByte::Safe::Unique< Base > >
constexpr Clonable ()=default
constexpr Clonable & operator= (const Clonable &)=default
virtual constexpr ~Clonable () noexcept=default

Additional Inherited Members

Public Types inherited from StormByte::Safe::Clonable< Base, StormByte::Safe::Unique< Base > >
typedef SmartPointer PointerType
Static Public Member Functions inherited from StormByte::Safe::Clonable< Base, StormByte::Safe::Unique< Base > >
static PointerType MakePointer (Args &&... args)
Protected Member Functions inherited from StormByte::Multimedia::Pipeline::Config::Base
 Base (enum StormByte::Multimedia::Type type)
 Empty overrides; media fixed for the leaf lifetime.

Detailed Description

Audio-track encoding intention, or Remux without a codec.

Boundary use requires a compatible C++ ABI and loaded provider modules. Codec pointers borrow registry storage, which must outlive this config and its copies. Further derived providers must supply safe fields, provider-local lifecycle operations, virtual destruction and Clone/Move overrides that preserve their dynamic type; this declaration does not certify them. Optional arrow access yields a read-only full-expression snapshot, not mutable storage. Const map iteration yields entry copies, not references.

Constructor & Destructor Documentation

◆ Audio() [1/3]

StormByte::Multimedia::Pipeline::Config::Audio::Audio ( )

Empty audio config (Remux until Codec is set).

◆ Audio() [2/3]

StormByte::Multimedia::Pipeline::Config::Audio::Audio ( const Audio & other)

Copy constructor.

Parameters
otherSource config.

◆ Audio() [3/3]

StormByte::Multimedia::Pipeline::Config::Audio::Audio ( Audio && other)

Move constructor.

Parameters
otherConfig to take.

◆ ~Audio()

virtual StormByte::Multimedia::Pipeline::Config::Audio::~Audio ( )
overridevirtualnoexcept

Destructor.

Member Function Documentation

◆ BitRate() [1/2]

const StormByte::Safe::Optional< std::int64_t > & StormByte::Multimedia::Pipeline::Config::Audio::BitRate ( ) const
inlinenoexcept

Target bitrate.

Returns
Bits per second, or empty: the encoder picks its own default.
Note
The source bitrate is never inherited.

◆ BitRate() [2/2]

void StormByte::Multimedia::Pipeline::Config::Audio::BitRate ( std::int64_t bits_per_second)

Sets target bitrate and clears CRF.

Parameters
bits_per_secondBits per second.
Note
Safe optional assignment may throw on storage failure.

◆ Clone()

PointerType StormByte::Multimedia::Pipeline::Config::Audio::Clone ( ) const
overridevirtual

Deep copy in Multimedia; the registry codec remains borrowed.

Returns
Owning pointer to a new Audio.

Implements StormByte::Safe::Clonable< Base, StormByte::Safe::Unique< Base > >.

◆ Codec() [1/2]

const StormByte::Multimedia::Codec * StormByte::Multimedia::Pipeline::Config::Audio::Codec ( ) const
inlinenoexcept

Destination codec.

Returns
Registry codec, or nullptr if this track is Remux.
Note
The registry and its provider must remain alive while used.

◆ Codec() [2/2]

void StormByte::Multimedia::Pipeline::Config::Audio::Codec ( const StormByte::Multimedia::Codec & codec)
inlinenoexcept

Sets the destination codec (Encode).

Parameters
codecRegistry codec. Must be audio at Plan validation.
Note
Borrows the codec; its registry must outlive this config and copies.

◆ CRF() [1/2]

const StormByte::Safe::Optional< double > & StormByte::Multimedia::Pipeline::Config::Audio::CRF ( ) const
inlinenoexcept

Constant quality in the encoder's native scale.

Incompatible with BitRate.

Returns
Value, or empty.
Note
libvorbis uses -1..10 and libmp3lame VBR uses 0..9 (lower is better).

◆ CRF() [2/2]

void StormByte::Multimedia::Pipeline::Config::Audio::CRF ( double value)

Sets constant quality and clears BitRate.

Parameters
valueQuality in the encoder's native scale.
Note
Safe optional assignment may throw on storage failure.

◆ FineTune() [1/2]

const StormByte::Safe::Map< StormByte::Safe::String, StormByte::Safe::String > & StormByte::Multimedia::Pipeline::Config::Audio::FineTune ( ) const
inlinenoexcept

Vendor leftovers.

Not bitrate / preset.

Returns
Key/value map.
Note
Iterator dereference returns an entry copy, not a mutable reference.

◆ FineTune() [2/2]

void StormByte::Multimedia::Pipeline::Config::Audio::FineTune ( StormByte::Safe::Map< StormByte::Safe::String, StormByte::Safe::String > options)
noexcept

Replaces the vendor dict.

Parameters
optionsKey/value pairs.

◆ MaxBitRate() [1/2]

const StormByte::Safe::Optional< std::int64_t > & StormByte::Multimedia::Pipeline::Config::Audio::MaxBitRate ( ) const
inlinenoexcept

Maximum bitrate.

Returns
Bits per second, or empty.

◆ MaxBitRate() [2/2]

void StormByte::Multimedia::Pipeline::Config::Audio::MaxBitRate ( std::int64_t bits_per_second)

Sets maximum bitrate.

Parameters
bits_per_secondMax bitrate.
Note
Safe optional assignment may throw on storage failure.

◆ Move()

PointerType StormByte::Multimedia::Pipeline::Config::Audio::Move ( )
overridevirtual

Move into a new pointer in Multimedia.

Returns
Owning pointer to the moved Audio.

Implements StormByte::Safe::Clonable< Base, StormByte::Safe::Unique< Base > >.

◆ operator=() [1/2]

Audio & StormByte::Multimedia::Pipeline::Config::Audio::operator= ( Audio && other)
noexcept

Move assignment.

Parameters
otherConfig to take.
Returns
*this.

◆ operator=() [2/2]

Audio & StormByte::Multimedia::Pipeline::Config::Audio::operator= ( const Audio & other)

Copy assignment.

Parameters
otherSource config.
Returns
*this.

◆ Preset() [1/2]

const StormByte::Safe::Optional< StormByte::Safe::String > & StormByte::Multimedia::Pipeline::Config::Audio::Preset ( ) const
inlinenoexcept

Encoder preset, if the implementation has one.

Returns
Name, or empty.

◆ Preset() [2/2]

void StormByte::Multimedia::Pipeline::Config::Audio::Preset ( StormByte::Safe::String name)

Sets the preset.

Empty clears it.

Parameters
namePreset name.
Note
Safe optional assignment may throw on storage failure.

The documentation for this class was generated from the following file:
  • lib/public/StormByte/multimedia/pipeline/config/audio.hxx