[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / addons / Visualization.h
bloba6eefa6123575fcc5d8c7e4727fa54bf0eeabc94
1 /*
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.
7 */
9 #pragma once
11 #include "addons/binary-addons/AddonInstanceHandler.h"
12 #include "addons/kodi-dev-kit/include/kodi/addon-instance/Visualization.h"
14 namespace KODI
16 namespace ADDONS
19 class CVisualization : public ADDON::IAddonInstanceHandler
21 public:
22 CVisualization(const ADDON::AddonInfoPtr& addonInfo, float x, float y, float w, float h);
23 ~CVisualization() override;
25 bool Start(int channels, int samplesPerSec, int bitsPerSample, const std::string& songName);
26 void Stop();
27 void AudioData(const float* audioData, int audioDataLength);
28 bool IsDirty();
29 void Render();
30 int GetSyncDelay();
31 bool NextPreset();
32 bool PrevPreset();
33 bool LoadPreset(int select);
34 bool RandomPreset();
35 bool LockPreset();
36 bool RatePreset(bool plus_minus);
37 bool UpdateAlbumart(const char* albumart);
38 bool UpdateTrack(const KODI_ADDON_VISUALIZATION_TRACK* track);
39 bool HasPresets();
40 bool GetPresetList(std::vector<std::string>& vecpresets);
41 int GetActivePreset();
42 std::string GetActivePresetName();
43 bool IsLocked();
45 // Addon callback functions
46 void GetProperties(struct KODI_ADDON_VISUALIZATION_PROPS* props);
47 void TransferPreset(const std::string& preset);
48 void ClearPresets();
50 private:
51 const int m_x;
52 const int m_y;
53 const int m_width;
54 const int m_height;
55 std::vector<std::string> m_presets; /*!< cached preset list */
58 } // namespace ADDONS
59 } // namespace KODI