Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CAddonVideoCodec Class Reference

#include <AddonVideoCodec.h>

Inheritance diagram for CAddonVideoCodec:
CDVDVideoCodec ADDON::IAddonInstanceHandler

Public Member Functions

 CAddonVideoCodec (CProcessInfo &processInfo, ADDON::AddonInfoPtr &addonInfo, KODI_HANDLE parentInstance)
 
 ~CAddonVideoCodec () override
 
bool Open (CDVDStreamInfo &hints, CDVDCodecOptions &options) override
 
bool Reconfigure (CDVDStreamInfo &hints) override
 
bool AddData (const DemuxPacket &packet) override
 
void Reset () override
 
VCReturn GetPicture (VideoPicture *pVideoPicture) override
 
const char * GetName () override
 
void SetCodecControl (int flags) override
 
- Public Member Functions inherited from CDVDVideoCodec
 CDVDVideoCodec (CProcessInfo &processInfo)
 
virtual ~CDVDVideoCodec ()=default
 
virtual void SetSpeed (int iSpeed)
 
virtual unsigned GetConvergeCount ()
 
virtual unsigned GetAllowedReferences ()
 
virtual bool GetCodecStats (double &pts, int &droppedFrames, int &skippedPics)
 
virtual void Reopen ()
 
- 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.
 
virtual ~IAddonInstanceHandler ()
 
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 AddonDllPtrAddon () const
 
AddonInfoPtr GetAddonInfo () const
 
virtual void OnPreInstall ()
 
virtual void OnPostInstall (bool update, bool modal)
 
virtual void OnPreUnInstall ()
 
virtual void OnPostUnInstall ()
 

Additional Inherited Members

- Public Types inherited from CDVDVideoCodec
enum  VCReturn {
  VC_NONE = 0 , VC_ERROR , VC_FATAL , VC_BUFFER ,
  VC_PICTURE , VC_FLUSHED , VC_NOBUFFER , VC_REOPEN ,
  VC_EOF
}
 
- Protected Attributes inherited from CDVDVideoCodec
CProcessInfom_processInfo
 
- Protected Attributes inherited from ADDON::IAddonInstanceHandler
KODI_ADDON_INSTANCE_INFO m_info {}
 
KODI_ADDON_INSTANCE_STRUCT m_ifc {}
 

Constructor & Destructor Documentation

◆ CAddonVideoCodec()

CAddonVideoCodec::CAddonVideoCodec ( CProcessInfo & processInfo,
ADDON::AddonInfoPtr & addonInfo,
KODI_HANDLE parentInstance )

◆ ~CAddonVideoCodec()

CAddonVideoCodec::~CAddonVideoCodec ( )
override

Member Function Documentation

◆ AddData()

bool CAddonVideoCodec::AddData ( const DemuxPacket & packet)
overridevirtual

add data, decoder has to consume the entire packet returns true if the packet was consumed or if resubmitting it is useless

Implements CDVDVideoCodec.

◆ GetName()

const char * CAddonVideoCodec::GetName ( )
overridevirtual

should return codecs name

Implements CDVDVideoCodec.

◆ GetPicture()

CDVDVideoCodec::VCReturn CAddonVideoCodec::GetPicture ( VideoPicture * pVideoPicture)
overridevirtual

GetPicture controls decoding. Player calls it on every cycle it can signal a picture, request a buffer, or return none, if nothing applies the data is valid until the next GetPicture return VC_PICTURE

Implements CDVDVideoCodec.

◆ Open()

bool CAddonVideoCodec::Open ( CDVDStreamInfo & hints,
CDVDCodecOptions & options )
overridevirtual

Open the decoder, returns true on success Decoders not capable of running multiple instances should return false in case there is already a instance open

Implements CDVDVideoCodec.

◆ Reconfigure()

bool CAddonVideoCodec::Reconfigure ( CDVDStreamInfo & hints)
overridevirtual

Reconfigure the decoder, returns true on success Decoders not capable of running multiple instances may be capable of reconfiguring the running instance. If Reconfigure returns false, player will close / open the decoder

Reimplemented from CDVDVideoCodec.

◆ Reset()

void CAddonVideoCodec::Reset ( )
overridevirtual

Reset the decoder. Should be the same as calling Dispose and Open after each other

Implements CDVDVideoCodec.

◆ SetCodecControl()

void CAddonVideoCodec::SetCodecControl ( int flags)
inlineoverridevirtual

Codec can be informed by player with the following flags:

DVD_CODEC_CTRL_NO_POSTPROC : if speed is not normal the codec can switch off postprocessing and de-interlacing

DVD_CODEC_CTRL_HURRY : codecs may do postprocessing and de-interlacing. If video buffers in RenderManager are about to run dry, this is signaled to codec. Codec can wait for post-proc to be finished instead of returning empty and getting another packet.

DVD_CODEC_CTRL_DRAIN : instruct decoder to deliver last pictures without requesting new packets

DVD_CODEC_CTRL_DROP : this packet is going to be dropped. decoder is free to use it for decoding

Reimplemented from CDVDVideoCodec.


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