diff --git a/pvr.vbox/addon.xml.in b/pvr.vbox/addon.xml.in index cf4d193d..543aa177 100644 --- a/pvr.vbox/addon.xml.in +++ b/pvr.vbox/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/src/VBoxInstance.cpp b/src/VBoxInstance.cpp index f7b6d02f..dd76a4de 100644 --- a/src/VBoxInstance.cpp +++ b/src/VBoxInstance.cpp @@ -823,9 +823,9 @@ void PauseStream(bool bPaused) } // Recording stream methods -bool CVBoxInstance::OpenRecordedStream(const kodi::addon::PVRRecording & recording) +bool CVBoxInstance::OpenRecordedStream(const kodi::addon::PVRRecording & recording, int64_t& streamId) { - CloseRecordedStream(); + CloseRecordedStream(streamId); unsigned int id = static_cast(std::stoi(recording.GetRecordingId())); auto& recordings = VBox::GetRecordingsAndTimers(); @@ -858,13 +858,13 @@ bool CVBoxInstance::OpenRecordedStream(const kodi::addon::PVRRecording & recordi return m_recordingReader->Start(); } -void CVBoxInstance::CloseRecordedStream() +void CVBoxInstance::CloseRecordedStream(int64_t streamId) { delete m_recordingReader; m_recordingReader = nullptr; } -int CVBoxInstance::ReadRecordedStream(unsigned char* buffer, unsigned int size) +int CVBoxInstance::ReadRecordedStream(int64_t streamId, unsigned char* buffer, unsigned int size) { if (!m_recordingReader) return 0; @@ -872,7 +872,7 @@ int CVBoxInstance::ReadRecordedStream(unsigned char* buffer, unsigned int size) return m_recordingReader->ReadData(buffer, size); } -int64_t CVBoxInstance::SeekRecordedStream(int64_t position, int whence) +int64_t CVBoxInstance::SeekRecordedStream(int64_t streamId, int64_t position, int whence) { if (!m_recordingReader) return 0; @@ -880,7 +880,7 @@ int64_t CVBoxInstance::SeekRecordedStream(int64_t position, int whence) return m_recordingReader->Seek(position, whence); } -int64_t CVBoxInstance::LengthRecordedStream() +int64_t CVBoxInstance::LengthRecordedStream(int64_t streamId) { if (!m_recordingReader) return -1; diff --git a/src/VBoxInstance.h b/src/VBoxInstance.h index 708d4d3d..b0bca91a 100644 --- a/src/VBoxInstance.h +++ b/src/VBoxInstance.h @@ -71,11 +71,11 @@ class ATTR_DLL_LOCAL CVBoxInstance : public kodi::addon::CInstancePVRClient, pri bool IsRealTimeStream() override; PVR_ERROR GetStreamTimes(kodi::addon::PVRStreamTimes& times) override; - 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; private: vbox::RecordingReader* m_recordingReader = nullptr;