[mythtv] PATCH: Picture quality settings

Chris Liscio mythtv-dev@snowman.net
Fri, 13 Dec 2002 14:14:09 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0052_01C2A2B1.EACD2820
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Enclosed is a patch that allows settings to be adjusted for the input
quality (such as contrast, brightness, etc) during live TV.  It is just =
a
quick addition of this feature, and is open to suggestion.

Right now, the only real annoying things about it are:

1) It takes about 1/2 a second to update on screen (makes sense, since =
this
is time-shifted TV), and if you're not careful with the keypresses, you =
will
have yourself a long stream of changes that may take a few seconds to =
apply
to your stream.

2) The input/OSD for the controls.  Right now, I tried to save some =
keyboard
space and use the j,k, and l keys to control the feature.  J, K, L =
increases
the settings (can't remember which does which) and j,k,l decreases the
setting.  The display is kind of ugly, and might need some tweaking.

3) (Somewhat related to 2) The display does not show the current =
percentage
that you are changing.  This was fine for me, but some other people =
might
not be so happy with it.

It only adjusts Contrast, Brightness, and Colour (Saturation) right now.
Those were the three controls I'd always go back to xawtv to change, so
those were what I implemented.  Hue could probably be done as well, but =
I've
never played with that as I've never been happy going either direction =
away
from the default setting.  :)

The settings right now, as I understand, get saved somewhere in =
v4l-land.  I
didn't put them into the settings file *or* the DB for the moment.  This
could be easily changed.

Until then, bang away at it and let me know what's wrong.  It ain't too =
bad
for just a few short hours of coding.  And it's hella-useful, too.  :)

Enjoy,
Chris

------=_NextPart_000_0052_01C2A2B1.EACD2820
Content-Type: application/octet-stream;
	name="picturesettings.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="picturesettings.diff"

? picturesettings.patch=0A=
? test=0A=
? programs/mythdialog/.qmake.internal.cache=0A=
? programs/mythdialog/Makefile=0A=
? programs/mythdialog/mythdialog=0A=
Index: libs/libNuppelVideo/osd.cpp=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/libs/libNuppelVideo/osd.cpp,v=0A=
retrieving revision 1.45=0A=
diff -u -r1.45 osd.cpp=0A=
--- libs/libNuppelVideo/osd.cpp	12 Dec 2002 08:44:15 -0000	1.45=0A=
+++ libs/libNuppelVideo/osd.cpp	13 Dec 2002 19:03:14 -0000=0A=
@@ -536,6 +536,37 @@=0A=
         channelnumber->AddType(chantext);=0A=
     }=0A=
 =0A=
