Skip to content

Commit

Permalink
Merge pull request #316 from ksooo/addon-api-9-2-0
Browse files Browse the repository at this point in the history
PVR Add-on API v9.2.0
  • Loading branch information
ksooo authored Oct 24, 2024
2 parents 6e8b63f + acd20a4 commit 25909ce
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pvr.vbox/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.vbox"
version="22.1.0"
version="22.2.0"
name="VBox TV Gateway PVR Client"
provider-name="Sam Stenvall">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
12 changes: 6 additions & 6 deletions src/VBoxInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned int>(std::stoi(recording.GetRecordingId()));
auto& recordings = VBox::GetRecordingsAndTimers();
Expand Down Expand Up @@ -858,29 +858,29 @@ 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;

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;

return m_recordingReader->Seek(position, whence);
}

int64_t CVBoxInstance::LengthRecordedStream()
int64_t CVBoxInstance::LengthRecordedStream(int64_t streamId)
{
if (!m_recordingReader)
return -1;
Expand Down
10 changes: 5 additions & 5 deletions src/VBoxInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 25909ce

Please sign in to comment.