2 * Copyright (C) 2013 Arne Morten Kvarving
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 * See LICENSES/README.md for more information.
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"
23 class CAudioDecoder
: public ADDON::IAddonInstanceHandler
,
24 public IAddonSupportCheck
,
26 public MUSIC_INFO::IMusicInfoTagLoader
,
27 public XFILE::CMusicFileDirectory
30 explicit CAudioDecoder(const ADDON::AddonInfoPtr
& addonInfo
);
31 ~CAudioDecoder() override
;
33 // Things that MUST be supplied by the child classes
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
;
49 } /* namespace ADDONS */
50 } /* namespace KODI */