Skip to content

Commit

Permalink
Basic PVR API impl
Browse files Browse the repository at this point in the history
  • Loading branch information
phunkyfish committed Feb 20, 2024
1 parent d66310e commit b29c8df
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 13 additions & 1 deletion src/IptvSimple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<kodi::addon::PVRStreamProperty>& properties)
PVR_ERROR IptvSimple::GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, std::vector<kodi::addon::PVRStreamProperty>& 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();
Expand Down Expand Up @@ -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
**************************************************************************/
Expand Down
4 changes: 3 additions & 1 deletion src/IptvSimple.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<kodi::addon::PVRStreamProperty>& properties) override;
PVR_ERROR GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, std::vector<kodi::addon::PVRStreamProperty>& properties, bool fromEpgAsLive) override;

PVR_ERROR GetChannelGroupsAmount(int& amount) override;
PVR_ERROR GetChannelGroups(bool radio, kodi::addon::PVRChannelGroupsResultSet& results) override;
Expand All @@ -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<kodi::addon::PVRStreamProperty>& properties) override;
Expand Down

0 comments on commit b29c8df

Please sign in to comment.