Merge pull request #26220 from 78andyp/blurayfixes
[xbmc.git] / xbmc / addons / AudioDecoder.h
blob7e2424e0d6d74e03711ac1bcb5b5db0a32f03b66
1 /*
2 * Copyright (C) 2013 Arne Morten Kvarving
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 * See LICENSES/README.md for more information.
6 */
8 #pragma once
10 #include "addons/IAddonSupportCheck.h"
11 #include "addons/IAddonSupportList.h"
12 #include "addons/binary-addons/AddonInstanceHandler.h"
13 #include "addons/kodi-dev-kit/include/kodi/addon-instance/AudioDecoder.h"
14 #include "cores/paplayer/ICodec.h"
15 #include "filesystem/MusicFileDirectory.h"
16 #include "music/tags/ImusicInfoTagLoader.h"
18 namespace KODI
20 namespace ADDONS
23 class CAudioDecoder : public ADDON::IAddonInstanceHandler,
24 public IAddonSupportCheck,
25 public ICodec,
26 public MUSIC_INFO::IMusicInfoTagLoader,
27 public XFILE::CMusicFileDirectory
29 public:
30 explicit CAudioDecoder(const ADDON::AddonInfoPtr& addonInfo);
31 ~CAudioDecoder() override;
33 // Things that MUST be supplied by the child classes
34 bool CreateDecoder();
35 bool Init(const CFileItem& file, unsigned int filecache) override;
36 int ReadPCM(uint8_t* buffer, size_t size, size_t* actualsize) override;
37 bool Seek(int64_t time) override;
38 bool CanInit() override { return true; }
39 bool Load(const std::string& strFileName,
40 MUSIC_INFO::CMusicInfoTag& tag,
41 EmbeddedArt* art = nullptr) override;
42 int GetTrackCount(const std::string& strPath) override;
43 bool SupportsFile(const std::string& filename) override;
45 private:
46 bool m_hasTags;
49 } /* namespace ADDONS */
50 } /* namespace KODI */