[mythtv-users] Testing Raspberry Pi with xbmc mythtv plugin

Karl Dietz dekarl at spaetfruehstuecken.org
Fri Jan 4 23:10:05 UTC 2013


On 04.01.2013 23:00, Patrick Ouellette wrote:
> On Wed, Dec 26, 2012 at 11:19:11AM -0800, Monkey Pet wrote:
>>
>> If you had better success with mythtv 0.26.x and xbmc on the raspberry pi,
>> please post what you did to make it work.  Thanks.
>
> I've had success with openELEC and the cmyth plugin for the pvr.  I have
> 400+ channels so startup initially takes a bit as the Pi loads the EPG info
> but once the EPG is loaded performance seems ok.

I think it might be that the EPG is loading a bit to much data...

https://github.com/opdenkamp/xbmc-pvr-addons/blob/master/addons/pvr.mythtv.cmyth/src/pvrclient-mythtv.cpp#L272

Notice the call to GetGuide only restricting to a time frame, but not
to a channel. Some lines down is the loop that handles all programs
which filters out everything not related to the one channel that the
guide is actually wanted for (aka throwing away the data for the other
399+ channels in your case).

Basically you end up running this query once per channel
https://github.com/opdenkamp/xbmc-pvr-addons/blob/master/lib/cmyth/libcmyth/mythtv_mysql.c#L563

So if XBMC asks for 10 channels you push data of 4000 channels down the
link just to throw 3990 away.

(btw, imho the query can be simplified, too, from
((program.endtime > ? AND program.endtime < ?) OR (program.starttime >= 
? AND program.starttime <= ?) OR (program.starttime <= ? AND 
program.endtime >= ?))
to just
(program.endtime > ? AND program.starttime < ?)

The quick hack would be to add a restriction to a channel, the proper
solution would involve the Services API
http://www.mythtv.org/wiki/Guide_Service#GetProgramGuide

Regards,
Karl

PS: I have no idea how the XBMC development process works and can't test
patches but thought I might as well throw my findings out there as I've
looked into it already.


More information about the mythtv-users mailing list