xbmc
Public Member Functions | List of all members
KODI::ADDONS::CAudioDecoder Class Reference
Inheritance diagram for KODI::ADDONS::CAudioDecoder:
Inheritance graph
[legend]
Collaboration diagram for KODI::ADDONS::CAudioDecoder:
Collaboration graph
[legend]

Public Member Functions

 CAudioDecoder (const ADDON::AddonInfoPtr &addonInfo)
 
bool CreateDecoder ()
 
bool Init (const CFileItem &file, unsigned int filecache) override
 
int ReadPCM (uint8_t *buffer, size_t size, size_t *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
 
bool SupportsFile (const std::string &filename) override
 Function to query the respective add-ons used for the support of the desired file. More...
 
- Public Member Functions inherited from ADDON::IAddonInstanceHandler
 IAddonInstanceHandler (ADDON_TYPE type, const AddonInfoPtr &addonInfo, AddonInstanceId instanceId=ADDON_INSTANCE_ID_UNUSED, KODI_HANDLE parentInstance=nullptr, const std::string &uniqueWorkID="")
 Class constructor for handling add-on instance processes, allowing an add-on to handle multiple work simultaneously and independently. More...
 
ADDON_TYPE UsedType () const
 
AddonInstanceId InstanceId () const
 
const std::string & UniqueWorkID ()
 
std::string ID () const
 
std::string Name () const
 
std::string Author () const
 
std::string Icon () const
 
std::string Path () const
 
std::string Profile () const
 
CAddonVersion Version () const
 
ADDON_STATUS CreateInstance ()
 
void DestroyInstance ()
 
const AddonDllPtr & Addon () const
 
AddonInfoPtr GetAddonInfo () const
 
virtual void OnPreInstall ()
 
virtual void OnPostInstall (bool update, bool modal)
 
virtual void OnPreUnInstall ()
 
virtual void OnPostUnInstall ()
 
- Public Member Functions inherited from ICodec
virtual bool CanSeek ()
 
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 XFILE::CMusicFileDirectory
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::IDirectory
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...
 

Additional Inherited Members

- Static Public Member Functions inherited from XFILE::IDirectory
static void RegisterProfileManager (const CProfileManager &profileManager)
 
static void UnregisterProfileManager ()
 
- 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 ADDON::IAddonInstanceHandler
KODI_ADDON_INSTANCE_INFO m_info {}
 
KODI_ADDON_INSTANCE_STRUCT m_ifc {}
 
- 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()
 
int m_flags
 Directory flags - see DIR_FLAG.
 
CVariant m_requirements
 
- Static Protected Attributes inherited from XFILE::IDirectory
static const CProfileManagerm_profileManager = nullptr
 

Member Function Documentation

◆ Init()

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

for replaygain

Todo:
About audio decoder in most cases Kodi's one not work, add fallback to use addon if this fails. Need API change about addons music info tag!

Implements ICodec.

◆ SupportsFile()

bool CAudioDecoder::SupportsFile ( const std::string &  filename)
overridevirtual

Function to query the respective add-ons used for the support of the desired file.

Parameters
[in]filenameFile which is queried for addon support
Returns
True if addon supports the desired file, false if not
Note
Is set here with true as default and not with "= 0" in order to have class expandable and perhaps to be able to insert other query functions in the future.

Reimplemented from KODI::ADDONS::IAddonSupportCheck.


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