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

Input stream class. More...

#include <InputStreamAddon.h>

Inheritance diagram for CInputStreamAddon:
ADDON::IAddonInstanceHandler CDVDInputStream CDVDInputStream::IDisplayTime CDVDInputStream::ITimes CDVDInputStream::IPosTime CDVDInputStream::IDemux CDVDInputStream::IChapter

Public Member Functions

 CInputStreamAddon (const ADDON::AddonInfoPtr &addonInfo, IVideoPlayer *player, const CFileItem &fileitem, const std::string &instanceId)
 
 ~CInputStreamAddon () override
 
bool Open () override
 
void Close () override
 
int Read (uint8_t *buf, int buf_size) override
 
int64_t Seek (int64_t offset, int whence) override
 
int64_t GetLength () override
 
int GetBlockSize () override
 
bool IsEOF () override
 
bool CanSeek () override
 
bool CanPause () override
 
CDVDInputStream::IDisplayTimeGetIDisplayTime () override
 
int GetTotalTime () override
 
int GetTime () override
 
CDVDInputStream::ITimesGetITimes () override
 
bool GetTimes (Times &times) override
 
CDVDInputStream::IPosTimeGetIPosTime () override
 
bool PosTime (int ms) override
 
CDVDInputStream::IDemuxGetIDemux () override
 
bool OpenDemux () override
 
DemuxPacketReadDemux () override
 
CDemuxStreamGetStream (int streamId) const override
 
std::vector< CDemuxStream * > GetStreams () const override
 
void EnableStream (int streamId, bool enable) override
 
bool OpenStream (int streamid) override
 
int GetNrOfStreams () const override
 
void SetSpeed (int speed) override
 
bool SeekTime (double time, bool backward=false, double *startpts=nullptr) override
 
void AbortDemux () override
 
void FlushDemux () override
 
void SetVideoResolution (unsigned int width, unsigned int height, unsigned int maxWidth, unsigned int maxHeight) override
 
bool IsRealtime () override
 
CDVDInputStream::IChapterGetIChapter () override
 
int GetChapter () override
 
int GetChapterCount () override
 
void GetChapterName (std::string &name, int ch=-1) override
 
int64_t GetChapterPos (int ch=-1) override
 
bool SeekChapter (int ch) override
 
- 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 ()
 
- Public Member Functions inherited from CDVDInputStream
 CDVDInputStream (DVDStreamType m_streamType, const CFileItem &fileitem)
 
virtual ~CDVDInputStream ()
 
virtual std::string & GetContent ()
 
virtual std::string GetFileName ()
 
virtual CURL GetURL ()
 
virtual ENextStream NextStream ()
 
virtual void Abort ()
 
virtual void SetReadRate (uint32_t rate)
 Indicate expected read rate in bytes per second. This could be used to throttle caching rate. Should be seen as only a hint.
 
virtual bool GetCacheStatus (XFILE::SCacheStatus *status)
 Get the cache status.
 
bool IsStreamType (DVDStreamType type) const
 
virtual BitstreamStats GetBitstreamStats () const
 
bool ContentLookup ()
 
void SetRealtime (bool realtime)
 
const CVariantGetProperty (const std::string &key)
 
- Public Member Functions inherited from CDVDInputStream::IDisplayTime
virtual ~IDisplayTime ()=default
 
- Public Member Functions inherited from CDVDInputStream::ITimes
virtual ~ITimes ()=default
 
- Public Member Functions inherited from CDVDInputStream::IPosTime
virtual ~IPosTime ()=default
 
- Public Member Functions inherited from CDVDInputStream::IDemux
virtual ~IDemux ()=default
 
virtual void FillBuffer (bool mode)
 
- Public Member Functions inherited from CDVDInputStream::IChapter
virtual ~IChapter ()=default
 

Static Public Member Functions

static bool Supports (const ADDON::AddonInfoPtr &addonInfo, const CFileItem &fileitem)
 

Static Protected Member Functions

static int ConvertVideoCodecProfile (STREAMCODEC_PROFILE profile)
 
static int ConvertAudioCodecProfile (STREAMCODEC_PROFILE profile)
 

Protected Attributes

IVideoPlayerm_player
 
- Protected Attributes inherited from ADDON::IAddonInstanceHandler
KODI_ADDON_INSTANCE_INFO m_info {}
 
KODI_ADDON_INSTANCE_STRUCT m_ifc {}
 
- Protected Attributes inherited from CDVDInputStream
DVDStreamType m_streamType
 
BitstreamStats m_stats
 
std::string m_content
 
CFileItem m_item
 
bool m_contentLookup
 
bool m_realtime
 

Additional Inherited Members

- Public Types inherited from CDVDInputStream
enum  ENextStream { NEXTSTREAM_NONE , NEXTSTREAM_OPEN , NEXTSTREAM_RETRY }
 

Detailed Description

Input stream class.

Constructor & Destructor Documentation

◆ CInputStreamAddon()

CInputStreamAddon::CInputStreamAddon ( const ADDON::AddonInfoPtr & addonInfo,
IVideoPlayer * player,
const CFileItem & fileitem,
const std::string & instanceId )

◆ ~CInputStreamAddon()

CInputStreamAddon::~CInputStreamAddon ( )
override

Member Function Documentation

◆ AbortDemux()

void CInputStreamAddon::AbortDemux ( )
overridevirtual

◆ CanPause()

bool CInputStreamAddon::CanPause ( )
overridevirtual
Todo
drop this

Reimplemented from CDVDInputStream.

