10 #if AVCPP_API_NEW_CHANNEL_LAYOUT
12 #include <libavutil/channel_layout.h>
17 std::string channel_name(AVChannel channel);
18 std::string channel_description(AVChannel channel);
19 AVChannel channel_from_string(
const std::string &name);
20 AVChannel channel_from_string(
const char *name);
24 class ChannelLayoutView
27 ChannelLayoutView() noexcept;
29 ChannelLayoutView(const AVChannelLayout &layout) noexcept;
33 template<typename Callable>
34 static
void iterate(Callable callable) {
36 const AVChannelLayout *playout;
37 while ((playout = av_channel_layout_standard(&iter))) {
38 if (callable(ChannelLayoutView(*playout)))
43 static void dumpLayouts();
54 AVChannelLayout *raw();
55 const AVChannelLayout *raw()
const;
57 int channels() const noexcept;
58 uint64_t layout() const noexcept;
59 uint64_t subset(uint64_t mask) const noexcept;
60 bool isValid() const noexcept;
61 std::
string describe() const;
62 void describe(
std::
string &desc) const;
64 int index(AVChannel channel) const;
65 int index(const
char *name) const;
67 AVChannel channel(
unsigned int index) const;
68 AVChannel channel(const
char *name) const;
70 bool operator==(const ChannelLayoutView &other) const noexcept;
72 ChannelLayout clone() const;
75 AVChannelLayout m_layout{};
80 class ChannelLayout :
public ChannelLayoutView
83 ChannelLayout() =
default;
85 explicit ChannelLayout(
const ChannelLayoutView &view);
87 using ChannelLayoutView::ChannelLayoutView;
89 ChannelLayout(
const ChannelLayout& other);
90 ChannelLayout& operator=(
const ChannelLayout& other);
92 ChannelLayout(ChannelLayout&& other);
93 ChannelLayout& operator=(ChannelLayout&& other);
105 explicit ChannelLayout(std::bitset<64> mask);
106 explicit ChannelLayout(
const char *str);
107 explicit ChannelLayout(
int channels);
113 void swap(ChannelLayout &other);
Definition: audioresampler.cpp:8
Definition: averror.h:228