diff --git a/pvr.mediaportal.tvserver/addon.xml.in b/pvr.mediaportal.tvserver/addon.xml.in index f023eb1..2125a6d 100644 --- a/pvr.mediaportal.tvserver/addon.xml.in +++ b/pvr.mediaportal.tvserver/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/pvr.mediaportal.tvserver/changelog.txt b/pvr.mediaportal.tvserver/changelog.txt index 3806d4c..6f74e77 100644 --- a/pvr.mediaportal.tvserver/changelog.txt +++ b/pvr.mediaportal.tvserver/changelog.txt @@ -1,3 +1,6 @@ +v22.2.0 +- PVR Add-on API v9.2.0 + v22.1.1 - Disable buffering to fix incompatibility with Kodi's file stream buffer diff --git a/src/pvrclient-mediaportal.cpp b/src/pvrclient-mediaportal.cpp index 3196893..3e9bc98 100644 --- a/src/pvrclient-mediaportal.cpp +++ b/src/pvrclient-mediaportal.cpp @@ -2073,7 +2073,7 @@ PVR_ERROR cPVRClientMediaPortal::GetSignalStatus(int channelUid, kodi::addon::PV // respect to the live tv streams is that the URLs for the recordings // can be requested on beforehand (done in the TVServerKodi plugin). -bool cPVRClientMediaPortal::OpenRecordedStream(const kodi::addon::PVRRecording& recording) +bool cPVRClientMediaPortal::OpenRecordedStream(const kodi::addon::PVRRecording& recording, int64_t& streamId) { kodi::Log(ADDON_LOG_INFO, "OpenRecordedStream (id=%s, RTSP=%d)", recording.GetRecordingId().c_str(), (CSettings::Get().GetUseRTSP() ? "true" : "false")); @@ -2142,7 +2142,7 @@ bool cPVRClientMediaPortal::OpenRecordedStream(const kodi::addon::PVRRecording& return true; } -void cPVRClientMediaPortal::CloseRecordedStream(void) +void cPVRClientMediaPortal::CloseRecordedStream(int64_t streamId) { if (!IsUp() || CSettings::Get().GetStreamingMethod() == ffmpeg) return; @@ -2159,7 +2159,7 @@ void cPVRClientMediaPortal::CloseRecordedStream(void) } } -int cPVRClientMediaPortal::ReadRecordedStream(unsigned char *pBuffer, unsigned int iBufferSize) +int cPVRClientMediaPortal::ReadRecordedStream(int64_t streamId, unsigned char *pBuffer, unsigned int iBufferSize) { size_t read_wanted = static_cast(iBufferSize); size_t read_done = 0; @@ -2191,7 +2191,7 @@ int cPVRClientMediaPortal::ReadRecordedStream(unsigned char *pBuffer, unsigned i return static_cast(read_done); } -int64_t cPVRClientMediaPortal::SeekRecordedStream(int64_t iPosition, int iWhence) +int64_t cPVRClientMediaPortal::SeekRecordedStream(int64_t streamId, int64_t iPosition, int iWhence) { if (CSettings::Get().GetStreamingMethod() == ffmpeg || !m_tsreader) { @@ -2205,7 +2205,7 @@ int64_t cPVRClientMediaPortal::SeekRecordedStream(int64_t iPosition, int iWhence return m_tsreader->SetFilePointer(iPosition, iWhence); } -int64_t cPVRClientMediaPortal::LengthRecordedStream(void) +int64_t cPVRClientMediaPortal::LengthRecordedStream(int64_t streamId) { if (CSettings::Get().GetStreamingMethod() == ffmpeg || !m_tsreader) { diff --git a/src/pvrclient-mediaportal.h b/src/pvrclient-mediaportal.h index da8896e..7131b93 100644 --- a/src/pvrclient-mediaportal.h +++ b/src/pvrclient-mediaportal.h @@ -91,11 +91,11 @@ class ATTR_DLL_LOCAL cPVRClientMediaPortal int64_t LengthLiveStream(void) override; /* Record stream handling */ - bool OpenRecordedStream(const kodi::addon::PVRRecording& recording) override; - void CloseRecordedStream() override; - int ReadRecordedStream(unsigned char *pBuffer, unsigned int iBufferSize) override; - int64_t SeekRecordedStream(int64_t iPosition, int iWhence = SEEK_SET) override; - int64_t LengthRecordedStream() override; + bool OpenRecordedStream(const kodi::addon::PVRRecording& recording, int64_t& streamId) override; + void CloseRecordedStream(int64_t streamId) override; + int ReadRecordedStream(int64_t streamId, unsigned char *pBuffer, unsigned int iBufferSize) override; + int64_t SeekRecordedStream(int64_t streamId, int64_t iPosition, int iWhence = SEEK_SET) override; + int64_t LengthRecordedStream(int64_t streamId) override; PVR_ERROR GetRecordingStreamProperties(const kodi::addon::PVRRecording& recording, std::vector& properties) override; /* Common stream handing functions */