9#ifndef AUDIO_OUTPUT_SETTINGS_H
10#define AUDIO_OUTPUT_SETTINGS_H
20#include "libavcodec/avcodec.h"
59 void AddSupportedRate(
int rate);
60 bool IsSupportedRate(
int rate);
61 int NearestSupportedRate(
int rate);
62 int BestSupportedRate();
68 static const char* FormatToString(
AudioFormat format);
70 static AudioFormat AVSampleFormatToFormat(AVSampleFormat format,
int bits = 0);
71 static AVSampleFormat FormatToAVSampleFormat(
AudioFormat format);
72 void AddSupportedChannels(
int channels);
73 bool IsSupportedChannels(
int channels);
74 int BestSupportedChannels();
89 {
return (m_features & arg) != 0U; };
91 {
return (m_features & arg) != 0U; };
132 void setFeature(
bool val,
int arg);
138 void SetBestSupportedChannels(
int channels);
144 int GetMaxHDRate()
const;
157 static QString GetPassthroughParams(
int codec,
int codec_profile,
158 int &samplerate,
int &channels,
171 void setELD(QByteArray *ba);
179 int BestSupportedChannelsELD();
183 int BestSupportedPCMChannelsELD();
186 void SortSupportedChannels();
193 int m_passthrough {-1};
197 bool m_invalid {
false};
204 bool m_hasEld {
false};
210 rate_array::iterator m_srIt { };
211 format_array::iterator m_sfIt { };
std::array< const int, 12 > rate_array
std::array< const AudioFormat, 6 > format_array
QString FeaturesToString(void) const
eld & getELD(void)
retrieve ELD data
AudioOutputSettings(const AudioOutputSettings &)=default
bool canFeature(DigitalFeature arg) const
return DigitalFeature mask.
std::vector< AudioFormat > m_formats
bool canLPCM() const
return true if device supports multichannels PCM (deprecated, see canFeature())
bool canAC3() const
return true if device can or may support AC3 (deprecated, see canFeature())
bool canFeature(unsigned int arg) const
static const format_array kStdFormats
void setFeature(unsigned int arg)
std::vector< int > m_rates
std::vector< int > m_channels
void setPassthrough(int val)
void setFeature(DigitalFeature arg)
set the provided digital feature possible values are:
bool canDTS() const
return true if device can or may support DTS (deprecated, see canFeature())
int canPassthrough() const
static const rate_array kStdRates
bool IsInvalid() const
return true if class instance is marked invalid.