Skip to content

Commit

Permalink
Merge pull request #217 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 6ed2fbd + aaab9f1 commit c5bb924
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pvr.mediaportal.tvserver/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.mediaportal.tvserver"
version="22.1.1"
version="22.2.0"
name="MediaPortal PVR Client"
provider-name="Marcel Groothuis">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions pvr.mediaportal.tvserver/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.1
- Disable buffering to fix incompatibility with Kodi's file stream buffer

Expand Down
10 changes: 5 additions & 5 deletions src/pvrclient-mediaportal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,7 @@ PVR_ERROR cPVRClientMediaPortal::GetSignalStatus(int channelUid, kodi::addon::PV
// respect to the live tv streams is that the URLs for the recordings
// can be requested on beforehand (done in the TVServerKodi plugin).

bool cPVRClientMediaPortal::OpenRecordedStream(const kodi::addon::PVRRecording& recording)
bool cPVRClientMediaPortal::OpenRecordedStream(const kodi::addon::PVRRecording& recording, int64_t& streamId)
{
kodi::Log(ADDON_LOG_INFO, "OpenRecordedStream (id=%s, RTSP=%d)", recording.GetRecordingId().c_str(), (CSettings::Get().GetUseRTSP() ? "true" : "false"));

Expand Down Expand Up @@ -2142,7 +2142,7 @@ bool cPVRClientMediaPortal::OpenRecordedStream(const kodi::addon::PVRRecording&
return true;
}

void cPVRClientMediaPortal::CloseRecordedStream(void)
void cPVRClientMediaPortal::CloseRecordedStream(int64_t streamId)
{
if (!IsUp() || CSettings::Get().GetStreamingMethod() == ffmpeg)
return;
Expand All @@ -2159,7 +2159,7 @@ void cPVRClientMediaPortal::CloseRecordedStream(void)
}
}

int cPVRClientMediaPortal::ReadRecordedStream(unsigned char *pBuffer, unsigned int iBufferSize)
int cPVRClientMediaPortal::ReadRecordedStream(int64_t streamId, unsigned char *pBuffer, unsigned int iBufferSize)
{
size_t read_wanted = static_cast<size_t>(iBufferSize);
size_t read_done = 0;
Expand Down Expand Up @@ -2191,7 +2191,7 @@ int cPVRClientMediaPortal::ReadRecordedStream(unsigned char *pBuffer, unsigned i
return static_cast<int>(read_done);
}

int64_t cPVRClientMediaPortal::SeekRecordedStream(int64_t iPosition, int iWhence)
int64_t cPVRClientMediaPortal::SeekRecordedStream(int64_t streamId, int64_t iPosition, int iWhence)
{
if (CSettings::Get().GetStreamingMethod() == ffmpeg || !m_tsreader)
{
Expand All @@ -2205,7 +2205,7 @@ int64_t cPVRClientMediaPortal::SeekRecordedStream(int64_t iPosition, int iWhence
return m_tsreader->SetFilePointer(iPosition, iWhence);
}

int64_t cPVRClientMediaPortal::LengthRecordedStream(void)
int64_t cPVRClientMediaPortal::LengthRecordedStream(int64_t streamId)
{
if (CSettings::Get().GetStreamingMethod() == ffmpeg || !m_tsreader)
{
Expand Down
10 changes: 5 additions & 5 deletions src/pvrclient-mediaportal.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ class ATTR_DLL_LOCAL cPVRClientMediaPortal
int64_t LengthLiveStream(void) override;

/* Record stream handling */
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;
PVR_ERROR GetRecordingStreamProperties(const kodi::addon::PVRRecording& recording, std::vector<kodi::addon::PVRStreamProperty>& properties) override;

/* Common stream handing functions */
Expand Down

0 comments on commit c5bb924

Please sign in to comment.