Skip to content

Commit

Permalink
PVR Add-on API v9.2.0 (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksooo authored Oct 24, 2024
1 parent c6675e5 commit 390a950
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pvr.dvbviewer/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.dvbviewer"
version="22.1.0"
version="22.2.0"
name="DVBViewer Client"
provider-name="Manuel Mausz">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions pvr.dvbviewer/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v22.2.0
- PVR Add-on API v9.2.0

v22.1.0
- PVR Add-on API v9.0.0

Expand Down
10 changes: 5 additions & 5 deletions src/DvbData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ PVR_ERROR Dvb::GetRecordingsAmount(bool deleted, int& amount)
return PVR_ERROR_NO_ERROR;
}

bool Dvb::OpenRecordedStream(const kodi::addon::PVRRecording& recinfo)
bool Dvb::OpenRecordedStream(const kodi::addon::PVRRecording& recinfo, int64_t& streamId)
{
std::lock_guard<std::mutex> lock(m_mutex);

Expand Down Expand Up @@ -835,29 +835,29 @@ bool Dvb::OpenRecordedStream(const kodi::addon::PVRRecording& recinfo)
return m_recReader->Start();
}

void Dvb::CloseRecordedStream()
void Dvb::CloseRecordedStream(int64_t streamId)
{
if (m_recReader)
SafeDelete(m_recReader);
}

int Dvb::ReadRecordedStream(unsigned char* buffer, unsigned int size)
int Dvb::ReadRecordedStream(int64_t streamId, unsigned char* buffer, unsigned int size)
{
if (!m_recReader)
return 0;

return static_cast<int>(m_recReader->ReadData(buffer, size));
}

int64_t Dvb::SeekRecordedStream(int64_t position, int whence)
int64_t Dvb::SeekRecordedStream(int64_t streamId, int64_t position, int whence)
{
if (!m_recReader)
return 0;

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

int64_t Dvb::LengthRecordedStream()
int64_t Dvb::LengthRecordedStream(int64_t streamId)
{
if (!m_recReader)
return -1;
Expand Down
10 changes: 5 additions & 5 deletions src/DvbData.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ class Dvb
PVR_ERROR DeleteRecording(
const kodi::addon::PVRRecording& recording) override;
PVR_ERROR GetRecordingsAmount(bool deleted, int& amount) override;
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;
PVR_ERROR GetRecordingEdl(const kodi::addon::PVRRecording& recinfo,
std::vector<kodi::addon::PVREDLEntry>& edl) override;
PVR_ERROR SetRecordingPlayCount(const kodi::addon::PVRRecording& recinfo,
Expand Down

0 comments on commit 390a950

Please sign in to comment.