11#include "../../AddonBase.h"
12#include "../../c-api/addon-instance/pvr/pvr_stream.h"
82 PVRCodec(
const PVR_CODEC* type) : CStructHdl(type) {}
83 PVRCodec(
PVR_CODEC* type) : CStructHdl(type) {}
101 :
public CStructHdl<PVRStreamProperties, PVR_STREAM_PROPERTIES::PVR_STREAM>
139 void SetPID(
unsigned int pid) { m_cStructure->iPID = pid; }
142 unsigned int GetPID()
const {
return m_cStructure->iPID; }
151 void SetCodecId(
unsigned int codecId) { m_cStructure->iCodecId = codecId; }
154 unsigned int GetCodecId()
const {
return m_cStructure->iCodecId; }
159 if (language.size() > 3)
162 "PVRStreamProperties::%s: Language string size '%li' higher as needed 3", __func__,
166 m_cStructure->strLanguage[0] = language[0];
167 m_cStructure->strLanguage[1] = language[1];
168 m_cStructure->strLanguage[2] = language[2];
169 m_cStructure->strLanguage[3] = 0;
173 std::string
GetLanguage()
const {
return m_cStructure->strLanguage; }
176 void SetSubtitleInfo(
int subtitleInfo) { m_cStructure->iSubtitleInfo = subtitleInfo; }
182 void SetFPSScale(
int fpsScale) { m_cStructure->iFPSScale = fpsScale; }
188 void SetFPSRate(
int fpsRate) { m_cStructure->iFPSRate = fpsRate; }
194 void SetHeight(
int height) { m_cStructure->iHeight = height; }
200 void SetWidth(
int width) { m_cStructure->iWidth = width; }
203 int GetWidth()
const {
return m_cStructure->iWidth; }
206 void SetAspect(
float aspect) { m_cStructure->fAspect = aspect; }
209 float GetAspect()
const {
return m_cStructure->fAspect; }
212 void SetChannels(
int channels) { m_cStructure->iChannels = channels; }
218 void SetSampleRate(
int sampleRate) { m_cStructure->iSampleRate = sampleRate; }
224 void SetBlockAlign(
int blockAlign) { m_cStructure->iBlockAlign = blockAlign; }
230 void SetBitRate(
int bitRate) { m_cStructure->iBitRate = bitRate; }
290 void SetStartTime(time_t startTime) { m_cStructure->startTime = startTime; }
296 void SetPTSStart(int64_t ptsStart) { m_cStructure->ptsStart = ptsStart; }
305 void SetPTSBegin(int64_t ptsBegin) { m_cStructure->ptsBegin = ptsBegin; }
314 void SetPTSEnd(int64_t ptsEnd) { m_cStructure->ptsEnd = ptsEnd; }
317 int64_t
GetPTSEnd()
const {
return m_cStructure->ptsEnd; }
Definition AddonBase.h:206
@ ADDON_LOG_ERROR
3 : To report error messages in the log file.
Definition addon_base.h:193
PVR_CODEC_TYPE
Definition pvr_stream.h:60
@ PVR_CODEC_TYPE_UNKNOWN
To set nothing defined.
Definition pvr_stream.h:62
enum PVR_CODEC_TYPE codec_type
Used codec type for stream.
Definition pvr_stream.h:99
unsigned int codec_id
Related codec identifier, normally match the ffmpeg id's.
Definition pvr_stream.h:102
Definition pvr_stream.h:97
void SetCodecType(PVR_CODEC_TYPE codecType)
Codec type.
Definition Stream.h:66
void SetCodecId(unsigned int codecId)
Codec id.
Definition Stream.h:74
PVR_CODEC_TYPE GetCodecType() const
To get with SetCodecType() changed values.
Definition Stream.h:69
unsigned int GetCodecId() const
To get with SetCodecId() changed values.
Definition Stream.h:77
unsigned int GetPID() const
To get with SetPID() changed values.
Definition Stream.h:142
void SetHeight(int height)
Height of the stream reported by the demuxer.
Definition Stream.h:194
int GetFPSScale() const
To get with SetFPSScale() changed values.
Definition Stream.h:185
int GetWidth() const
To get with SetWidth() changed values.
Definition Stream.h:203
void SetCodecType(PVR_CODEC_TYPE codecType)
Codec type this stream.
Definition Stream.h:145
int GetHeight() const
To get with SetHeight() changed values.
Definition Stream.h:197
void SetBitsPerSample(int bitsPerSample)
Bits per sample.
Definition Stream.h:236
void SetBitRate(int bitRate)
Bit rate.
Definition Stream.h:230
void SetCodecId(unsigned int codecId)
Codec id of this stream.
Definition Stream.h:151
int GetFPSRate() const
To get with SetFPSRate() changed values.
Definition Stream.h:191
int GetBitRate() const
To get with SetBitRate() changed values.
Definition Stream.h:233
void SetSubtitleInfo(int subtitleInfo)
Subtitle Info.
Definition Stream.h:176
float GetAspect() const
To get with SetAspect() changed values.
Definition Stream.h:209
void SetChannels(int channels)
Amount of channels.
Definition Stream.h:212
int GetBitsPerSample() const
To get with SetBitsPerSample() changed values.
Definition Stream.h:239
PVR_CODEC_TYPE GetCodecType() const
To get with SetCodecType() changed values.
Definition Stream.h:148
void SetFPSRate(int fpsRate)
FPS rate.
Definition Stream.h:188
void SetFPSScale(int fpsScale)
To set scale of 1000 and a rate of 29970 will result in 29.97 fps.
Definition Stream.h:182
void SetAspect(float aspect)
Display aspect ratio of the stream.
Definition Stream.h:206
void SetWidth(int width)
Width of the stream reported by the demuxer.
Definition Stream.h:200
void SetLanguage(const std::string &language)
3 letter language id.
Definition Stream.h:157
unsigned int GetCodecId() const
To get with SetCodecId() changed values.
Definition Stream.h:154
int GetSubtitleInfo() const
To get with SetSubtitleInfo() changed values.
Definition Stream.h:179
void SetBlockAlign(int blockAlign)
Block alignment.
Definition Stream.h:224
std::string GetLanguage() const
To get with SetLanguage() changed values.
Definition Stream.h:173
int GetBlockAlign() const
To get with SetBlockAlign() changed values.
Definition Stream.h:227
int GetSampleRate() const
To get with SetSampleRate() changed values.
Definition Stream.h:221
void SetSampleRate(int sampleRate)
Sample rate.
Definition Stream.h:218
void SetPID(unsigned int pid)
PID.
Definition Stream.h:139
int GetChannels() const
To get with SetChannels() changed values.
Definition Stream.h:215
int64_t GetPTSStart() const
To get with SetPTSStart() changed values.
Definition Stream.h:299
int64_t GetPTSBegin() const
To get with SetPTSBegin() changed values.
Definition Stream.h:308
void SetStartTime(time_t startTime)
For recordings, this must be zero. For Live TV, this is a reference time in units of time_t (UTC) fro...
Definition Stream.h:290
void SetPTSStart(int64_t ptsStart)
The pts of startTime.
Definition Stream.h:296
int64_t GetPTSEnd() const
To get with SetPTSEnd() changed values.
Definition Stream.h:317
time_t GetStartTime() const
To get with SetStartTime() changed values.
Definition Stream.h:293
void SetPTSBegin(int64_t ptsBegin)
Earliest pts player can seek back. Value is in micro seconds, relative to PTS start....
Definition Stream.h:305
void SetPTSEnd(int64_t ptsEnd)
Latest pts player can seek forward. Value is in micro seconds, relative to PTS start....
Definition Stream.h:314
#define PVR_INVALID_CODEC_ID
Invalid codec identifier.
Definition pvr_stream.h:37
void ATTR_DLL_LOCAL Log(const ADDON_LOG loglevel, const char *format,...)
Add a message to Kodi's log.
Definition AddonBase.h:1938
Definition pvr_stream.h:118
"C" Times of playing stream (Live TV and recordings)
Definition pvr_stream.h:145