Kodi Documentation  18.0
Kodi is an open source media player and entertainment hub.
ADDON::CAudioDecoder Class Reference

#include <AudioDecoder.h>

Inheritance diagram for ADDON::CAudioDecoder:
ADDON::IAddonInstanceHandler ICodec MUSIC_INFO::IMusicInfoTagLoader XFILE::CMusicFileDirectory XFILE::IFileDirectory XFILE::IDirectory

Public Member Functions

 CAudioDecoder (const BinaryAddonBasePtr &addonInfo)
 
 ~CAudioDecoder () override
 
bool CreateDecoder ()
 
bool Init (const CFileItem &file, unsigned int filecache) override
 
int ReadPCM (uint8_t *buffer, int size, int *actualsize) override
 
bool Seek (int64_t time) override
 
bool CanInit () override
 
bool Load (const std::string &strFileName, MUSIC_INFO::CMusicInfoTag &tag, EmbeddedArt *art=nullptr) override
 
int GetTrackCount (const std::string &strPath) override
 
- Public Member Functions inherited from ADDON::IAddonInstanceHandler
 IAddonInstanceHandler (ADDON_TYPE type, const BinaryAddonBasePtr &addonBase, KODI_HANDLE parentInstance=nullptr, const std::string &instanceID="")
 
virtual ~IAddonInstanceHandler ()
 
ADDON_TYPE UsedType () const
 
const std::string & InstanceID ()
 
std::string ID () const
 
std::string Name () const
 
std::string Author () const
 
std::string Icon () const
 
std::string Path () const
 
std::string Profile () const
 
AddonVersion Version () const
 
ADDON_STATUS CreateInstance (KODI_HANDLE instance)
 
void DestroyInstance ()
 
const AddonDllPtrAddon () const
 
BinaryAddonBasePtr GetAddonBase () const
 
- Public Member Functions inherited from ICodec
 ICodec ()
 
virtual ~ICodec ()=default
 
virtual bool CanSeek ()
 
virtual int ReadPCM (unsigned char *pBuffer, int size, int *actualsize)=0
 
virtual int ReadRaw (uint8_t **pBuffer, int *bufferSize)
 
virtual void SetTotalTime (int64_t totaltime)
 
virtual bool IsCaching () const
 
virtual int GetCacheLevel () const
 
- Public Member Functions inherited from MUSIC_INFO::IMusicInfoTagLoader
 IMusicInfoTagLoader (void)=default
 
virtual ~IMusicInfoTagLoader ()=default
 
- Public Member Functions inherited from XFILE::CMusicFileDirectory
 CMusicFileDirectory (void)
 
 ~CMusicFileDirectory (void) override
 
bool GetDirectory (const CURL &url, CFileItemList &items) override
 Get the items of the directory strPath. More...
 
bool Exists (const CURL &url) override
 Check for directory existence. More...
 
bool ContainsFiles (const CURL &url) override
 
bool AllowAll () const override
 Whether to allow all files/folders to be listed. More...
 
- Public Member Functions inherited from XFILE::IFileDirectory
 ~IFileDirectory (void) override=default
 
- Public Member Functions inherited from XFILE::IDirectory
 IDirectory ()
 
virtual ~IDirectory (void)
 
virtual float GetProgress () const
 Retrieve the progress of the current directory fetch (if possible). More...
 
virtual void CancelDirectory ()
 Cancel the current directory fetch (if possible). More...
 
virtual bool Create (const CURL &url)
 Create the directory. More...
 
virtual bool Remove (const CURL &url)
 Removes the directory. More...
 
virtual bool RemoveRecursive (const CURL &url)
 Recursively removes the directory. More...
 
virtual bool IsAllowed (const CURL &url) const
 Whether this file should be listed. More...
 
virtual DIR_CACHE_TYPE GetCacheType (const CURL &url) const
 How this directory should be cached. More...
 
void SetMask (const std::string &strMask)
 Set a mask of extensions for the files in the directory. More...
 
void SetFlags (int flags)
 Set the flags for this directory handler. More...
 
bool ProcessRequirements ()
 Process additional requirements before the directory fetch is performed. Some directory fetches may require authentication, keyboard input etc. The IDirectory subclass should call GetKeyboardInput, SetErrorDialog or RequireAuthentication and then return false from the GetDirectory method. CDirectory will then prompt for input from the user, before re-calling the GetDirectory method. More...
 

