[mythtv] Feature: Configurable LIRC client name [PATCH]

David Kubicek foceni at gmail.com
Mon Feb 15 17:54:28 UTC 2010


I'm sending a small patch that enables changing MythTV's LIRC client 
("program") name. This is quite useful when you have mythfrontend and 
mythtv-setup or several mythfrontends open at the same time. All these 
apps use "mythtv" client name by default, but by making this client name 
configurable, I can use the existing command-line overrides to allow 
different instances use a different name, hence different LIRC 

When sharing "mythtv", I could not operate just one application at a 
time and I couldn't implement LIRC modes. I pressed UP, both application 
responded - it was a dangerous mess.

Basically, the patch is a fix of status quo, plus adding awareness of a 
new setting called "LircClientName". Well, just see the patch, it's 
quite small.

The fix means we're not ignoring "our_program" argument of LIRC class 
constructor any more. Apparently, devs already thought this should be a 
parameter, but then decided to ignore it and hard-code "mythtv" in 
LIRC::Init() anyway. I just made a change to actually use the value 
passed to the constructor (from mythmainwindow.cpp). The second change 
is in the caller (MythMainWindow::StartLIRC) - instead of passing fixed 
"mythtv", I use the new option "LircClientName" if available. If not (as 
DB setting or CLI override), I still use "mythtv" as default.

This change is completely backwards compatible, transparent, safe and 
provides a useful new feature. Many LIRC aware applications allow for 
program name change for various reasons. I hope you'll consider it, 
thank you.

David Kubicek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MythTV-lirc_client_name_configurable.patch
Type: text/x-patch
Size: 993 bytes
Desc: not available
URL: <http://mythtv.org/pipermail/mythtv-dev/attachments/20100215/2e9f1cb0/attachment.bin>

More information about the mythtv-dev mailing list