Kodi Community Forum

Full Version: New PVT plugin, got stuck somewhat
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I am a newbie to XBMC/Kodi API and add-on development. I sorta been poking around the various PVT plugins source code trying to figure things out.

I currently use an IPTV service which provides an XBMC "video" plugin, which looks rather crappy (but it's written in Python, makes reverse engineering easier somewhat). I thought I could try and hack something together and write a PVR provider that would use PVR features instead of trying to do similar stuff through a custom UI/plugin.

I am working on Windows 7 x64. Running Kodi 14.2RC1. Using Visual Studio Express 2010.

I got stuck somewhat with two issues (probably all my fault since I don't know what I am doing):
1. I got channels to load, but somehow the Channel groups never load? I enabled the debug log and still don't have a clue. I know it might be related to my capabilities. Here is what I have right now:
PVR_ERROR GetAddonCapabilities(PVR_ADDON_CAPABILITIES* pCapabilities)
{
XBMC->Log(LOG_DEBUG, "%s - PVR add-on", __FUNCTION__);

pCapabilities->bSupportsEPG = true;
pCapabilities->bSupportsTV = true;
pCapabilities->bSupportsRadio = true;
pCapabilities->bSupportsRecordings = false;
pCapabilities->bSupportsTimers = false;
pCapabilities->bSupportsChannelGroups = true;
pCapabilities->bSupportsChannelScan = false;
pCapabilities->bHandlesInputStream = true;
pCapabilities->bHandlesDemuxing = false;

return PVR_ERROR_NO_ERROR;
}

2. The "channel stream URL" is not known ahead of time. I need to make an API call in order to pull it for a particular channel. I saw that there's GetLiveStreamURL() that's supposedly designed for it, but I am unable to make it trigger or work. Which requirements do I need for this to get called? I saw all kind of hacks with bHandlesInputStream and setting stream url to pvr://stream/tv/%i.ts format.

I don't have EPG implemented yet, so I guess some of this might be dependent on that.

PVR stuff looks awesome, I just wish I could figure it out and hopefully get my hack working.

Thank you.