+    if (settings->GetSetting("SettingsRect") !=3D "")=0A=
+    {=0A=
+        QString settingsrect =3D settings->GetSetting("SettingsRect");=0A=
+=0A=
+        QRect settingsRect =3D parseRect(settingsrect);=0A=
+        normalizeRect(&settingsRect);=0A=
+        settingsRect.moveBy((int)(vid_width * 0.045), =0A=
+                           (int)(vid_height * 0.05));=0A=
+=0A=
+        int settingsfontsize =3D =
settings->GetNumSetting("SettingsFontSize");=0A=
+        if (!settingsfontsize)=0A=
+            settingsfontsize =3D 40;=0A=
+=0A=
+        if (vid_height < 400)=0A=
+            settingsfontsize /=3D 2;=0A=
+=0A=
+        name =3D "settings_font";=0A=
+        TTFFont *settingsfont =3D LoadFont(fontname, settingsfontsize);=0A=
+=0A=
+        fontMap[name] =3D settingsfont;=0A=
+=0A=
+        name =3D "settings";=0A=
+        OSDSet *settings =3D new OSDSet(name, true, vid_width, =
vid_height,=0A=
+                                           wmult, hmult);=0A=
+        AddSet(settings, name);=0A=
+=0A=
+        OSDTypeText *settingstext =3D new OSDTypeText(name, =
settingsfont, "", =0A=
+                                                settingsRect);=0A=
+        settings->AddType(settingstext);=0A=
+    }=0A=
+=0A=
     if (settings->GetSetting("EditSliderRect") !=3D "")=0A=
     {=0A=
         QString esect =3D settings->GetSetting("EditSliderRect");=0A=
@@ -734,6 +765,23 @@=0A=
     if (container)=0A=
     {=0A=
         OSDTypeText *type =3D (OSDTypeText =
*)container->GetType("channel_number");=0A=
+        if (type)=0A=
+            type->SetText(text);=0A=
+=0A=
+        container->DisplayFor(length * fps);=0A=
+        m_setsvisible =3D true;=0A=
+    }=0A=
+=0A=
+    pthread_mutex_unlock(&osdlock);=0A=
+}=0A=
+=0A=
+void OSD::SetSettingsText(const QString &text, int length)=0A=
+{=0A=
+    pthread_mutex_lock(&osdlock);=0A=
+    OSDSet *container =3D GetSet("settings");=0A=
+    if (container)=0A=
+    {=0A=
+        OSDTypeText *type =3D (OSDTypeText =
*)container->GetType("settings");=0A=
         if (type)=0A=
             type->SetText(text);=0A=
 =0A=
Index: libs/libNuppelVideo/osd.h=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/libs/libNuppelVideo/osd.h,v=0A=
retrieving revision 1.26=0A=
diff -u -r1.26 osd.h=0A=
--- libs/libNuppelVideo/osd.h	12 Dec 2002 08:44:15 -0000	1.26=0A=
+++ libs/libNuppelVideo/osd.h	13 Dec 2002 19:03:14 -0000=0A=
@@ -31,6 +31,7 @@=0A=
                      const QString &callsign, const QString &iconpath,=0A=
                      int length);=0A=
     void SetChannumText(const QString &text, int length);=0A=
+    void SetSettingsText(const QString &text, int length);=0A=
 =0A=
     void NewDialogBox(const QString &name, const QString &message, =0A=
                       const QString &optionone, const QString =
&optiontwo, =0A=
Index: libs/libmyth/mythcontext.cpp=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/libs/libmyth/mythcontext.cpp,v=0A=
retrieving revision 1.17=0A=
diff -u -r1.17 mythcontext.cpp=0A=
--- libs/libmyth/mythcontext.cpp	12 Dec 2002 08:44:15 -0000	1.17=0A=
+++ libs/libmyth/mythcontext.cpp	13 Dec 2002 19:03:16 -0000=0A=
@@ -693,6 +693,42 @@=0A=
     pthread_mutex_unlock(&serverSockLock);=0A=
 }=0A=
 =0A=
+void MythContext::RecorderChangeContrast(int recorder, bool direction)=0A=
+{=0A=
+    QStringList strlist =3D QString("QUERY_RECORDER %1").arg(recorder);=0A=
+    strlist << "CHANGE_CONTRAST";=0A=
+    strlist << QString::number((int)direction);    =0A=
+=0A=
+    pthread_mutex_lock(&serverSockLock);=0A=
+    WriteStringList(serverSock, strlist);=0A=
+    ReadStringList(serverSock, strlist);=0A=
+    pthread_mutex_unlock(&serverSockLock);=0A=
+}=0A=
+=0A=
+void MythContext::RecorderChangeBrightness(int recorder, bool direction)=0A=
+{=0A=
+    QStringList strlist =3D QString("QUERY_RECORDER %1").arg(recorder);=0A=
+    strlist << "CHANGE_BRIGHTNESS";=0A=
+    strlist << QString::number((int)direction);    =0A=
+=0A=
+    pthread_mutex_lock(&serverSockLock);=0A=
+    WriteStringList(serverSock, strlist);=0A=
+    ReadStringList(serverSock, strlist);=0A=
+    pthread_mutex_unlock(&serverSockLock);=0A=
+}=0A=
+=0A=
+void MythContext::RecorderChangeColour(int recorder, bool direction)=0A=
+{=0A=
+    QStringList strlist =3D QString("QUERY_RECORDER %1").arg(recorder);=0A=
+    strlist << "CHANGE_COLOUR";=0A=
+    strlist << QString::number((int)direction);    =0A=
+=0A=
+    pthread_mutex_lock(&serverSockLock);=0A=
+    WriteStringList(serverSock, strlist);=0A=
+    ReadStringList(serverSock, strlist);=0A=
+    pthread_mutex_unlock(&serverSockLock);=0A=
+}=0A=
+=0A=
 bool MythContext::CheckChannel(int recorder, QString channel)=0A=
 {=0A=
     QStringList strlist =3D QString("QUERY_RECORDER %1").arg(recorder);=0A=
Index: libs/libmyth/mythcontext.h=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/libs/libmyth/mythcontext.h,v=0A=
retrieving revision 1.13=0A=
diff -u -r1.13 mythcontext.h=0A=
--- libs/libmyth/mythcontext.h	12 Dec 2002 08:44:15 -0000	1.13=0A=
+++ libs/libmyth/mythcontext.h	13 Dec 2002 19:03:16 -0000=0A=
@@ -75,6 +75,9 @@=0A=
     void PauseRecorder(int recorder);=0A=
     void ToggleRecorderInputs(int recorder);=0A=
     void RecorderChangeChannel(int recorder, bool direction);=0A=
+    void RecorderChangeContrast(int recorder, bool direction);=0A=
+    void RecorderChangeBrightness(int recorder, bool direction);=0A=
+    void RecorderChangeColour(int recorder, bool direction);=0A=
     void RecorderSetChannel(int recorder, QString channel);=0A=
     bool CheckChannel(int recorder, QString channel);=0A=
     void GetRecorderChannelInfo(int recorder, QString &title, QString =
&subtitle,=0A=
Index: libs/libmythtv/channel.cpp=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/libs/libmythtv/channel.cpp,v=0A=
retrieving revision 1.23=0A=
diff -u -r1.23 channel.cpp=0A=
--- libs/libmythtv/channel.cpp	9 Dec 2002 03:13:34 -0000	1.23=0A=
+++ libs/libmythtv/channel.cpp	13 Dec 2002 19:03:16 -0000=0A=
@@ -299,3 +299,109 @@=0A=
         perror("VIDIOCSCHAN: ");=0A=
     }=0A=
 }=0A=
+=0A=
+int Channel::ChangeColour(bool up)=0A=
+{=0A=
+    int newcolour;    // The int should have ample space to avoid =
overflow=0A=
+                        // in the case that we're just over or under =
65535=0A=
+=0A=
+    if (ioctl(videofd, VIDIOCGPICT, &vid_pic) < 0)=0A=
+    {=0A=
+        perror("VIDIOCGPICT: ");=0A=
+        return -1;=0A=
+    }=0A=
+    cerr << "setting colour from " << vid_pic.colour;=0A=
+=0A=
+    if (up)=0A=
+    {=0A=
+        newcolour =3D vid_pic.colour + 655;=0A=
+        newcolour =3D (newcolour > 65535)?(65535):(newcolour);=0A=
+    }=0A=
+    else=0A=
+    {=0A=
+        newcolour =3D vid_pic.colour - 655;=0A=
+        newcolour =3D (newcolour < 0)?(0):(newcolour);=0A=
+    }=0A=
+=0A=
+    vid_pic.colour =3D newcolour;=0A=
+=0A=
+    cerr << "to " << vid_pic.colour << "\n";=0A=
+=0A=
+    if (ioctl(videofd, VIDIOCSPICT, &vid_pic) < 0)=0A=
+    {=0A=
+        perror("VIDIOCSPICT: ");=0A=
+        return -1;=0A=
+    }=0A=
+=0A=
+    return vid_pic.colour;=0A=
+}=0A=
+int Channel::ChangeBrightness(bool up)=0A=
+{=0A=
+    int newbrightness;    // The int should have ample space to avoid =
overflow=0A=
+                        // in the case that we're just over or under =
65535=0A=
+=0A=
+    if (ioctl(videofd, VIDIOCGPICT, &vid_pic) < 0)=0A=
+    {=0A=
+        perror("VIDIOCGPICT: ");=0A=
+        return -1;=0A=
+    }=0A=
+    cerr << "setting brightness from " << vid_pic.brightness;=0A=
+=0A=
+    if (up)=0A=
+    {=0A=
+        newbrightness =3D vid_pic.brightness + 655;=0A=
+        newbrightness =3D (newbrightness > =
65535)?(65535):(newbrightness);=0A=
+    }=0A=
+    else=0A=
+    {=0A=
+        newbrightness =3D vid_pic.brightness - 655;=0A=
+        newbrightness =3D (newbrightness < 0)?(0):(newbrightness);=0A=
+    }=0A=
+=0A=
+    vid_pic.brightness =3D newbrightness;=0A=
+=0A=
+    cerr << "to " << vid_pic.brightness << "\n";=0A=
+=0A=
+    if (ioctl(videofd, VIDIOCSPICT, &vid_pic) < 0)=0A=
+    {=0A=
+        perror("VIDIOCSPICT: ");=0A=
+        return -1;=0A=
+    }=0A=
+=0A=
+    return vid_pic.brightness;=0A=
+}=0A=
+int Channel::ChangeContrast(bool up)=0A=
+{=0A=
+    int newcontrast;    // The int should have ample space to avoid =
overflow=0A=
+                        // in the case that we're just over or under =
65535=0A=
+=0A=
+    if (ioctl(videofd, VIDIOCGPICT, &vid_pic) < 0)=0A=
+    {=0A=
+        perror("VIDIOCGPICT: ");=0A=
+        return -1;=0A=
+    }=0A=
+    cerr << "setting contrast from " << vid_pic.contrast;=0A=
+=0A=
+    if (up)=0A=
+    {=0A=
+        newcontrast =3D vid_pic.contrast + 655;=0A=
+        newcontrast =3D (newcontrast > 65535)?(65535):(newcontrast);=0A=
+    }=0A=
+    else=0A=
+    {=0A=
+        newcontrast =3D vid_pic.contrast - 655;=0A=
+        newcontrast =3D (newcontrast < 0)?(0):(newcontrast);=0A=
+    }=0A=
+=0A=
+    vid_pic.contrast =3D newcontrast;=0A=
+=0A=
+    cerr << "to " << vid_pic.contrast << "\n";=0A=
+=0A=
+    if (ioctl(videofd, VIDIOCSPICT, &vid_pic) < 0)=0A=
+    {=0A=
+        perror("VIDIOCSPICT: ");=0A=
+        return -1;=0A=
+    }=0A=
+=0A=
+    return vid_pic.contrast;=0A=
+}=0A=
Index: libs/libmythtv/channel.h=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/libs/libmythtv/channel.h,v=0A=
retrieving revision 1.13=0A=
diff -u -r1.13 channel.h=0A=
--- libs/libmythtv/channel.h	9 Dec 2002 03:13:34 -0000	1.13=0A=
+++ libs/libmythtv/channel.h	13 Dec 2002 19:03:17 -0000=0A=
@@ -26,6 +26,10 @@=0A=
     bool SetChannelByString(const QString &chan); =0A=
     bool ChannelUp(void);=0A=
     bool ChannelDown(void);=0A=
+=0A=
+    int ChangeColour(bool up);=0A=
+    int ChangeBrightness(bool up);=0A=
+    int ChangeContrast(bool up);=0A=
  =0A=
     void ToggleInputs(void); =0A=
     void SwitchToInput(const QString &input);=0A=
@@ -44,6 +48,7 @@=0A=
     QString device;=0A=
     bool isopen;  =0A=
     int videofd;=0A=
+    video_picture vid_pic;=0A=
     QString curchannelname;=0A=
 =0A=
     struct CHANLIST *curList;  =0A=
Index: libs/libmythtv/settings.txt=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/libs/libmythtv/settings.txt,v=0A=
retrieving revision 1.43=0A=
diff -u -r1.43 settings.txt=0A=
--- libs/libmythtv/settings.txt	12 Dec 2002 08:44:15 -0000	1.43=0A=
+++ libs/libmythtv/settings.txt	13 Dec 2002 19:03:17 -0000=0A=
@@ -124,6 +124,10 @@=0A=
 int xScanDisplacement=3D0=0A=
 int yScanDisplacement=3D0=0A=
 =0A=
+int TVContrast=3D100=0A=
+int TVBrightness=3D100=0A=
+int TVColour=3D100=0A=
+=0A=
 # Picture-in-picture options=0A=
 int PIPBufferSize=3D1=0A=
 int PIPMaxBufferFill=3D50=0A=
Index: libs/libmythtv/tv_play.cpp=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/libs/libmythtv/tv_play.cpp,v=0A=
retrieving revision 1.2=0A=
diff -u -r1.2 tv_play.cpp=0A=
--- libs/libmythtv/tv_play.cpp	12 Dec 2002 08:44:15 -0000	1.2=0A=
+++ libs/libmythtv/tv_play.cpp	13 Dec 2002 19:03:19 -0000=0A=
@@ -797,6 +797,14 @@=0A=
             //case 'B': case 'b': ToggleActiveWindow(); break;=0A=
             //case 'N': case 'n': SwapPIP(); break;=0A=
 =0A=
+            // Contrast, brightness, colour of the input source=0A=
+            case 'j': ChangeContrast(false); break;=0A=
+            case 'J': ChangeContrast(true); break;=0A=
+            case 'k': ChangeBrightness(false); break;=0A=
+            case 'K': ChangeBrightness(true); break;=0A=
+            case 'l': ChangeColour(false); break;=0A=
+            case 'L': ChangeColour(true); break;=0A=
+=0A=
             default: break;=0A=
         }=0A=
     }=0A=
