Skip to content

Commit

Permalink
Merge pull request #216 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 12ad26d + 0247571 commit 98e63d1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pvr.dvblink/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.dvblink"
version="22.1.0"
version="22.2.0"
name="TVMosaic/DVBLink PVR Client"
provider-name="DVBLogic">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions pvr.dvblink/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
12 changes: 6 additions & 6 deletions src/DVBLinkClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2002,10 +2002,10 @@ PVR_ERROR DVBLinkClient::SetRecordingLastPlayedPosition(const kodi::addon::PVRRe
return PVR_ERROR_SERVER_ERROR;
}

bool DVBLinkClient::OpenRecordedStream(const kodi::addon::PVRRecording& recording)
bool DVBLinkClient::OpenRecordedStream(const kodi::addon::PVRRecording& recording, int64_t& streamId)
{
//close previous stream to be sure
CloseRecordedStream();
CloseRecordedStream(streamId);

bool use_timeshift = m_base.GetSettings().UseTimeshift();
bool use_transcoder = m_base.GetSettings().UseTranscoding();
Expand Down Expand Up @@ -2035,7 +2035,7 @@ bool DVBLinkClient::OpenRecordedStream(const kodi::addon::PVRRecording& recordin
return ret_val;
}

void DVBLinkClient::CloseRecordedStream()
void DVBLinkClient::CloseRecordedStream(int64_t streamId)
{
if (m_recording_streamer != nullptr)
{
Expand All @@ -2045,23 +2045,23 @@ void DVBLinkClient::CloseRecordedStream()
}
}

int DVBLinkClient::ReadRecordedStream(unsigned char* pBuffer, unsigned int iBufferSize)
int DVBLinkClient::ReadRecordedStream(int64_t streamId, unsigned char* pBuffer, unsigned int iBufferSize)
{
if (m_recording_streamer != nullptr)
return m_recording_streamer->ReadRecordedStream(pBuffer, iBufferSize);

return -1;
}

int64_t DVBLinkClient::SeekRecordedStream(int64_t iPosition, int iWhence /* = SEEK_SET */)
int64_t DVBLinkClient::SeekRecordedStream(int64_t streamId, int64_t iPosition, int iWhence /* = SEEK_SET */)
{
if (m_recording_streamer != nullptr)
return m_recording_streamer->SeekRecordedStream(iPosition, iWhence);

return -1;
}

int64_t DVBLinkClient::LengthRecordedStream()
int64_t DVBLinkClient::LengthRecordedStream(int64_t streamId)
{
if (m_recording_streamer != nullptr)
return m_recording_streamer->LengthRecordedStream();
Expand Down
10 changes: 5 additions & 5 deletions src/DVBLinkClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ class ATTR_DLL_LOCAL DVBLinkClient : public kodi::addon::CInstancePVRClient
bool IsRealTimeStream() override;
int ReadLiveStream(unsigned char* pBuffer, unsigned int iBufferSize) override;

bool OpenRecordedStream(const kodi::addon::PVRRecording& recording) override;
void CloseRecordedStream() override;
int ReadRecordedStream(unsigned char* pBuffer, unsigned int iBufferSize) override;
int64_t SeekRecordedStream(int64_t iPosition, int iWhence = SEEK_SET) 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* pBuffer, unsigned int iBufferSize) override;
int64_t SeekRecordedStream(int64_t streamId, int64_t iPosition, int iWhence = SEEK_SET) override;
int64_t LengthRecordedStream(int64_t streamId) override;

bool CanPauseStream() override;
bool CanSeekStream() override;
Expand Down

0 comments on commit 98e63d1

Please sign in to comment.