[mythtv] Getting started coding plugins

Justin Hornsby justin at mythtvthemes.co.uk
Sun Jan 13 19:44:22 UTC 2008


Christoffer Holm Kjølbæk wrote:
> Hi
>
> I have been using MythTV for 3-4 years now, and I would like to get
> involved and help coding and bug-fixing the code.
>
> To start with, I would like to know how to make plug-ins for MythTV. I
> have been googling for a tutorial or some small sample plug-ins, but
> without any luck.
>
> Then I tried to use MythWeather as an example, to make a new plugin, but
> also without a lot of luck.
>
> So, does anyone have links for guides, howtos etc., or just a very
> simple plugin I could start with?
>
> Best regards
> Christoffer Kjølbæk
>   
The new mythappearance plugin was based entirely on the hellomyth plugin 
detailed on the wiki & various other code ideas gleaned from other 
plugins.  While fiddling around I discovered (with help) that adding new 
Qobjects to a basic plugin (such as menu popups) need you to re-run 
qmake (or just re-run configure) before make & make install otherwise 
you'll end up with either unknown symbols or the new stuff will appear 
but not work at all.

For anything to be considered for inclusion in mythtv it's highly 
recommended that new plugins use the newer mythui classes rather than 
the method most current plugins use (libmythui? can never remember...).  
Some widgets are missing (such as menu popups) but I'm told there are 
ways around that - or you could code up a new widget which could be used 
by other parts of mythtv.

You'd also do well to read the official coding standards doc to ensure 
that your work's naming conventions & whitespacing are acceptable.

For my shame, mythappearance doesn't use mythui but I fully intend to 
port it as soon as I'm able.  Integrating it into the actual setup menus 
is also something I'm toying with but I don't have much idea where to 
begin with that yet.

Good luck, and have fun!

Justin


More information about the mythtv-dev mailing list