[mythtv] Picture controls: V4L vs. Xv

Ben Levitt levittben at yahoo.com
Sat Dec 20 01:20:43 EST 2003


I noticed a couple of bugs in the new picture
adjustment code for setting the per-channel recording
values.

1. The reordering of the settings (moving volume to
the end of the list) was only done in 1 of 2 places it
needed doing.  Confusion ensued.

2. If you adjusted a recording setting, and then
immediately adjusted a playback setting (or vice
versa), the adjustments to the 2nd one ended up
adjusting both at once without you knowing it.

3. Inconsistent labelling.  

On #3: Now, while you adjust playback settings, the
osd label is "Adjust Picture".  While you adjust
recording settings, it's "Adjust Recording".  What do
you think of "Adjust Channel" to make it a little more
clear that it's a per-channel setting?  

Ben


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
-------------- next part --------------
Index: libs/libmythtv/osd.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/osd.h,v
retrieving revision 1.52
diff -u -r1.52 osd.h
--- libs/libmythtv/osd.h	8 Nov 2003 21:04:29 -0000	1.52
+++ libs/libmythtv/osd.h	20 Dec 2003 06:05:31 -0000
@@ -19,6 +19,7 @@
 {
     kOSDFunctionalType_Default = 0,
     kOSDFunctionalType_PictureAdjust,
+    kOSDFunctionalType_RecPictureAdjust,
     kOSDFunctionalType_SmartForward
 };
 
Index: libs/libmythtv/tv_play.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/tv_play.cpp,v
retrieving revision 1.132
diff -u -r1.132 tv_play.cpp
--- libs/libmythtv/tv_play.cpp	14 Dec 2003 04:05:22 -0000	1.132
+++ libs/libmythtv/tv_play.cpp	20 Dec 2003 06:05:32 -0000
@@ -2313,16 +2313,18 @@
         {
             brightness = activerecorder->ChangeBrightness(up);
             text = QString(tr("Brightness (REC) %1 %")).arg(brightness);
+            osd->StartPause(brightness * 10, true, tr("Adjust Recording"),
+                text, 5, kOSDFunctionalType_RecPictureAdjust);
         }
         else
         {
             brightness = nvp->getVideoOutput()->ChangeBrightness(up);
             gContext->SaveSetting("PlaybackBrightness", brightness);
             text = QString(tr("Brightness %1 %")).arg(brightness);
+            osd->StartPause(brightness * 10, true, tr("Adjust Picture"),
+                text, 5, kOSDFunctionalType_PictureAdjust);
         }
 
-        osd->StartPause(brightness * 10, true, tr("Adjust Picture"), text, 5, 
-                        kOSDFunctionalType_PictureAdjust);
         update_osd_pos = false;
     }
 }
@@ -2338,16 +2340,18 @@
         {
             contrast = activerecorder->ChangeContrast(up);
             text = QString(tr("Contrast (REC) %1 %")).arg(contrast);
+            osd->StartPause(contrast * 10, true, tr("Adjust Recording"),
+                text, 5, kOSDFunctionalType_RecPictureAdjust);
         }
         else
         {
             contrast = nvp->getVideoOutput()->ChangeContrast(up);
             gContext->SaveSetting("PlaybackContrast", contrast);
             text = QString(tr("Contrast %1 %")).arg(contrast);
+            osd->StartPause(contrast * 10, true, tr("Adjust Picture"),
+                text, 5, kOSDFunctionalType_PictureAdjust);
         }
 
-        osd->StartPause(contrast * 10, true, tr("Adjust Picture"), text, 5, 
-                        kOSDFunctionalType_PictureAdjust);
         update_osd_pos = false;
     }
 }
@@ -2363,16 +2367,18 @@
         {
             colour = activerecorder->ChangeColour(up);
             text = QString(tr("Colour (REC) %1 %")).arg(colour);
+            osd->StartPause(colour * 10, true, tr("Adjust Recording"),
+                text, 5, kOSDFunctionalType_RecPictureAdjust);
         }
         else
         {
             colour = nvp->getVideoOutput()->ChangeColour(up);
             gContext->SaveSetting("PlaybackColour", colour);
             text = QString(tr("Colour %1 %")).arg(colour);
+            osd->StartPause(colour * 10, true, tr("Adjust Picture"),
+                text, 5, kOSDFunctionalType_PictureAdjust);
         }
 
