2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "cores/VideoPlayer/Interface/StreamInfo.h"
12 #include "settings/dialogs/GUIDialogSettingsManualBase.h"
18 enum class IPlayerAudioCaps
;
20 struct IntegerSettingOption
;
22 class CGUIDialogAudioSettings
: public CGUIDialogSettingsManualBase
25 CGUIDialogAudioSettings();
26 ~CGUIDialogAudioSettings() override
;
28 // specialization of CGUIWindow
29 void FrameMove() override
;
31 static std::string
FormatDelay(float value
, float interval
);
32 static std::string
FormatDecibel(float value
);
33 static std::string
FormatPercentAsDecibel(float value
);
36 // implementations of ISettingCallback
37 void OnSettingChanged(const std::shared_ptr
<const CSetting
>& setting
) override
;
38 void OnSettingAction(const std::shared_ptr
<const CSetting
>& setting
) override
;
40 // specialization of CGUIDialogSettingsBase
41 bool AllowResettingSettings() const override
{ return false; }
43 void SetupView() override
;
45 // specialization of CGUIDialogSettingsManualBase
46 void InitializeSettings() override
;
48 bool SupportsAudioFeature(IPlayerAudioCaps feature
);
50 void AddAudioStreams(const std::shared_ptr
<CSettingGroup
>& group
, const std::string
& settingId
);
52 static bool IsPlayingPassthrough(const std::string
& condition
,
53 const std::string
& value
,
54 const std::shared_ptr
<const CSetting
>& setting
,
57 static void AudioStreamsOptionFiller(const std::shared_ptr
<const CSetting
>& setting
,
58 std::vector
<IntegerSettingOption
>& list
,
62 static std::string
SettingFormatterDelay(
63 const std::shared_ptr
<const CSettingControlSlider
>& control
,
64 const CVariant
& value
,
65 const CVariant
& minimum
,
67 const CVariant
& maximum
);
68 static std::string
SettingFormatterPercentAsDecibel(
69 const std::shared_ptr
<const CSettingControlSlider
>& control
,
70 const CVariant
& value
,
71 const CVariant
& minimum
,
73 const CVariant
& maximum
);
77 bool m_passthrough
= false;
79 std::vector
<IPlayerAudioCaps
> m_audioCaps
;
82 static std::string
FormatFlags(StreamFlags flags
);