@@ -1274,4 +1282,48 @@=0A=
     pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);=0A=
 =0A=
     pthread_create(&tid, &attr, TV::MenuHandler, this);=0A=
+}=0A=
+=0A=
+void TV::ChangeBrightness(bool up)=0A=
+{=0A=
+    QString text;=0A=
+=0A=
+    if (up)=0A=
+        text =3D "Brightness +";=0A=
+    else=0A=
+        text =3D "Brightness -";=0A=
+=0A=
+    m_context->RecorderChangeBrightness(activerecorder_num, up);=0A=
+=0A=
+    if (activenvp =3D=3D nvp)=0A=
+        osd->SetSettingsText(text, text.length() );=0A=
+}=0A=
+void TV::ChangeContrast(bool up)=0A=
+{=0A=
+    QString text;=0A=
+=0A=
+    if (up)=0A=
+        text =3D "Contrast +";=0A=
+    else=0A=
+        text =3D "Contrast -";=0A=
+=0A=
+    m_context->RecorderChangeContrast(activerecorder_num, up);=0A=
+=0A=
+    if (activenvp =3D=3D nvp)=0A=
+        osd->SetSettingsText(text, text.length() );=0A=
+}=0A=
+=0A=
+void TV::ChangeColour(bool up)=0A=
+{=0A=
+    QString text;=0A=
+=0A=
+    if (up)=0A=
+        text =3D "Colour +";=0A=
+    else=0A=
+        text =3D "Colour -";=0A=
+=0A=
+    m_context->RecorderChangeColour(activerecorder_num, up);=0A=
+=0A=
+    if (activenvp =3D=3D nvp)=0A=
+        osd->SetSettingsText(text, text.length() );=0A=
 }=0A=
