Kodi Community Forum
pvr.demo GetChannel function - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: pvr.demo GetChannel function (/showthread.php?tid=230079)



pvr.demo GetChannel function - piotrekcrash - 2015-06-20

Hi All,

I'm working on my own PVR addon.

When stream field is empty for single channel in channel list then on click this channel in Kodi
function "PVRDemoData::GetChannel" is called.

I wanna put there my coding to generate stream link but at start I simply put there link to video

Quote:bool PVRDemoData::GetChannel(const PVR_CHANNEL &channel, PVRDemoChannel &myChannel)
{
XBMC->Log(LOG_ERROR, "GetChannel called");
for (unsigned int iChannelPtr = 0; iChannelPtr < m_channels.size(); iChannelPtr++)
{
PVRDemoChannel &thisChannel = m_channels.at(iChannelPtr);
if (thisChannel.iUniqueId == (int) channel.iUniqueId)
{
myChannel.iUniqueId = thisChannel.iUniqueId;
myChannel.bRadio = thisChannel.bRadio;
myChannel.iChannelNumber = thisChannel.iChannelNumber;
myChannel.iSubChannelNumber = thisChannel.iSubChannelNumber;
myChannel.iEncryptionSystem = thisChannel.iEncryptionSystem;
myChannel.strChannelName = thisChannel.strChannelName;
myChannel.strIconPath = thisChannel.strIconPath;
myChannel.strStreamURL = "http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4";

return true;
}
}

return false;
}

Unfortunatly this is not working. I log i receive:

Quote:15:55:00 T:3448 NOTICE: Creating InputStream
15:55:00 T:3448 ERROR: Previous line repeats 1 times.
15:55:00 T:3448 NOTICE: Creating Demuxer
15:55:00 T:3448 ERROR: CDVDDemuxFFmpeg::Open - error probing input format, pvr://channels/tv/All channels/4.pvr
15:55:00 T:3448 ERROR: Previous line repeats 9 times.
15:55:00 T:3448 ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer


What I'm doing wrong?