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::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.
std::string Describe () const noexcept
 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
class AVCodecParameters
class AVDecoder
class AVEncoder
class AVFrame
class Swr

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()

std::string StormByte::Multimedia::FFmpeg::AVChannelLayout::Describe ( ) const
noexcept

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

◆ AVDecoder

friend class AVDecoder
friend

◆ AVEncoder

friend class AVEncoder
friend

◆ AVFrame

friend class AVFrame
friend

◆ Convert

friend struct Convert
friend

◆ Swr

friend class Swr
friend

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