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

RAII ::AVChannelLayout (av_channel_layout_copy / uninit). More...

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

Public Member Functions

 AVChannelLayout () noexcept
 Empty layout.
 AVChannelLayout (int channels) noexcept
 Default layout for channels (av_channel_layout_default).
 AVChannelLayout (const AVChannelLayout &other) noexcept
 Deep copy (av_channel_layout_copy).
 AVChannelLayout (AVChannelLayout &&other) noexcept
 Move constructor.
 ~AVChannelLayout () noexcept
 Destructor.
AVChannelLayout & operator= (const AVChannelLayout &other) noexcept
 Deep copy assignment.
AVChannelLayout & operator= (AVChannelLayout &&other) noexcept
 Move assignment.
 operator bool () const noexcept
 Whether a layout is stored.
int NbChannels () const noexcept
 Channel count (nb_channels).
std::uint64_t Mask () const noexcept
 Native bitmask (u.mask) when order is native.
int Order () const noexcept
 AVChannelOrder as int.
Safe::String Describe () const
 FFmpeg layout name (av_channel_layout_describe).
bool operator== (const AVChannelLayout &other) const noexcept
 av_channel_layout_compare == 0.
bool operator!= (const AVChannelLayout &other) const noexcept
 Inequality.

Static Public Member Functions

static AVChannelLayout Default (int channels) noexcept
 Default layout for channels.

Friends

struct Convert
 Allows the conversion bridge to access the C layout.
class AVCodecParameters
 Allows codec parameters to access the C layout.
class AVDecoder
 Allows the decoder to access the C layout.
class AVEncoder
 Allows the encoder to access the C layout.
class AVFrame
 Allows frames to access the C layout.
class Swr
 Allows the audio resampler to access the C layout.

Detailed Description

RAII ::AVChannelLayout (av_channel_layout_copy / uninit).

Named like the C struct so AVChannelLayout stereo(2) reads as av_channel_layout_default(&stereo, 2). The C type is ::AVChannelLayout.

Constructor & Destructor Documentation

◆ AVChannelLayout() [1/4]

StormByte::Multimedia::FFmpeg::AVChannelLayout::AVChannelLayout ( )
noexcept

Empty layout.

◆ AVChannelLayout() [2/4]

StormByte::Multimedia::FFmpeg::AVChannelLayout::AVChannelLayout ( int channels)
explicitnoexcept

Default layout for channels (av_channel_layout_default).

Parameters
channelsChannel count.

◆ AVChannelLayout() [3/4]

StormByte::Multimedia::FFmpeg::AVChannelLayout::AVChannelLayout ( const AVChannelLayout & other)
noexcept

Deep copy (av_channel_layout_copy).

Parameters
otherSource layout.

◆ AVChannelLayout() [4/4]

StormByte::Multimedia::FFmpeg::AVChannelLayout::AVChannelLayout ( AVChannelLayout && other)
noexcept

Move constructor.

other is left empty.

Parameters
otherSource layout.

◆ ~AVChannelLayout()

StormByte::Multimedia::FFmpeg::AVChannelLayout::~AVChannelLayout ( )
noexcept

Destructor.

av_channel_layout_uninit + free.

Member Function Documentation

◆ Default()

AVChannelLayout StormByte::Multimedia::FFmpeg::AVChannelLayout::Default ( int channels)
staticnoexcept

Default layout for channels.

Parameters
channelsChannel count.
Returns
Layout, or empty on failure.

◆ Describe()

Safe::String StormByte::Multimedia::FFmpeg::AVChannelLayout::Describe ( ) const

FFmpeg layout name (av_channel_layout_describe).

Returns
Name such as "stereo", or empty if there is no layout.

◆ Mask()

std::uint64_t StormByte::Multimedia::FFmpeg::AVChannelLayout::Mask ( ) const
noexcept

Native bitmask (u.mask) when order is native.

Returns
Mask, or 0.

◆ NbChannels()

int StormByte::Multimedia::FFmpeg::AVChannelLayout::NbChannels ( ) const
noexcept

Channel count (nb_channels).

Returns
Count, or 0.

◆ operator bool()

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

Whether a layout is stored.

Returns
true after a successful Default / copy.

◆ operator!=()

bool StormByte::Multimedia::FFmpeg::AVChannelLayout::operator!= ( const AVChannelLayout & other) const
noexcept

Inequality.

Parameters
otherOther layout.
Returns
true if not equal.

◆ operator=() [1/2]

AVChannelLayout & StormByte::Multimedia::FFmpeg::AVChannelLayout::operator= ( AVChannelLayout && other)
noexcept

Move assignment.

other is left empty.

Parameters
otherSource layout.
Returns
*this.

◆ operator=() [2/2]

AVChannelLayout & StormByte::Multimedia::FFmpeg::AVChannelLayout::operator= ( const AVChannelLayout & other)
noexcept

Deep copy assignment.

Parameters
otherSource layout.
Returns
*this.

◆ operator==()

bool StormByte::Multimedia::FFmpeg::AVChannelLayout::operator== ( const AVChannelLayout & other) const
noexcept

av_channel_layout_compare == 0.

Parameters
otherOther layout.
Returns
true if equal.

◆ Order()

int StormByte::Multimedia::FFmpeg::AVChannelLayout::Order ( ) const
noexcept

AVChannelOrder as int.

Returns
Order, or 0.

◆ AVCodecParameters

friend class AVCodecParameters
friend

Allows codec parameters to access the C layout.

◆ AVDecoder

friend class AVDecoder
friend

Allows the decoder to access the C layout.

◆ AVEncoder

friend class AVEncoder
friend

Allows the encoder to access the C layout.

◆ AVFrame

friend class AVFrame
friend

Allows frames to access the C layout.

◆ Convert

friend struct Convert
friend

Allows the conversion bridge to access the C layout.

◆ Swr

friend class Swr
friend

Allows the audio resampler to access the C layout.


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