diff options
author | jstebbins <[email protected]> | 2011-01-02 18:21:45 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-01-02 18:21:45 +0000 |
commit | 479d97982ebe32223edb9064662dd27e4641fe08 (patch) | |
tree | 7314983aa1f029eff1a405695d6163d3a0fb8d34 | |
parent | c2e18153dd42dfaf6ffe877b39c0d5d44d681318 (diff) |
LinGui: add more informative warning about x264 RF 0 usage
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://svn.handbrake.fr/HandBrake/trunk@3723 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | gtk/src/callbacks.c | 9 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 23 |
2 files changed, 28 insertions, 4 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 91f4f1f49..7632a61db 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -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: diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 04d262eaa..c1f6e86f8 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -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, |