Index: libs/libmythtv/tv_play.h=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/libs/libmythtv/tv_play.h,v=0A=
retrieving revision 1.1=0A=
diff -u -r1.1 tv_play.h=0A=
--- libs/libmythtv/tv_play.h	9 Dec 2002 03:13:34 -0000	1.1=0A=
+++ libs/libmythtv/tv_play.h	13 Dec 2002 19:03:19 -0000=0A=
@@ -52,6 +52,10 @@=0A=
 =0A=
     void ChangeChannel(bool up);=0A=
     void ChangeChannelByString(QString &name);=0A=
+=0A=
+    void ChangeContrast(bool up);=0A=
+    void ChangeBrightness(bool up);=0A=
+    void ChangeColour(bool up);=0A=
     =0A=
     void ChannelKey(int key);=0A=
     void ChannelCommit(void);=0A=
Index: libs/libmythtv/tv_rec.cpp=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/libs/libmythtv/tv_rec.cpp,v=0A=
retrieving revision 1.7=0A=
diff -u -r1.7 tv_rec.cpp=0A=
--- libs/libmythtv/tv_rec.cpp	12 Dec 2002 08:44:15 -0000	1.7=0A=
+++ libs/libmythtv/tv_rec.cpp	13 Dec 2002 19:03:21 -0000=0A=
@@ -55,6 +55,7 @@=0A=
         channel->SwitchToInput(inputname);=0A=
     channel->SetChannelByString(startchannel);=0A=
     channel->SetChannelOrdering(chanorder);=0A=