Static Public Member Functions

static std::string GetExtensions (const BinaryAddonBasePtr &addonInfo)
 
static std::string GetMimetypes (const BinaryAddonBasePtr &addonInfo)
 
static bool HasTags (const BinaryAddonBasePtr &addonInfo)
 
static bool HasTracks (const BinaryAddonBasePtr &addonInfo)
 
- Static Public Member Functions inherited from XFILE::IDirectory
static void RegisterProfileManager (const CProfileManager &profileManager)
 
static void UnregisterProfileManager ()
 

Additional Inherited Members

- Public Attributes inherited from ICodec
int64_t m_TotalTime
 
int m_bitRate
 
int m_bitsPerSample
 
int m_bitsPerCodedSample
 
std::string m_CodecName
 
MUSIC_INFO::CMusicInfoTag m_tag
 
XFILE::CFile m_file
 
AEAudioFormat m_format
 
- Protected Member Functions inherited from XFILE::IDirectory
bool GetKeyboardInput (const CVariant &heading, std::string &input, bool hiddenInput=false)
 Prompt the user for some keyboard input Call this method from the GetDirectory method to retrieve additional input from the user. If this function returns false then no input has been received, and the GetDirectory call should return false. More...
 
void SetErrorDialog (const CVariant &heading, const CVariant &line1, const CVariant &line2=0, const CVariant &line3=0)
 Show an error dialog on failure of GetDirectory call Call this method from the GetDirectory method to set an error message to be shown to the user. More...
 
void RequireAuthentication (const CURL &url)
 Prompt the user for authentication of a URL. Call this method from the GetDirectory method when authentication is required from the user, before returning false from the GetDirectory call. The user will be prompted for authentication, and GetDirectory will be re-called. More...
 
- Protected Attributes inherited from XFILE::CMusicFileDirectory
std::string m_strExt
 
MUSIC_INFO::CMusicInfoTag m_tag
 
- Protected Attributes inherited from XFILE::IDirectory
std::string m_strFileMask
 Holds the file mask specified by SetMask() More...
 
int m_flags
 Directory flags - see DIR_FLAG. More...
 
CVariant m_requirements
 
- Static Protected Attributes inherited from XFILE::IDirectory
static const CProfileManagerm_profileManager = nullptr
 

Constructor & Destructor Documentation

§ CAudioDecoder()

CAudioDecoder::CAudioDecoder ( const BinaryAddonBasePtr addonInfo)
explicit

§ ~CAudioDecoder()

CAudioDecoder::~CAudioDecoder ( )
override

Member Function Documentation

§ CanInit()

bool ADDON::CAudioDecoder::CanInit ( )
inlineoverridevirtual

Implements ICodec.

§ CreateDecoder()

bool CAudioDecoder::CreateDecoder ( )

§ GetExtensions()

static std::string ADDON::CAudioDecoder::GetExtensions ( const BinaryAddonBasePtr addonInfo)
inlinestatic

§ GetMimetypes()

static std::string ADDON::CAudioDecoder::GetMimetypes ( const BinaryAddonBasePtr addonInfo)
inlinestatic

§ GetTrackCount()

int CAudioDecoder::GetTrackCount ( const std::string &  strPath)
overridevirtual

§ HasTags()

static bool ADDON::CAudioDecoder::HasTags ( const BinaryAddonBasePtr addonInfo)
inlinestatic

§ HasTracks()

static bool ADDON::CAudioDecoder::HasTracks ( const BinaryAddonBasePtr addonInfo)
inlinestatic

§ Init()

bool CAudioDecoder::Init ( const CFileItem file,
unsigned int  filecache 
)
overridevirtual

Implements ICodec.

§ Load()

bool CAudioDecoder::Load ( const std::string &  strFileName,
MUSIC_INFO::CMusicInfoTag tag,
EmbeddedArt art = nullptr 
)
overridevirtual

§ ReadPCM()

int CAudioDecoder::ReadPCM ( uint8_t buffer,
int  size,
int *  actualsize 
)
override

§ Seek()

bool CAudioDecoder::Seek ( int64_t  time)
overridevirtual

Implements ICodec.


The documentation for this class was generated from the following files: