This is an addon instance class to add an additional video decoder to Kodi using addon.
This means that either a new type of decoding can be introduced to an input stream add-on that requires special types of decoding.
#include <kodi/addon-instance/Inputstream.h>
#include <kodi/addon-instance/VideoCodec.h>
{
public:
CMyInputstream* inputstream);
...
private:
CMyInputstream* m_inputstream;
};
CMyInputstream* inputstream)
: kodi::addon::CInstanceVideoCodec(instance),
m_inputstream(inputstream)
{
...
}
...
{
public:
CMyInputstream(KODI_HANDLE instance, const std::string& kodiVersion);
KODI_ADDON_INSTANCE_HDL& hdl) override;
...
};
CMyInputstream::CMyInputstream(KODI_HANDLE instance, const std::string& kodiVersion)
: kodi::addon::CInstanceInputStream(instance, kodiVersion)
{
...
}
KODI_ADDON_INSTANCE_HDL& hdl)
{
{
{
addonInstance = new CMyVideoCodec(instance, this);
}
return ADDON_STATUS_NOT_IMPLEMENTED;
}
...
{
public:
CMyAddon() = default;
KODI_ADDON_INSTANCE_HDL& hdl) override;
};
KODI_ADDON_INSTANCE_HDL& hdl)
{
{
kodi::Log(ADDON_LOG_NOTICE,
"Creating my Inputstream");
hdl = new CMyInputstream(instance);
}
else if (...)
{
...
}
}
ADDONCREATOR(CMyAddon)
Definition AddonBase.h:775
Definition VideoCodec.h:248
Definition AddonBase.h:498
ADDON_STATUS
Definition addon_base.h:138
@ ADDON_STATUS_OK
For everything OK and no error.
Definition addon_base.h:140
@ ADDON_STATUS_UNKNOWN
Unknown and incomprehensible error.
Definition addon_base.h:152
@ ADDON_INSTANCE_INPUTSTREAM
Input stream instance, see kodi::addon::CInstanceInputStream.
Definition versions.h:228
@ ADDON_INSTANCE_VIDEOCODEC
Video codec instance, see kodi::addon::CInstanceVideoCodec.
Definition versions.h:249
bool IsType(KODI_ADDON_INSTANCE_TYPE type) const
Check asked type used on this class.
Definition AddonBase.h:525
void ATTR_DLL_LOCAL Log(const ADDON_LOG loglevel, const char *format,...)
Add a message to Kodi's log.
Definition AddonBase.h:1938