◆ CanSeek()

bool CInputStreamAddon::CanSeek ( )
overridevirtual

Reimplemented from CDVDInputStream.

◆ Close()

void CInputStreamAddon::Close ( )
overridevirtual

Reimplemented from CDVDInputStream.

◆ ConvertAudioCodecProfile()

int CInputStreamAddon::ConvertAudioCodecProfile ( STREAMCODEC_PROFILE profile)
staticprotected
Todo
: with ffmpeg >= 6.1 set the appropriate profile
Todo
: with ffmpeg >= 6.1 set the appropriate profile
Todo
: with ffmpeg >= 6.1 set the appropriate profile

◆ ConvertVideoCodecProfile()

int CInputStreamAddon::ConvertVideoCodecProfile ( STREAMCODEC_PROFILE profile)
staticprotected

◆ EnableStream()

void CInputStreamAddon::EnableStream ( int streamId,
bool enable )
overridevirtual

Reimplemented from CDVDInputStream::IDemux.

◆ FlushDemux()

void CInputStreamAddon::FlushDemux ( )
overridevirtual

◆ GetBlockSize()

int CInputStreamAddon::GetBlockSize ( )
overridevirtual

Reimplemented from CDVDInputStream.

◆ GetChapter()

int CInputStreamAddon::GetChapter ( )
overridevirtual

◆ GetChapterCount()

int CInputStreamAddon::GetChapterCount ( )
overridevirtual

◆ GetChapterName()

void CInputStreamAddon::GetChapterName ( std::string & name,
int ch = -1 )
overridevirtual

◆ GetChapterPos()

int64_t CInputStreamAddon::GetChapterPos ( int ch = -1)
overridevirtual

◆ GetIChapter()

CDVDInputStream::IChapter * CInputStreamAddon::GetIChapter ( )
overridevirtual

Reimplemented from CDVDInputStream.

◆ GetIDemux()

CDVDInputStream::IDemux * CInputStreamAddon::GetIDemux ( )
overridevirtual

Reimplemented from CDVDInputStream.

◆ GetIDisplayTime()

CDVDInputStream::IDisplayTime * CInputStreamAddon::GetIDisplayTime ( )
overridevirtual

Reimplemented from CDVDInputStream.

◆ GetIPosTime()

CDVDInputStream::IPosTime * CInputStreamAddon::GetIPosTime ( )
overridevirtual

Reimplemented from CDVDInputStream.

◆ GetITimes()

CDVDInputStream::ITimes * CInputStreamAddon::GetITimes ( )
overridevirtual

Reimplemented from CDVDInputStream.

◆ GetLength()

int64_t CInputStreamAddon::GetLength ( )
overridevirtual

Implements CDVDInputStream.

◆ GetNrOfStreams()

int CInputStreamAddon::GetNrOfStreams ( ) const
overridevirtual

◆ GetStream()

CDemuxStream * CInputStreamAddon::GetStream ( int streamId) const
overridevirtual

◆ GetStreams()

std::vector< CDemuxStream * > CInputStreamAddon::GetStreams ( ) const
overridevirtual

◆ GetTime()

int CInputStreamAddon::GetTime ( )
overridevirtual

◆ GetTimes()

bool CInputStreamAddon::GetTimes ( Times & times)
overridevirtual

◆ GetTotalTime()

int CInputStreamAddon::GetTotalTime ( )
overridevirtual

◆ IsEOF()

bool CInputStreamAddon::IsEOF ( )
overridevirtual

Implements CDVDInputStream.

◆ IsRealtime()

bool CInputStreamAddon::IsRealtime ( )
overridevirtual

Reimplemented from CDVDInputStream.

◆ Open()

bool CInputStreamAddon::Open ( )
overridevirtual

Reimplemented from CDVDInputStream.

◆ OpenDemux()

bool CInputStreamAddon::OpenDemux ( )
overridevirtual

◆ OpenStream()

bool CInputStreamAddon::OpenStream ( int streamid)
overridevirtual

Reimplemented from CDVDInputStream::IDemux.

◆ PosTime()

bool CInputStreamAddon::PosTime ( int ms)
overridevirtual

◆ Read()

int CInputStreamAddon::Read ( uint8_t * buf,
int buf_size )
overridevirtual

Implements CDVDInputStream.

◆ ReadDemux()

DemuxPacket * CInputStreamAddon::ReadDemux ( )
overridevirtual

◆ Seek()

int64_t CInputStreamAddon::Seek ( int64_t offset,
int whence )
overridevirtual

Implements CDVDInputStream.

◆ SeekChapter()

bool CInputStreamAddon::SeekChapter ( int ch)
overridevirtual

◆ SeekTime()

bool CInputStreamAddon::SeekTime ( double time,
bool backward = false,
double * startpts = nullptr )
overridevirtual

◆ SetSpeed()

void CInputStreamAddon::SetSpeed ( int speed)
overridevirtual

◆ SetVideoResolution()

void CInputStreamAddon::SetVideoResolution ( unsigned int width,
unsigned int height,
unsigned int maxWidth,
unsigned int maxHeight )
overridevirtual

Reimplemented from CDVDInputStream::IDemux.

◆ Supports()

bool CInputStreamAddon::Supports ( const ADDON::AddonInfoPtr & addonInfo,
const CFileItem & fileitem )
static
Todo
Error for users to show deprecation, can be removed in Kodi 20

Member Data Documentation

◆ m_player

IVideoPlayer* CInputStreamAddon::m_player
protected

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