StormByte C++ Library: Multimedia module 0.0.9999
StormByte-Multimedia is a StormByte library module for parsing configuration files
Loading...
Searching...
No Matches
StormByte::Multimedia::FFmpeg::Dictionary Class Reference

RAII AVDictionary for muxer metadata / options. More...

#include <StormByte/multimedia/ffmpeg/Dictionary.hxx>

Inheritance diagram for StormByte::Multimedia::FFmpeg::Dictionary:
Collaboration diagram for StormByte::Multimedia::FFmpeg::Dictionary:

Public Member Functions

 Dictionary () noexcept
 Empty dictionary.
 Dictionary (Dictionary &&other) noexcept=default
 Move constructor.
 ~Dictionary () noexcept override
 Destructor.
Dictionary & operator= (Dictionary &&other) noexcept=default
 Move assignment.
 operator bool () const noexcept
 Whether any entry is stored.
bool Set (const char *key, const char *value, int flags=0) noexcept
 Sets key to value (av_dict_set).
const char * Value (const char *key) const noexcept
 Looks up key.
int Count () const noexcept
 Number of entries.
Public Member Functions inherited from StormByte::Multimedia::FFmpeg::AVPointer<::AVDictionary >
constexpr AVPointer () noexcept=delete
 Default constructor (deleted).
virtual ~AVPointer () noexcept=default
 Destructor.
constexpr AVPointer & operator= (const AVPointer &) noexcept=delete
 Copy assignment (deleted).

Friends

class AVFormatContext

Additional Inherited Members

Protected Member Functions inherited from StormByte::Multimedia::FFmpeg::AVPointer<::AVDictionary >
constexpr const std::decay_t< ::AVDictionary > * Get () const noexcept
 Const view of the raw FFmpeg pointer.
constexpr std::decay_t< ::AVDictionary > * Detach () noexcept
 Yields the raw pointer and leaves this wrapper empty.
Protected Attributes inherited from StormByte::Multimedia::FFmpeg::AVPointer<::AVDictionary >
std::decay_t< ::AVDictionary > * m_ptr
 Owned FFmpeg pointer.

Detailed Description

RAII AVDictionary for muxer metadata / options.

Constructor & Destructor Documentation

◆ Dictionary() [1/2]

StormByte::Multimedia::FFmpeg::Dictionary::Dictionary ( )
noexcept

Empty dictionary.

◆ Dictionary() [2/2]

StormByte::Multimedia::FFmpeg::Dictionary::Dictionary ( Dictionary && other)
defaultnoexcept

Move constructor.

Transfers the dictionary.

Parameters
otherSource dictionary; left empty.

◆ ~Dictionary()

StormByte::Multimedia::FFmpeg::Dictionary::~Dictionary ( )
overridenoexcept

Destructor.

Frees the AVDictionary.

Member Function Documentation

◆ Count()

int StormByte::Multimedia::FFmpeg::Dictionary::Count ( ) const
noexcept

Number of entries.

Returns
Count, or 0.

◆ operator bool()

StormByte::Multimedia::FFmpeg::Dictionary::operator bool ( ) const
explicitnoexcept

Whether any entry is stored.

Returns
true if the dictionary is non-empty.

◆ operator=()

Dictionary & StormByte::Multimedia::FFmpeg::Dictionary::operator= ( Dictionary && other)
defaultnoexcept

Move assignment.

Frees *this, then takes other.

Parameters
otherSource dictionary; left empty.
Returns
*this.

◆ Set()

bool StormByte::Multimedia::FFmpeg::Dictionary::Set ( const char * key,
const char * value,
int flags = 0 )
noexcept

Sets key to value (av_dict_set).

Parameters
keyEntry key.
valueEntry value. nullptr deletes the key.
flagsAV_DICT_* flags.
Returns
false on failure.

◆ Value()

const char * StormByte::Multimedia::FFmpeg::Dictionary::Value ( const char * key) const
noexcept

Looks up key.

Parameters
keyEntry key.
Returns
Value pointer, or nullptr.

◆ AVFormatContext

friend class AVFormatContext
friend

The documentation for this class was generated from the following file: