xbmc
AudioDecoder.h
1 /*
2  * Copyright (C) 2013 Arne Morten Kvarving
3  *
4  * SPDX-License-Identifier: GPL-2.0-or-later
5  * See LICENSES/README.md for more information.
6  */
7 
8 #pragma once
9 
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"
17 
18 namespace KODI
19 {
20 namespace ADDONS
21 {
22 
24  public IAddonSupportCheck,
25  public ICodec,
28 {
29 public:
30  explicit CAudioDecoder(const ADDON::AddonInfoPtr& addonInfo);
31  ~CAudioDecoder() override;
32 
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,
41  EmbeddedArt* art = nullptr) override;
42  int GetTrackCount(const std::string& strPath) override;
43  bool SupportsFile(const std::string& filename) override;
44 
45 private:
46  bool m_hasTags;
47 };
48 
49 } /* namespace ADDONS */
50 } /* namespace KODI */
Definition: EmbeddedArt.h:38
Definition: MusicFileDirectory.h:16
Definition: AddonInstanceHandler.h:33
bool SupportsFile(const std::string &filename) override
Function to query the respective add-ons used for the support of the desired file.
Definition: AudioDecoder.cpp:57
bool Init(const CFileItem &file, unsigned int filecache) override
Definition: AudioDecoder.cpp:66
Controller configuration window.
Definition: AudioDecoder.h:18
Definition: AudioDecoder.h:23
Definition: ImusicInfoTagLoader.h:18
Definition: ICodec.h:23
Parent class to ask addons for support.
Definition: IAddonSupportCheck.h:25
Definition: MusicInfoTag.h:27
Represents a file on a share.
Definition: FileItem.h:102