+=0A=
     channel->Close();=0A=
 }=0A=
 =0A=
@@ -967,6 +968,21 @@=0A=
     nvr->Unpause();=0A=
 =0A=
     UnpauseRingBuffer();=0A=
+}=0A=
+=0A=
+void TVRec::ChangeContrast(bool direction)=0A=
+{=0A=
+    channel->ChangeContrast(direction);=0A=
+}=0A=
+=0A=
+void TVRec::ChangeBrightness(bool direction)=0A=
+{=0A=
+    channel->ChangeBrightness(direction);=0A=
+}=0A=
+=0A=
+void TVRec::ChangeColour(bool direction)=0A=
+{=0A=
+    channel->ChangeColour(direction);=0A=
 }=0A=
 =0A=
 void TVRec::SetChannel(QString name)=0A=
Index: libs/libmythtv/tv_rec.h=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/libs/libmythtv/tv_rec.h,v=0A=
retrieving revision 1.2=0A=
diff -u -r1.2 tv_rec.h=0A=
--- libs/libmythtv/tv_rec.h	10 Dec 2002 19:37:57 -0000	1.2=0A=
+++ libs/libmythtv/tv_rec.h	13 Dec 2002 19:03:21 -0000=0A=
@@ -61,6 +61,9 @@=0A=
     void PauseRecorder(void);=0A=
     void ToggleInputs(void);=0A=
     void ChangeChannel(bool direction);=0A=
