From 40ac859082065ccd3583786cd7bd4e137456fbe1 Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Mon, 5 Feb 2024 22:44:40 +0000 Subject: [PATCH] Basic PVR API impl --- src/IptvSimple.cpp | 14 +++++++++++++- src/IptvSimple.h | 4 +++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/IptvSimple.cpp b/src/IptvSimple.cpp index 28b69707..331aeb60 100644 --- a/src/IptvSimple.cpp +++ b/src/IptvSimple.cpp @@ -216,8 +216,11 @@ PVR_ERROR IptvSimple::GetChannels(bool radio, kodi::addon::PVRChannelsResultSet& return m_channels.GetChannels(results, radio); } -PVR_ERROR IptvSimple::GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, std::vector& properties) +PVR_ERROR IptvSimple::GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, std::vector& properties, bool fromEpgAsLive) { + Logger::Log(LogLevel::LEVEL_INFO, "%s - XXXXX fromEpgAsLive: %d", __FUNCTION__, fromEpgAsLive); + + if (GetChannel(channel, m_currentChannel)) { std::string streamURL = m_currentChannel.GetStreamURL(); @@ -436,6 +439,15 @@ PVR_ERROR IptvSimple::GetSignalStatus(int channelUid, kodi::addon::PVRSignalStat return PVR_ERROR_NO_ERROR; } +/*************************************************************************** + * Stream State + **************************************************************************/ + +void IptvSimple::StreamClosed() +{ + Logger::Log(LEVEL_INFO, "%s - XXXX Stream Closed", __FUNCTION__); +} + /*************************************************************************** * InstanceSettings **************************************************************************/ diff --git a/src/IptvSimple.h b/src/IptvSimple.h index 11c31535..ed49ec56 100644 --- a/src/IptvSimple.h +++ b/src/IptvSimple.h @@ -57,7 +57,7 @@ class ATTR_DLL_LOCAL IptvSimple : public iptvsimple::IConnectionListener PVR_ERROR GetChannelsAmount(int& amount) override; PVR_ERROR GetChannels(bool radio, kodi::addon::PVRChannelsResultSet& results) override; - PVR_ERROR GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, std::vector& properties) override; + PVR_ERROR GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, std::vector& properties, bool fromEpgAsLive) override; PVR_ERROR GetChannelGroupsAmount(int& amount) override; PVR_ERROR GetChannelGroups(bool radio, kodi::addon::PVRChannelGroupsResultSet& results) override; @@ -71,6 +71,8 @@ class ATTR_DLL_LOCAL IptvSimple : public iptvsimple::IConnectionListener PVR_ERROR GetSignalStatus(int channelUid, kodi::addon::PVRSignalStatus& signalStatus) override; + void StreamClosed() override; + PVR_ERROR GetRecordingsAmount(bool deleted, int& amount) override; PVR_ERROR GetRecordings(bool deleted, kodi::addon::PVRRecordingsResultSet& results) override; PVR_ERROR GetRecordingStreamProperties(const kodi::addon::PVRRecording& recording, std::vector& properties) override;