-        osd->StartPause(colour * 10, true, tr("Adjust Picture"), text, 5, 
-                        kOSDFunctionalType_PictureAdjust);
         update_osd_pos = false;
     }
 }
@@ -2388,16 +2394,18 @@
         {
             hue = activerecorder->ChangeHue(up);
             text = QString(tr("Hue (REC) %1 %")).arg(hue);
+            osd->StartPause(hue * 10, true, tr("Adjust Recording"),
+                text, 5, kOSDFunctionalType_RecPictureAdjust);
         }
         else
         {
             hue = nvp->getVideoOutput()->ChangeHue(up);
             gContext->SaveSetting("PlaybackHue", hue);
             text = QString(tr("Hue %1 %")).arg(hue);
+            osd->StartPause(hue * 10, true, tr("Adjust Picture"),
+                text, 5, kOSDFunctionalType_PictureAdjust);
         }
 
-        osd->StartPause(hue * 10, true, tr("Adjust Picture"), text, 5, 
-                        kOSDFunctionalType_PictureAdjust);
         update_osd_pos = false;
     }
 }
@@ -2670,9 +2678,11 @@
 {
     switch (osdType)
     {
+        case kOSDFunctionalType_RecPictureAdjust:
+            recAdjustment = 0;
+            break;
         case kOSDFunctionalType_PictureAdjust:
             picAdjustment = 0;
-            recAdjustment = 0;
             break;
         case kOSDFunctionalType_SmartForward:
             doSmartForward = false;
@@ -2736,7 +2746,7 @@
    
     if (osd)
     {
-        QString title("Adjust Picture (REC)");
+        QString title("Adjust Recording");
         QString recName;
       
         switch (recAdjustment)
@@ -2744,30 +2754,26 @@
             case 1:
                 activerecorder->ChangeBrightness(true);
                 value = activerecorder->ChangeBrightness(false);
-                title = "Adjust Brightness (REC)";
-                recName = QString(tr("Brightness %1 %")).arg(value);
+                recName = QString(tr("Brightness (REC) %1 %")).arg(value);
                 break;
             case 2:
                 activerecorder->ChangeContrast(true);
                 value = activerecorder->ChangeContrast(false);
-                title = "Adjust Contrast (REC)";
-                recName = QString(tr("Contrast %1 %")).arg(value);
+                recName = QString(tr("Contrast (REC) %1 %")).arg(value);
                 break;
             case 3:
                 activerecorder->ChangeColour(true);
                 value = activerecorder->ChangeColour(false);
-                title = "Adjust Color (REC)";
-                recName = QString(tr("Color %1 %")).arg(value);
+                recName = QString(tr("Colour (REC) %1 %")).arg(value);
                 break;
             case 4:
                 activerecorder->ChangeHue(true);
                 value = activerecorder->ChangeHue(false);
-                title = "Adjust Hue (REC)";
-                recName = QString(tr("Hue %1 %")).arg(value);
+                recName = QString(tr("Hue (REC) %1 %")).arg(value);
                 break;
         }
         osd->StartPause(value * 10, true, tr(title), recName, 5,
-                        kOSDFunctionalType_PictureAdjust);
+                        kOSDFunctionalType_RecPictureAdjust);
         update_osd_pos = false;
     }
 }
@@ -2777,19 +2783,19 @@
     switch (control)
     {
         case 1:
-            ChangeVolume(up);
+            ChangeBrightness(up, rec);
             break;
         case 2:
-            ChangeBrightness(up, rec);
+            ChangeContrast(up, rec);
             break;
         case 3:
-            ChangeContrast(up, rec);
+            ChangeColour(up, rec);
             break;
         case 4:
-            ChangeColour(up, rec);
+            ChangeHue(up, rec);
             break;
         case 5:
-            ChangeHue(up, rec);
+            ChangeVolume(up);
             break;
     }
 }


More information about the mythtv-dev mailing list