Skip to content

Commit c5bb924

Browse files
authored
Merge pull request #217 from ksooo/addon-api-9-2-0
PVR Add-on API v9.2.0
2 parents 6ed2fbd + aaab9f1 commit c5bb924

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

pvr.mediaportal.tvserver/addon.xml.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<addon
33
id="pvr.mediaportal.tvserver"
4-
version="22.1.1"
4+
version="22.2.0"
55
name="MediaPortal PVR Client"
66
provider-name="Marcel Groothuis">
77
<requires>@ADDON_DEPENDS@</requires>

pvr.mediaportal.tvserver/changelog.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v22.2.0
2+
- PVR Add-on API v9.2.0
3+
14
v22.1.1
25
- Disable buffering to fix incompatibility with Kodi's file stream buffer
36

src/pvrclient-mediaportal.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -2073,7 +2073,7 @@ PVR_ERROR cPVRClientMediaPortal::GetSignalStatus(int channelUid, kodi::addon::PV
20732073
// respect to the live tv streams is that the URLs for the recordings
20742074
// can be requested on beforehand (done in the TVServerKodi plugin).
20752075

2076-
bool cPVRClientMediaPortal::OpenRecordedStream(const kodi::addon::PVRRecording& recording)
2076+
bool cPVRClientMediaPortal::OpenRecordedStream(const kodi::addon::PVRRecording& recording, int64_t& streamId)
20772077
{
20782078
kodi::Log(ADDON_LOG_INFO, "OpenRecordedStream (id=%s, RTSP=%d)", recording.GetRecordingId().c_str(), (CSettings::Get().GetUseRTSP() ? "true" : "false"));
20792079

@@ -2142,7 +2142,7 @@ bool cPVRClientMediaPortal::OpenRecordedStream(const kodi::addon::PVRRecording&
21422142
return true;
21432143
}
21442144

2145-
void cPVRClientMediaPortal::CloseRecordedStream(void)
2145+
void cPVRClientMediaPortal::CloseRecordedStream(int64_t streamId)
21462146
{
21472147
if (!IsUp() || CSettings::Get().GetStreamingMethod() == ffmpeg)
21482148
return;
@@ -2159,7 +2159,7 @@ void cPVRClientMediaPortal::CloseRecordedStream(void)
21592159
}
21602160
}
21612161

2162-
int cPVRClientMediaPortal::ReadRecordedStream(unsigned char *pBuffer, unsigned int iBufferSize)
2162+
int cPVRClientMediaPortal::ReadRecordedStream(int64_t streamId, unsigned char *pBuffer, unsigned int iBufferSize)
21632163
{
21642164
size_t read_wanted = static_cast<size_t>(iBufferSize);
21652165
size_t read_done = 0;
@@ -2191,7 +2191,7 @@ int cPVRClientMediaPortal::ReadRecordedStream(unsigned char *pBuffer, unsigned i
21912191
return static_cast<int>(read_done);
21922192
}
21932193

2194-
int64_t cPVRClientMediaPortal::SeekRecordedStream(int64_t iPosition, int iWhence)
2194+
int64_t cPVRClientMediaPortal::SeekRecordedStream(int64_t streamId, int64_t iPosition, int iWhence)
21952195
{
21962196
if (CSettings::Get().GetStreamingMethod() == ffmpeg || !m_tsreader)
21972197
{
@@ -2205,7 +2205,7 @@ int64_t cPVRClientMediaPortal::SeekRecordedStream(int64_t iPosition, int iWhence
22052205
return m_tsreader->SetFilePointer(iPosition, iWhence);
22062206
}
22072207

2208-
int64_t cPVRClientMediaPortal::LengthRecordedStream(void)
2208+
int64_t cPVRClientMediaPortal::LengthRecordedStream(int64_t streamId)
22092209
{
22102210
if (CSettings::Get().GetStreamingMethod() == ffmpeg || !m_tsreader)
22112211
{

src/pvrclient-mediaportal.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ class ATTR_DLL_LOCAL cPVRClientMediaPortal
9191
int64_t LengthLiveStream(void) override;
9292

9393
/* Record stream handling */
94-
bool OpenRecordedStream(const kodi::addon::PVRRecording& recording) override;
95-
void CloseRecordedStream() override;
96-
int ReadRecordedStream(unsigned char *pBuffer, unsigned int iBufferSize) override;
97-
int64_t SeekRecordedStream(int64_t iPosition, int iWhence = SEEK_SET) override;
98-
int64_t LengthRecordedStream() override;
94+
bool OpenRecordedStream(const kodi::addon::PVRRecording& recording, int64_t& streamId) override;
95+
void CloseRecordedStream(int64_t streamId) override;
96+
int ReadRecordedStream(int64_t streamId, unsigned char *pBuffer, unsigned int iBufferSize) override;
97+
int64_t SeekRecordedStream(int64_t streamId, int64_t iPosition, int iWhence = SEEK_SET) override;
98+
int64_t LengthRecordedStream(int64_t streamId) override;
9999
PVR_ERROR GetRecordingStreamProperties(const kodi::addon::PVRRecording& recording, std::vector<kodi::addon::PVRStreamProperty>& properties) override;
100100

101101
/* Common stream handing functions */

0 commit comments

Comments
 (0)