+    void ChangeColour(bool direction);=0A=
+    void ChangeContrast(bool direction);=0A=
+    void ChangeBrightness(bool direction);=0A=
     void SetChannel(QString name);=0A=
     bool CheckChannel(QString name);=0A=
     void GetChannelInfo(QString &title, QString &subtitle, QString =
&desc,=0A=
Index: programs/mythbackend/encoderlink.cpp=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/programs/mythbackend/encoderlink.cpp,v=0A=
retrieving revision 1.2=0A=
diff -u -r1.2 encoderlink.cpp=0A=
--- programs/mythbackend/encoderlink.cpp	10 Dec 2002 19:37:57 -0000	1.2=0A=
+++ programs/mythbackend/encoderlink.cpp	13 Dec 2002 19:03:21 -0000=0A=
@@ -155,6 +155,24 @@=0A=
         tv->ChangeChannel(direction);=0A=
 }=0A=
 =0A=
+void EncoderLink::ChangeContrast(bool direction)=0A=
+{=0A=
+    if (local)=0A=
+        tv->ChangeContrast(direction);=0A=
+}=0A=
+=0A=
+void EncoderLink::ChangeBrightness(bool direction)=0A=
+{=0A=
+    if (local)=0A=
+        tv->ChangeBrightness(direction);=0A=
+}=0A=
+=0A=
+void EncoderLink::ChangeColour(bool direction)=0A=
+{=0A=
+    if (local)=0A=
+        tv->ChangeColour(direction);=0A=
+}=0A=
+=0A=
 void EncoderLink::SetChannel(QString name)=0A=
 {=0A=
     if (local)=0A=
Index: programs/mythbackend/encoderlink.h=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/programs/mythbackend/encoderlink.h,v=0A=
retrieving revision 1.2=0A=
diff -u -r1.2 encoderlink.h=0A=
--- programs/mythbackend/encoderlink.h	10 Dec 2002 19:37:57 -0000	1.2=0A=
+++ programs/mythbackend/encoderlink.h	13 Dec 2002 19:03:22 -0000=0A=
@@ -39,6 +39,9 @@=0A=
     void PauseRecorder(void);=0A=
     void ToggleInputs(void);=0A=
     void ChangeChannel(bool direction);=0A=
+    void ChangeContrast(bool direction);=0A=
+    void ChangeBrightness(bool direction);=0A=
+    void ChangeColour(bool direction);=0A=
     void SetChannel(QString name);=0A=
     bool CheckChannel(QString name);=0A=
     void GetChannelInfo(QString &title, QString &subtitle, QString =
&desc,=0A=
Index: programs/mythbackend/mainserver.cpp=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/programs/mythbackend/mainserver.cpp,v=0A=
retrieving revision 1.5=0A=
diff -u -r1.5 mainserver.cpp=0A=
--- programs/mythbackend/mainserver.cpp	12 Dec 2002 08:44:15 -0000	1.5=0A=
+++ programs/mythbackend/mainserver.cpp	13 Dec 2002 19:03:23 -0000=0A=
@@ -512,6 +512,24 @@=0A=
         enc->ChangeChannel(up);=0A=
         retlist << "ok";=0A=
     }=0A=
+    else if (command =3D=3D "CHANGE_COLOUR")=0A=
+    {=0A=
+        bool up =3D slist[2].toInt(); =0A=
+        enc->ChangeColour(up);=0A=
+        retlist << "ok";=0A=
+    }=0A=
+    else if (command =3D=3D "CHANGE_CONTRAST")=0A=
+    {=0A=
+        bool up =3D slist[2].toInt(); =0A=
+        enc->ChangeContrast(up);=0A=
+        retlist << "ok";=0A=
+    }=0A=
+    else if (command =3D=3D "CHANGE_BRIGHTNESS")=0A=
+    {=0A=
+        bool up =3D slist[2].toInt(); =0A=
+        enc->ChangeBrightness(up);=0A=
+        retlist << "ok";=0A=
+    }=0A=
     else if (command =3D=3D "SET_CHANNEL")=0A=
     {=0A=
         QString name =3D slist[2];=0A=
Index: themes/defaultosd/osd.txt=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/MC/themes/defaultosd/osd.txt,v=0A=
retrieving revision 1.1=0A=
diff -u -r1.1 osd.txt=0A=
--- themes/defaultosd/osd.txt	6 Nov 2002 05:04:34 -0000	1.1=0A=
+++ themes/defaultosd/osd.txt	13 Dec 2002 19:03:23 -0000=0A=
@@ -3,6 +3,11 @@=0A=
 # Size of the channel number font=0A=
 int ChannelNumberFontSize=3D50=0A=
 =0A=
+# Location to draw the settings text into=0A=
+str SettingsRect=3D168,24,350,32=0A=
+# Size of the settings font=0A=
+int SettingsFontSize=3D24=0A=
+=0A=
 # Background image for the box that shows up on channel change, should =
be=0A=
 # sized to fit 640x480=0A=
 str InfoBackground=3Dosd-big.png=0A=

------=_NextPart_000_0052_01C2A2B1.EACD2820--