Inherits IAddonInstance.
|
DemuxPacket * | AllocateDemuxPacket (int dataSize) |
| Allocate a demux packet. Free with FreeDemuxPacket. More...
|
|
DemuxPacket * | AllocateEncryptedDemuxPacket (int dataSize, unsigned int encryptedSubsampleCount) |
| Allocate a demux packet. Free with FreeDemuxPacket. More...
|
|
| CInstanceInputStream (KODI_HANDLE instance, const std::string &kodiVersion="") |
|
virtual void | Close ()=0 |
|
virtual void | DemuxAbort () |
|
virtual void | DemuxFlush () |
|
virtual DemuxPacket * | DemuxRead () |
|
virtual void | DemuxReset () |
|
virtual bool | DemuxSeekTime (double time, bool backwards, double &startpts) |
|
virtual void | DemuxSetSpeed (int speed) |
|
virtual void | EnableStream (int streamid, bool enable)=0 |
|
void | FreeDemuxPacket (DemuxPacket *packet) |
| Free a packet that was allocated with AllocateDemuxPacket. More...
|
|
virtual int | GetBlockSize () |
|
virtual void | GetCapabilities (INPUTSTREAM_CAPABILITIES &capabilities)=0 |
|
virtual int | GetChapter () |
|
virtual int | GetChapterCount () |
|
virtual const char * | GetChapterName (int ch) |
|
virtual int64_t | GetChapterPos (int ch) |
|
virtual INPUTSTREAM_INFO | GetStream (int streamid)=0 |
|
virtual INPUTSTREAM_IDS | GetStreamIds ()=0 |
|
virtual int | GetTime () |
|
virtual bool | GetTimes (INPUTSTREAM_TIMES ×) |
|
virtual int | GetTotalTime () |
|
virtual bool | IsRealTimeStream () |
|
virtual int64_t | LengthStream () |
|
virtual bool | Open (INPUTSTREAM &props)=0 |
|
virtual bool | OpenStream (int streamid)=0 |
|
virtual int64_t | PositionStream () |
|
virtual bool | PosTime (int ms) |
|
virtual int | ReadStream (uint8_t *buffer, unsigned int bufferSize) |
|
virtual bool | SeekChapter (int ch) |
|
virtual int64_t | SeekStream (int64_t position, int whence=SEEK_SET) |
|
virtual void | SetVideoResolution (int width, int height) |
|
virtual ADDON_STATUS | CreateInstance (int instanceType, const std::string &instanceID, KODI_HANDLE instance, const std::string &version, KODI_HANDLE &addonInstance) |
|
| IAddonInstance (ADDON_TYPE type, const std::string &version) |
|
|
std::string | m_id |
|
const std::string | m_kodiVersion |
|
const ADDON_TYPE | m_type |
|
◆ Open()
Open a stream.
- Parameters
-
- Returns
- True if the stream has been opened successfully, false otherwise.
◆ Close()
◆ GetCapabilities()
Get Capabilities of this addon.
- Parameters
-
capabilities | The add-on's capabilities. |
◆ GetStreamIds()
Get IDs of available streams
◆ GetStream()
Get stream properties of a stream.
- Parameters
-
streamid | unique id of stream |
- Returns
- struc of stream properties
◆ EnableStream()
virtual void EnableStream |
( |
int |
streamid, |
|
|
bool |
enable |
|
) |
| |
|
pure virtual |
Enable or disable a stream. A disabled stream does not send demux packets
- Parameters
-
streamid | unique id of stream |
enable | true for enable, false for disable |
◆ OpenStream()
virtual bool OpenStream |
( |
int |
streamid | ) |
|
|
pure virtual |
Opens a stream for playback.
- Parameters
-
streamid | unique id of stream |
◆ DemuxReset()
virtual void DemuxReset |
( |
| ) |
|
|
inlinevirtual |
Reset the demultiplexer in the add-on.
◆ DemuxAbort()
virtual void DemuxAbort |
( |
| ) |
|
|
inlinevirtual |
Abort the demultiplexer thread in the add-on.
◆ DemuxFlush()
virtual void DemuxFlush |
( |
| ) |
|
|
inlinevirtual |
Flush all data that's currently in the demultiplexer buffer in the add-on.
◆ DemuxRead()
Read the next packet from the demultiplexer, if there is one.
- Returns
- The next packet. If there is no next packet, then the add-on should return the packet created by calling AllocateDemuxPacket(0) on the callback. If the stream changed and Kodi's player needs to be reinitialised, then, the add-on should call AllocateDemuxPacket(0) on the callback, and set the streamid to DMX_SPECIALID_STREAMCHANGE and return the value. The add-on should return NULL if an error occurred.
◆ DemuxSeekTime()
virtual bool DemuxSeekTime |
( |
double |
time, |
|
|
bool |
backwards, |
|
|
double & |
startpts |
|
) |
| |
|
inlinevirtual |
Notify the InputStream addon/demuxer that Kodi wishes to seek the stream by time Demuxer is required to set stream to an IDR frame
- Parameters
-
time | The absolute time since stream start |
backwards | True to seek to keyframe BEFORE time, else AFTER |
startpts | can be updated to point to where display should start |
- Returns
- True if the seek operation was possible
◆ DemuxSetSpeed()
virtual void DemuxSetSpeed |
( |
int |
speed | ) |
|
|
inlinevirtual |
Notify the InputStream addon/demuxer that Kodi wishes to change playback speed
- Parameters
-
speed | The requested playback speed |
◆ SetVideoResolution()
virtual void SetVideoResolution |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
inlinevirtual |
Sets desired width / height
- Parameters
-
◆ GetTotalTime()
virtual int GetTotalTime |
( |
| ) |
|
|
inlinevirtual |
◆ GetTime()
◆ GetTimes()
Get current timing values in PTS scale
◆ PosTime()
virtual bool PosTime |
( |
int |
ms | ) |
|
|
inlinevirtual |
Positions inputstream to playing time given in ms
◆ GetChapter()
virtual int GetChapter |
( |
| ) |
|
|
inlinevirtual |
Return currently selected chapter
◆ GetChapterCount()
virtual int GetChapterCount |
( |
| ) |
|
|
inlinevirtual |
Return number of available chapters
◆ GetChapterName()
virtual const char* GetChapterName |
( |
int |
ch | ) |
|
|
inlinevirtual |
Return name of chapter # ch
◆ GetChapterPos()
virtual int64_t GetChapterPos |
( |
int |
ch | ) |
|
|
inlinevirtual |
Return position if chapter # ch in milliseconds
◆ SeekChapter()
virtual bool SeekChapter |
( |
int |
ch | ) |
|
|
inlinevirtual |
Seek to the beginning of chapter # ch
◆ ReadStream()
virtual int ReadStream |
( |
uint8_t * |
buffer, |
|
|
unsigned int |
bufferSize |
|
) |
| |
|
inlinevirtual |
Read from an open stream.
- Parameters
-
buffer | The buffer to store the data in. |
bufferSize | The amount of bytes to read. |
- Returns
- The amount of bytes that were actually read from the stream.
◆ SeekStream()
virtual int64_t SeekStream |
( |
int64_t |
position, |
|
|
int |
whence = SEEK_SET |
|
) |
| |
|
inlinevirtual |
Seek in a stream.
- Parameters
-
position | The position to seek to. |
whence | ? |
- Returns
- The new position.
◆ PositionStream()
virtual int64_t PositionStream |
( |
| ) |
|
|
inlinevirtual |
- Returns
- The position in the stream that's currently being read.
◆ LengthStream()
virtual int64_t LengthStream |
( |
| ) |
|
|
inlinevirtual |
- Returns
- The total length of the stream that's currently being read.
◆ GetBlockSize()
virtual int GetBlockSize |
( |
| ) |
|
|
inlinevirtual |
- Returns
- Obtain the chunk size to use when reading streams.
◆ IsRealTimeStream()
virtual bool IsRealTimeStream |
( |
| ) |
|
|
inlinevirtual |
Check for real-time streaming
- Returns
- true if current stream is real-time
◆ AllocateDemuxPacket()
Allocate a demux packet. Free with FreeDemuxPacket.
- Parameters
-
dataSize | The size of the data that will go into the packet |
- Returns
- The allocated packet
◆ AllocateEncryptedDemuxPacket()
DemuxPacket* AllocateEncryptedDemuxPacket |
( |
int |
dataSize, |
|
|
unsigned int |
encryptedSubsampleCount |
|
) |
| |
|
inline |
Allocate a demux packet. Free with FreeDemuxPacket.
- Parameters
-
dataSize | The size of the data that will go into the packet |
- Returns
- The allocated packet
◆ FreeDemuxPacket()
Free a packet that was allocated with AllocateDemuxPacket.
- Parameters
-
The documentation for this class was generated from the following file:
- /home/I-Cat/Development/Kodi/kodi-Matrix/xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/Inputstream.h