#include <Inputstream.h>
|
| | CInstanceInputStream (KODI_HANDLE instance) |
| |
| | ~CInstanceInputStream () override=default |
| |
| virtual bool | Open (INPUTSTREAM &props)=0 |
| |
| virtual void | Close ()=0 |
| |
| virtual void | GetCapabilities (INPUTSTREAM_CAPABILITIES &capabilities)=0 |
| |
| virtual INPUTSTREAM_IDS | GetStreamIds ()=0 |
| |
| virtual INPUTSTREAM_INFO | GetStream (int streamid)=0 |
| |
| virtual void | EnableStream (int streamid, bool enable)=0 |
| |
| virtual bool | OpenStream (int streamid)=0 |
| |
| virtual void | DemuxReset () |
| |
| virtual void | DemuxAbort () |
| |
| virtual void | DemuxFlush () |
| |
| virtual DemuxPacket * | DemuxRead () |
| |
| virtual bool | DemuxSeekTime (double time, bool backwards, double &startpts) |
| |
| virtual void | DemuxSetSpeed (int speed) |
| |
| virtual void | SetVideoResolution (int width, int height) |
| |
| virtual int | GetTotalTime () |
| |
| virtual int | GetTime () |
| |
| virtual bool | GetTimes (INPUTSTREAM_TIMES ×) |
| |
| virtual bool | PosTime (int ms) |
| |
| virtual bool | CanPauseStream () |
| |
| virtual bool | CanSeekStream () |
| |
| virtual int | ReadStream (uint8_t *buffer, unsigned int bufferSize) |
| |
| virtual int64_t | SeekStream (int64_t position, int whence=SEEK_SET) |
| |
| virtual int64_t | PositionStream () |
| |
| virtual int64_t | LengthStream () |
| |
| virtual void | PauseStream (double time) |
| | Notify the InputStream addon that Kodi (un)paused the currently playing stream. More...
|
| |
| virtual bool | IsRealTimeStream () |
| |
| 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...
|
| |
| void | FreeDemuxPacket (DemuxPacket *packet) |
| | Free a packet that was allocated with AllocateDemuxPacket. More...
|
| |
| | 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) |
| |
◆ CInstanceInputStream()
| kodi::addon::CInstanceInputStream::CInstanceInputStream |
( |
KODI_HANDLE |
instance | ) |
|
|
inlineexplicit |
◆ ~CInstanceInputStream()
| kodi::addon::CInstanceInputStream::~CInstanceInputStream |
( |
| ) |
|
|
overridedefault |
◆ AllocateDemuxPacket()
| DemuxPacket * kodi::addon::CInstanceInputStream::AllocateDemuxPacket |
( |
int |
dataSize | ) |
|
|
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
◆ AllocateEncryptedDemuxPacket()
| DemuxPacket * kodi::addon::CInstanceInputStream::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
◆ CanPauseStream()
| virtual bool kodi::addon::CInstanceInputStream::CanPauseStream |
( |
| ) |
|
|
inlinevirtual |
Check if the backend support pausing the currently playing stream This will enable/disable the pause button in Kodi based on the return value
- Returns
- false if the InputStream addon/backend does not support pausing, true if possible
◆ CanSeekStream()
| virtual bool kodi::addon::CInstanceInputStream::CanSeekStream |
( |
| ) |
|
|
inlinevirtual |
Check if the backend supports seeking for the currently playing stream This will enable/disable the rewind/forward buttons in Kodi based on the return value
- Returns
- false if the InputStream addon/backend does not support seeking, true if possible
◆ Close()
| virtual void kodi::addon::CInstanceInputStream::Close |
( |
| ) |
|
|
pure virtual |
◆ DemuxAbort()
| virtual void kodi::addon::CInstanceInputStream::DemuxAbort |
( |
| ) |
|
|
inlinevirtual |
Abort the demultiplexer thread in the add-on.
◆ DemuxFlush()
| virtual void kodi::addon::CInstanceInputStream::DemuxFlush |
( |
| ) |
|
|
inlinevirtual |
Flush all data that's currently in the demultiplexer buffer in the add-on.
◆ DemuxRead()
| virtual DemuxPacket * kodi::addon::CInstanceInputStream::DemuxRead |
( |
| ) |
|
|
inlinevirtual |
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 occured.
◆ DemuxReset()
| virtual void kodi::addon::CInstanceInputStream::DemuxReset |
( |
| ) |
|
|
inlinevirtual |
Reset the demultiplexer in the add-on.
◆ DemuxSeekTime()
| virtual bool kodi::addon::CInstanceInputStream::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 kodi::addon::CInstanceInputStream::DemuxSetSpeed |
( |
int |
speed | ) |
|
|
inlinevirtual |
Notify the InputStream addon/demuxer that Kodi wishes to change playback speed
- Parameters
-
| speed | The requested playback speed |
◆ EnableStream()
| virtual void kodi::addon::CInstanceInputStream::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 |
◆ FreeDemuxPacket()
| void kodi::addon::CInstanceInputStream::FreeDemuxPacket |
( |
DemuxPacket * |
packet | ) |
|
|
inline |
Free a packet that was allocated with AllocateDemuxPacket.
- Parameters
-
◆ GetCapabilities()
Get Capabilities of this addon.
- Parameters
-
| capabilities | The add-on's capabilities. |
◆ GetStream()
| virtual INPUTSTREAM_INFO kodi::addon::CInstanceInputStream::GetStream |
( |
int |
streamid | ) |
|
|
pure virtual |
Get stream properties of a stream.
- Parameters
-
| streamid | unique id of stream |
- Returns
- struc of stream properties
◆ GetStreamIds()
| virtual INPUTSTREAM_IDS kodi::addon::CInstanceInputStream::GetStreamIds |
( |
| ) |
|
|
pure virtual |
Get IDs of available streams
◆ GetTime()
| virtual int kodi::addon::CInstanceInputStream::GetTime |
( |
| ) |
|
|
inlinevirtual |
◆ GetTimes()
| virtual bool kodi::addon::CInstanceInputStream::GetTimes |
( |
INPUTSTREAM_TIMES & |
times | ) |
|
|
inlinevirtual |
Get current timing values in PTS scale
◆ GetTotalTime()
| virtual int kodi::addon::CInstanceInputStream::GetTotalTime |
( |
| ) |
|
|
inlinevirtual |
◆ IsRealTimeStream()
| virtual bool kodi::addon::CInstanceInputStream::IsRealTimeStream |
( |
| ) |
|
|
inlinevirtual |
Check for real-time streaming
- Returns
- true if current stream is real-time
◆ LengthStream()
| virtual int64_t kodi::addon::CInstanceInputStream::LengthStream |
( |
| ) |
|
|
inlinevirtual |
- Returns
- The total length of the stream that's currently being read.
◆ Open()
| virtual bool kodi::addon::CInstanceInputStream::Open |
( |
INPUTSTREAM & |
props | ) |
|
|
pure virtual |
Open a stream.
- Parameters
-
- Returns
- True if the stream has been opened successfully, false otherwise.
◆ OpenStream()
| virtual bool kodi::addon::CInstanceInputStream::OpenStream |
( |
int |
streamid | ) |
|
|
pure virtual |
Opens a stream for playback.
- Parameters
-
| streamid | unique id of stream |
◆ PauseStream()
| virtual void kodi::addon::CInstanceInputStream::PauseStream |
( |
double |
time | ) |
|
|
inlinevirtual |
Notify the InputStream addon that Kodi (un)paused the currently playing stream.
◆ PositionStream()
| virtual int64_t kodi::addon::CInstanceInputStream::PositionStream |
( |
| ) |
|
|
inlinevirtual |
- Returns
- The position in the stream that's currently being read.
◆ PosTime()
| virtual bool kodi::addon::CInstanceInputStream::PosTime |
( |
int |
ms | ) |
|
|
inlinevirtual |
Positions inputstream to playing time given in ms
◆ ReadStream()
| virtual int kodi::addon::CInstanceInputStream::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 kodi::addon::CInstanceInputStream::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.
◆ SetVideoResolution()
| virtual void kodi::addon::CInstanceInputStream::SetVideoResolution |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
inlinevirtual |
Sets desired width / height
- Parameters
-
The documentation for this class was generated from the following file: