From c5e612315bbd3c1f5b213dec482b87441ac9e94c Mon Sep 17 00:00:00 2001 From: ksooo <3226626+ksooo@users.noreply.github.com> Date: Tue, 22 Oct 2024 12:44:39 +0200 Subject: [PATCH] PVR Add-on API v9.2.0 --- pvr.vdr.vnsi/addon.xml.in | 2 +- pvr.vdr.vnsi/changelog.txt | 3 +++ src/ClientInstance.cpp | 12 ++++++------ src/ClientInstance.h | 10 +++++----- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/pvr.vdr.vnsi/addon.xml.in b/pvr.vdr.vnsi/addon.xml.in index 25f10686..74cf9a7a 100644 --- a/pvr.vdr.vnsi/addon.xml.in +++ b/pvr.vdr.vnsi/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/pvr.vdr.vnsi/changelog.txt b/pvr.vdr.vnsi/changelog.txt index 78417faf..cadcd835 100644 --- a/pvr.vdr.vnsi/changelog.txt +++ b/pvr.vdr.vnsi/changelog.txt @@ -1,3 +1,6 @@ +v22.2.0 +- PVR Add-on API v9.2.0 + v22.1.0 - PVR Add-on API v9.0.0 diff --git a/src/ClientInstance.cpp b/src/ClientInstance.cpp index 57b5b4b6..39f0cfbb 100755 --- a/src/ClientInstance.cpp +++ b/src/ClientInstance.cpp @@ -1655,9 +1655,9 @@ PVR_ERROR CVNSIClientInstance::GetStreamTimes(kodi::addon::PVRStreamTimes& times /*******************************************/ /** PVR Recording Stream Functions **/ -bool CVNSIClientInstance::OpenRecordedStream(const kodi::addon::PVRRecording& recording) +bool CVNSIClientInstance::OpenRecordedStream(const kodi::addon::PVRRecording& recording, int64_t& streamId) { - CloseRecordedStream(); + CloseRecordedStream(streamId); m_recording = new cVNSIRecording(*this); try @@ -1680,13 +1680,13 @@ bool CVNSIClientInstance::OpenRecordedStream(const kodi::addon::PVRRecording& re } } -void CVNSIClientInstance::CloseRecordedStream() +void CVNSIClientInstance::CloseRecordedStream(int64_t streamId) { delete m_recording; m_recording = nullptr; } -int CVNSIClientInstance::ReadRecordedStream(unsigned char* buffer, unsigned int size) +int CVNSIClientInstance::ReadRecordedStream(int64_t streamId, unsigned char* buffer, unsigned int size) { if (!m_recording) return -1; @@ -1702,7 +1702,7 @@ int CVNSIClientInstance::ReadRecordedStream(unsigned char* buffer, unsigned int } } -int64_t CVNSIClientInstance::SeekRecordedStream(int64_t position, int whence) +int64_t CVNSIClientInstance::SeekRecordedStream(int64_t streamId, int64_t position, int whence) { try { @@ -1717,7 +1717,7 @@ int64_t CVNSIClientInstance::SeekRecordedStream(int64_t position, int whence) return -1; } -int64_t CVNSIClientInstance::LengthRecordedStream() +int64_t CVNSIClientInstance::LengthRecordedStream(int64_t streamId) { if (m_recording) return m_recording->Length(); diff --git a/src/ClientInstance.h b/src/ClientInstance.h index cd1c1709..6bf61cff 100644 --- a/src/ClientInstance.h +++ b/src/ClientInstance.h @@ -108,11 +108,11 @@ class ATTR_DLL_LOCAL CVNSIClientInstance : public kodi::addon::CInstancePVRClien //--==----==----==----==----==----==----==----==----==----==----==----==----== - bool OpenRecordedStream(const kodi::addon::PVRRecording& recording) override; - void CloseRecordedStream() override; - int ReadRecordedStream(unsigned char* buffer, unsigned int size) override; - int64_t SeekRecordedStream(int64_t position, int whence) 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* buffer, unsigned int size) override; + int64_t SeekRecordedStream(int64_t streamId, int64_t position, int whence) override; + int64_t LengthRecordedStream(int64_t streamId) override; PVR_ERROR GetStreamReadChunkSize(int& chunksize) override; //--==----==----==----==----==----==----==----==----==----==----==----==----==