From 3bfc32a282956c76986f02348ec6490d5b70eefc Mon Sep 17 00:00:00 2001 From: ksooo <3226626+ksooo@users.noreply.github.com> Date: Tue, 22 Oct 2024 12:44:29 +0200 Subject: [PATCH] PVR Add-on API v9.2.0 --- pvr.nextpvr/addon.xml.in | 2 +- pvr.nextpvr/changelog.txt | 2 ++ src/pvrclient-nextpvr.cpp | 12 ++++++------ src/pvrclient-nextpvr.h | 10 +++++----- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/pvr.nextpvr/addon.xml.in b/pvr.nextpvr/addon.xml.in index a1c8d263..b17cd18d 100644 --- a/pvr.nextpvr/addon.xml.in +++ b/pvr.nextpvr/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/pvr.nextpvr/changelog.txt b/pvr.nextpvr/changelog.txt index 3166e472..b8361d24 100644 --- a/pvr.nextpvr/changelog.txt +++ b/pvr.nextpvr/changelog.txt @@ -1,3 +1,5 @@ +v22.3.0 +- PVR Add-on API v9.2.0 v22.2.0 - Start timeshift in realtime for radio playback diff --git a/src/pvrclient-nextpvr.cpp b/src/pvrclient-nextpvr.cpp index 7e08df9f..d5542294 100644 --- a/src/pvrclient-nextpvr.cpp +++ b/src/pvrclient-nextpvr.cpp @@ -123,7 +123,7 @@ cPVRClientNextPVR::~cPVRClientNextPVR() { // this is likley only needed for transcoding but include all cases if (m_nowPlaying == Recording) - CloseRecordedStream(); + CloseRecordedStream(-1); else CloseLiveStream(); } @@ -740,7 +740,7 @@ bool cPVRClientNextPVR::CanSeekStream(void) /** Record stream handling */ -bool cPVRClientNextPVR::OpenRecordedStream(const kodi::addon::PVRRecording& recording) +bool cPVRClientNextPVR::OpenRecordedStream(const kodi::addon::PVRRecording& recording, int64_t& streamId) { kodi::addon::PVRRecording copyRecording = recording; m_nowPlaying = Recording; @@ -749,7 +749,7 @@ bool cPVRClientNextPVR::OpenRecordedStream(const kodi::addon::PVRRecording& reco return m_recordingBuffer->Open(line, copyRecording); } -void cPVRClientNextPVR::CloseRecordedStream(void) +void cPVRClientNextPVR::CloseRecordedStream(int64_t streamId) { if (IsServerStreamingRecording()) { @@ -759,7 +759,7 @@ void cPVRClientNextPVR::CloseRecordedStream(void) m_nowPlaying = NotPlaying; } -int cPVRClientNextPVR::ReadRecordedStream(unsigned char* pBuffer, unsigned int iBufferSize) +int cPVRClientNextPVR::ReadRecordedStream(int64_t streamId, unsigned char* pBuffer, unsigned int iBufferSize) { if (IsServerStreamingRecording()) { @@ -768,7 +768,7 @@ int cPVRClientNextPVR::ReadRecordedStream(unsigned char* pBuffer, unsigned int i return -1; } -int64_t cPVRClientNextPVR::SeekRecordedStream(int64_t iPosition, int iWhence) +int64_t cPVRClientNextPVR::SeekRecordedStream(int64_t streamId, int64_t iPosition, int iWhence) { if (IsServerStreamingRecording()) { @@ -777,7 +777,7 @@ int64_t cPVRClientNextPVR::SeekRecordedStream(int64_t iPosition, int iWhence) return -1; } -int64_t cPVRClientNextPVR::LengthRecordedStream(void) +int64_t cPVRClientNextPVR::LengthRecordedStream(int64_t streamId) { if (IsServerStreamingRecording()) { diff --git a/src/pvrclient-nextpvr.h b/src/pvrclient-nextpvr.h index 2896a9d3..02aa0284 100644 --- a/src/pvrclient-nextpvr.h +++ b/src/pvrclient-nextpvr.h @@ -87,11 +87,11 @@ class ATTR_DLL_LOCAL cPVRClientNextPVR : public kodi::addon::CInstancePVRClient bool IsServerStreamingRecording(bool log = true); /* Record stream handling */ - bool OpenRecordedStream(const kodi::addon::PVRRecording& recinfo) 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& recinfo, 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; void ForceRecordingUpdate() { m_lastRecordingUpdateTime = 0; }