AW: [mythtv] enhancement request: name sources

Jochen Kühner jochen.kuehner at gmx.de
Thu Dec 1 03:59:01 EST 2005


This is a patch wich creates a name fiel in the capture card setup.
You need to add the field displayname as varchar(255) to your database.

I'm now looking to implement the display of this name in the tv_play.cpp
The function UpdateOSDInput need to be changed.
But this I can firstly look at evening, because I'm at work at the moment!

-----Ursprüngliche Nachricht-----
Von: mythtv-dev-bounces at mythtv.org [mailto:mythtv-dev-bounces at mythtv.org] Im
Auftrag von Bryan Mayland
Gesendet: Dienstag, 29. November 2005 18:58
An: Development of mythtv
Betreff: Re: [mythtv] enhancement request: name sources

Simon Kenyon wrote:
> when i press Y and/or C it displays the id of the source and the input
> "8: Tuner 0" being one example
> it would be really cool if each capture card/input could have a name
>   
    I've thought about this a few times too and think it is a good 
idea.  I only have 2 tuners but I can never remember if #1 is 
/dev/video0 or /dev/video1. 
_______________________________________________
mythtv-dev mailing list
mythtv-dev at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
-------------- next part --------------
Index: libs/libmythtv/videosource.h
===================================================================
--- libs/libmythtv/videosource.h	(Revision 8092)
+++ libs/libmythtv/videosource.h	(Arbeitskopie)
@@ -16,6 +16,7 @@
 
 class SignalTimeout;
 class ChannelTimeout;
+class CaptureCardDisplayName;
 class UseEIT;
 
 typedef QMap<int,QString> InputNames;
Index: libs/libmythtv/videosource.cpp
===================================================================
--- libs/libmythtv/videosource.cpp	(Revision 8092)
+++ libs/libmythtv/videosource.cpp	(Arbeitskopie)
@@ -1095,6 +1095,19 @@
     };
 };
 
+class CaptureCardDisplayName: public LineEditSetting, public CCSetting
+{
+  public:
+    CaptureCardDisplayName(const CaptureCard& parent)
+      : CCSetting(parent, "displayname")
+    {
+        setLabel(QObject::tr("Display Name"));
+	setHelpText(QObject::tr(
+                        "This Name is shown for Example when changeing "
+                        "the input in LiveTV via C or Y. "));
+    };
+};
+
 class AudioRateLimit: public ComboBoxSetting, public CCSetting
 {
   public:
@@ -1470,9 +1483,12 @@
 
     CardType* cardtype = new CardType(parent);
     addChild(cardtype);
+    addChild(new CaptureCardDisplayName(parent));
+
     setTrigger(cardtype);
     setSaveAll(false);
-
+    
+    
     addTarget("V4L", new V4LConfigurationGroup(parent));
     addTarget("DVB", new DVBConfigurationGroup(parent));
     addTarget("HDTV", new pcHDTVConfigurationGroup(parent));


More information about the mythtv-dev mailing list