Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
kodi::addon::CInstanceImageDecoder Class Referenceabstract

#include <ImageDecoder.h>

Inheritance diagram for kodi::addon::CInstanceImageDecoder:
kodi::addon::IAddonInstance

Public Member Functions

 CInstanceImageDecoder (KODI_HANDLE instance)
 Class constructor. More...
 
 ~CInstanceImageDecoder () override=default
 
virtual bool LoadImageFromMemory (unsigned char *buffer, unsigned int bufSize, unsigned int &width, unsigned int &height)=0
 Initialize an encoder. More...
 
virtual bool Decode (unsigned char *pixels, unsigned int width, unsigned int height, unsigned int pitch, ImageFormat format)=0
 Decode previously loaded image. More...
 
std::string MimeType ()
 Get the wanted mime type from Kodi. More...
 
- Public Member Functions inherited from kodi::addon::IAddonInstance
 IAddonInstance (ADDON_TYPE type)
 
virtual ~IAddonInstance ()=default
 
virtual ADDON_STATUS CreateInstance (int instanceType, std::string instanceID, KODI_HANDLE instance, KODI_HANDLE &addonInstance)
 
virtual ADDON_STATUS CreateInstanceEx (int instanceType, std::string instanceID, KODI_HANDLE instance, KODI_HANDLE &addonInstance, const std::string &version)
 

Additional Inherited Members

- Public Attributes inherited from kodi::addon::IAddonInstance
const ADDON_TYPE m_type
 

Constructor & Destructor Documentation

◆ CInstanceImageDecoder()

kodi::addon::CInstanceImageDecoder::CInstanceImageDecoder ( KODI_HANDLE  instance)
inlineexplicit

Class constructor.

Parameters
[in]instanceThe from Kodi given instance given be add-on CreateInstance call with instance id ADDON_INSTANCE_IMAGEDECODER.

◆ ~CInstanceImageDecoder()

kodi::addon::CInstanceImageDecoder::~CInstanceImageDecoder ( )
overridedefault

Member Function Documentation

◆ Decode()

virtual bool kodi::addon::CInstanceImageDecoder::Decode ( unsigned char *  pixels,
unsigned int  width,
unsigned int  height,
unsigned int  pitch,
ImageFormat  format 
)
pure virtual

Decode previously loaded image.

Parameters
[in]pixelsOutput buffer
[in]widthWidth of output image
[in]heightHeight of output image
[in]pitchPitch of output image
[in]formatFormat of output image
Returns
true if successful done, false on error

◆ LoadImageFromMemory()

virtual bool kodi::addon::CInstanceImageDecoder::LoadImageFromMemory ( unsigned char *  buffer,
unsigned int  bufSize,
unsigned int &  width,
unsigned int &  height 
)
pure virtual

Initialize an encoder.

Parameters
[in]bufferThe data to read from memory
[in]bufSizeThe buffer size
[in,out]widthThe optimal width of image on entry, obtained width on return
[in,out]heightThe optimal height of image, actual obtained height on return
Returns
true if successful done, false on error

◆ MimeType()

std::string kodi::addon::CInstanceImageDecoder::MimeType ( )
inline

Get the wanted mime type from Kodi.

Returns
the mimetype wanted from Kodi

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