XBMC Community Forum
MythTV PVR client Addon Developers Wanted - Developers Only! - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: PVR Development (/forumdisplay.php?fid=136)
+--- Thread: MythTV PVR client Addon Developers Wanted - Developers Only! (/showthread.php?tid=82015)



- wagnerrp - 2010-10-17 21:18

karatekickz Wrote:It appears that the mythtv guys are not at all fans of the libcmyth as per their wiki. Mainly due to how it implements the MythTV protocol.

The only complaint we have with libcmyth is its handling of the protocol check. It doesn't limit connection to a single protocol version, or even a range of versions. Rather, it blindly repeats back the version the backend says it is in order to force a connection. This is very dangerous behavior, and so the additional token check in trunk was added to ensure 3rd party libraries have actually been updated to speak what they claim to.

In contrast, the connection classes used by the MythBox plugin are an example of how to do things properly. It has multiple classes for different ranges of protocol versions, in order to properly handle differing ProgramInfo sizes and command arguments.


- tafypz - 2010-10-18 01:23

analogue Wrote:I'll throw my hat in the ring since the pvr add-on is starting to see lots of activity now. It has been quite a while since I've done c/c++ but it should be interesting. First things first...need to get setup under Eclipse to edit/compile/test. Anyone using eclipse?

I tried eclipse at first (Helios) but It would crash miserably when launching a debug session. I have been using kdevelop since and it works perfectly.


- outleradam - 2010-10-18 03:44

Eclipse is great for simple java, and used for that purpose in the business sector as well. I find that it is lacking in many areas. It is pretty basic. I ditch it for something a bit more graphically oriented when I start working with forms. I cant imagine trying to use it for a project like xbmc. There are a ton of IDEs out there for free.


- waldo22 - 2010-10-18 04:06

dteirney Wrote:It is not possible to build the PVR Addon using Python. It has to be built using C++.

Have you been following what jfcarroll has been doing with addons in multiple programming languages here:

http://forum.xbmc.org/showthread.php?tid=80984

Does that change the situation any?

-Wes


- PhracturedBlue - 2010-10-18 06:43

I have added support for MythTV 0.24 (well assuming they don't change the protocol in svn between now and then)

The ticket is:
http://trac.xbmc.org/ticket/10535

The 2 big changes were:
57: significant changes to proginfo structure
62: add token system.

FYI, a reasonably correct list of protocol changes can be found here:
http://www.mythtv.org/wiki/Category:Myth_Protocol

I didn't verify all of libcmyth's capabilities to be compliant, but at least the ones used to read from proginfo and to fetch recordings are now working.


- tafypz - 2010-10-18 06:47

PhracturedBlue Wrote:I have added support for MythTV 0.24 (well assuming they don't change the protocol in svn between now and then)

The ticket is:
http://trac.xbmc.org/ticket/10535

The 2 big changes were:
57: significant changes to proginfo structure
62: add token system.

FYI, a reasonably correct list of protocol changes can be found here:
http://www.mythtv.org/wiki/Category:Myth_Protocol

I didn't verify all of libcmyth's capabilities to be compliant, but at least the ones used to read from proginfo and to fetch recordings are now working.

Awesome, I hopefully will be able to try out the recording schedule functions tomorrow


- dteirney - 2010-10-18 08:42

wagnerrp Wrote:The only complaint we have with libcmyth is its handling of the protocol check. It doesn't limit connection to a single protocol version, or even a range of versions. Rather, it blindly repeats back the version the backend says it is in order to force a connection. This is very dangerous behavior, and so the additional token check in trunk was added to ensure 3rd party libraries have actually been updated to speak what they claim to.

In contrast, the connection classes used by the MythBox plugin are an example of how to do things properly. It has multiple classes for different ranges of protocol versions, in order to properly handle differing ProgramInfo sizes and command arguments.

libcmyth is definitely not a shining example of how to deal with the changes that have been made to the Myth Protocol. The "if protocol version > X" statements are ugly as sin. And yes, the library doesn't check that it definitely supports the version the backend reports which is nasty. Still it's a better starting point than nothing and at least understands the somewhat proprietary protocol format.

@PhracturedBlue, not sure how much you looked into the connection code, but is it possible to not do the "Ask for the backend protocol version using version 8" for every single connection. From my loose understanding, we need to know what protocol version the backend supports, because you can't ask to use protocol version X when connecting to the backend. The library should only need to do that once though.


- dteirney - 2010-10-18 08:50

analogue Wrote:I'll throw my hat in the ring since the pvr add-on is starting to see lots of activity now. It has been quite a while since I've done c/c++ but it should be interesting. First things first...need to get setup under Eclipse to edit/compile/test. Anyone using eclipse?

I'm using Eclipse CDT. Details albeit pretty lacking on http://wiki.xbmc.org/index.php?title=Eclipse_CDT_Setup_For_XBMC_Development


- dteirney - 2010-10-18 09:09

waldo22 Wrote:Have you been following what jfcarroll has been doing with addons in multiple programming languages here:

http://forum.xbmc.org/showthread.php?tid=80984

Does that change the situation any?

-Wes

Not right now. Most of that work is to expose the existing Python API and there isn't any Python API for the PVR area.

Maybe in the future it will be possible, but for the meantime, C++ is where it's at. There are enough library parts available that the solution can still be done in C++, just means that we can't use the MythTV Python API and we need to make a few improvements to libcmyth along the way.


- PhracturedBlue - 2010-10-18 19:22

dteirney Wrote:@PhracturedBlue, not sure how much you looked into the connection code, but is it possible to not do the "Ask for the backend protocol version using version 8" for every single connection. From my loose understanding, we need to know what protocol version the backend supports, because you can't ask to use protocol version X when connecting to the backend. The library should only need to do that once though.

This should be possible, though it is beyond the scope of my current patch. I'm not sure there is much gain. You can't ask myth for its protocol number before connecting, so you only save one connection attempt by caching the version. A static variable would be really crude, but likely trivial solution for this.

libcmyth is pretty kludgey, and only works because the protocol only rarely changes significantly. replacing it with something better would be nice, but also a huge amount of work.