OSDN Git Service

LinGui: add more informative warning about x264 RF 0 usage
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 2 Jan 2011 18:21:45 +0000 (18:21 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 2 Jan 2011 18:21:45 +0000 (18:21 +0000)
When the user sets RF 0, the slider displays "RF: 0 (Warning: lossless)"
and the user will get a dialog when adding to the queue that says
Warning: lossless h.264 selected
Lossless h.264 is not well supported by
many players and editors.
It will produce enormous output files.
Are you sure you wish to use this setting?

git-svn-id: svn://localhost/HandBrake/trunk@3723 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/callbacks.c
gtk/src/hb-backend.c

index 91f4f1f..7632a61 100644 (file)
@@ -4612,7 +4612,14 @@ format_vquality_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud)
        {
                case HB_VCODEC_X264:
                {
-                       return g_strdup_printf("RF: %.4g", val);
+                       if (val == 0.0)
+                       {
+                               return g_strdup_printf("RF: %.4g (Warning: lossless)", val);
+                       }
+                       else
+                       {
+                               return g_strdup_printf("RF: %.4g", val);
+                       }
                } break;
 
                case HB_VCODEC_FFMPEG:
index 04d262e..c1f6e86 100644 (file)
@@ -4339,11 +4339,28 @@ ghb_validate_vquality(GValue *settings)
                                max = 62;
                        } break;
                }
-               if (vquality < min || vquality > max)
+               if (vcodec == HB_VCODEC_X264 && vquality == 0.0)
                {
                        message = g_strdup_printf(
-                                               "Interesting video quality choise: %d\n\n"
-                                               "Typical values range from %d to %d.\n"
+                                               "Warning: lossless h.264 selected\n\n"
+                                               "Lossless h.264 is not well supported by\n"
+                                               "many players and editors.\n\n"
+                        "It will produce enormous output files.\n\n"
+                                               "Are you sure you wish to use this setting?",
+                                               (gint)vquality, min, max);
+                       if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, 
+                                                                       "Cancel", "Continue"))
+                       {
+                               g_free(message);
+                               return FALSE;
+                       }
+                       g_free(message);
+               }
+               else if (vquality < min || vquality > max)
+               {
+                       message = g_strdup_printf(
+                                               "Interesting video quality choice: %d\n\n"
+                                               "Typical values range from %d to %d.\n\n"
                                                "Are you sure you wish to use this setting?",
                                                (gint)vquality, min, max);
                        if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message,