ghb_live_reset(ud);
}
+void
+vquality_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ ghb_widget_to_setting(ud->settings, widget);
+ ghb_check_dependency(ud, widget);
+ ghb_clear_presets_selection(ud);
+ ghb_live_reset(ud);
+
+ gint vcodec = ghb_settings_combo_int(ud->settings, "VideoEncoder");
+ gdouble step;
+ if (vcodec == HB_VCODEC_X264)
+ {
+ step = ghb_settings_combo_double(ud->settings,
+ "VideoQualityGranularity");
+ }
+ else
+ {
+ step = 1;
+ }
+ gdouble val = gtk_range_get_value(GTK_RANGE(widget));
+ val = ((int)((val + step / 2) / step)) * step;
+ gtk_range_set_value(GTK_RANGE(widget), val);
+}
+
void
http_opt_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
gdouble vqmin, vqmax, step, page;
gboolean inverted;
gint digits;
- gint vcodec;
ghb_widget_to_setting(ud->settings, widget);
ghb_check_dependency(ud, widget);
gtk_range_set_increments (GTK_RANGE(qp), step, page);
gtk_scale_set_digits(GTK_SCALE(qp), digits);
gtk_range_set_inverted (GTK_RANGE(qp), inverted);
- vcodec = ghb_settings_combo_int(ud->settings, "VideoEncoder");
}
void
target_size_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
const gchar *name = gtk_widget_get_name(widget);
- g_debug("setting_widget_changed_cb () %s", name);
+ g_debug("target_size_changed_cb () %s", name);
ghb_widget_to_setting(ud->settings, widget);
ghb_check_dependency(ud, widget);
ghb_clear_presets_selection(ud);
ghb_pref_save(ud->settings, name);
}
+void
+vqual_granularity_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ g_debug("vqual_granularity_changed_cb");
+ ghb_widget_to_setting (ud->settings, widget);
+ ghb_check_dependency(ud, widget);
+
+ const gchar *name = gtk_widget_get_name(widget);
+ ghb_pref_save(ud->settings, name);
+
+ gdouble vqmin, vqmax, step, page;
+ gboolean inverted;
+ gint digits;
+
+ ghb_vquality_range(ud, &vqmin, &vqmax, &step, &page, &digits, &inverted);
+ GtkWidget *qp = GHB_WIDGET(ud->builder, "VideoQualitySlider");
+ gtk_range_set_increments (GTK_RANGE(qp), step, page);
+}
+
void
tweaks_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
crf = ghb_settings_get_boolean(ud->settings, "constant_rate_factor");
percent = 100. * (51 - val) / 51.;
if (crf)
- return g_strdup_printf("RF: %.1f / %.1f%%", val, percent);
+ return g_strdup_printf("RF: %.4g (%.0f%%)", val, percent);
else
- return g_strdup_printf("QP: %.1f / %.1f%%", val, percent);
+ return g_strdup_printf("QP: %.4g (%.0f%%)", val, percent);
} break;
case HB_VCODEC_XVID:
case HB_VCODEC_FFMPEG:
{
percent = 100. * (30 - (val - 1)) / 30.;
- return g_strdup_printf("QP: %d / %.1f%%", (int)val, percent);
+ return g_strdup_printf("QP: %d (%.0f%%)", (int)val, percent);
} break;
case HB_VCODEC_THEORA:
{
percent = 100. * val / 63.;
- return g_strdup_printf("QP: %d / %.1f%%", (int)val, percent);
+ return g_strdup_printf("QP: %d (%.0f%%)", (int)val, percent);
} break;
default:
<property name="value">0</property>
</object>
<object class="GtkAdjustment" id="adjustment5">
- <property name="upper">1</property>
+ <property name="upper">51</property>
<property name="lower">0</property>
- <property name="page_increment">1</property>
- <property name="step_increment">0.1</property>
+ <property name="page_increment">5</property>
+ <property name="step_increment">0.25</property>
<property name="page_size">0</property>
- <property name="value">0.63</property>
+ <property name="value">20.25</property>
</object>
<object class="GtkAdjustment" id="adjustment6">
<property name="upper">4</property>
</child>
<child>
<object class="GtkHScale" id="VideoQualitySlider">
- <property name="width_request">200</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="adjustment">adjustment5</property>
<property name="digits">3</property>
- <property name="value_pos">GTK_POS_RIGHT</property>
- <signal handler="setting_widget_changed_cb" name="value_changed"/>
+ <property name="value_pos">GTK_POS_BOTTOM</property>
+ <signal handler="vquality_changed_cb" name="value_changed"/>
<signal handler="format_vquality_cb" name="format-value"/>
</object>
<packing>
<property name="position">3</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="EncodeLogLocation">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_text"> HandBrake produces 2 activity logs.
-One for the session and one for each encoding.
-Store the individual encode logs in the same
-location as the movie.</property>
- <property name="label" translatable="yes">Store logs in destination video directory</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="pref_changed_cb"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">4</property>
- </packing>
- </child>
-
<child>
<object class="GtkAlignment" id="alignment50">
<property name="visible">True</property>
</object>
</child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkAlignment" id="alignment59">
+ <property name="visible">True</property>
+ <property name="left_padding">4</property>
+ <child>
+ <object class="GtkHBox" id="hbox6">
+ <property name="visible">True</property>
+ <property name="spacing">4</property>
+ <child>
+ <object class="GtkComboBox" id="VideoQualityGranularity">
+ <property name="visible">True</property>
+ <property name="width_request">55</property>
+ <signal name="changed" handler="vqual_granularity_changed_cb"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label85">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Video Qaulity Granularity</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
<packing>
<property name="expand">False</property>
<property name="position">5</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="EncodeLogLocation">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text"> HandBrake produces 2 activity logs.
+One for the session and one for each encoding.
+Store the individual encode logs in the same
+location as the movie.</property>
+ <property name="label" translatable="yes">Store logs in destination video directory</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="pref_changed_cb"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
<child>
<object class="GtkAlignment" id="alignment51">
</object>
<packing>
<property name="expand">False</property>
- <property name="position">6</property>
+ <property name="position">7</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">7</property>
+ <property name="position">8</property>
</packing>
</child>
<child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">8</property>
+ <property name="position">9</property>
</packing>
</child>
</object>
{
const gchar *option;
const gchar *shortOpt;
- gint ivalue;
+ gdouble ivalue;
const gchar *svalue;
} options_map_t;
d_logging_opts
};
+static options_map_t d_vqual_granularity_opts[] =
+{
+ {"0.2", "0.2", 0.2, "0.2"},
+ {"0.25", "0.25", 0.25, "0.25"},
+ {"0.5", "0.5", 0.5, "0.5"},
+ {"1", "1", 1, "1"},
+};
+combo_opts_t vqual_granularity_opts =
+{
+ sizeof(d_vqual_granularity_opts)/sizeof(options_map_t),
+ d_vqual_granularity_opts
+};
+
static options_map_t d_container_opts[] =
{
{"MKV", "mkv", HB_MUX_MKV, "mkv"},
combo_name_map_t combo_name_map[] =
{
{"LoggingLevel", &logging_opts},
+ {"VideoQualityGranularity", &vqual_granularity_opts},
{"FileFormat", &container_opts},
{"PictureDeinterlace", &deint_opts},
{"PictureDecomb", &decomb_opts},
gboolean *inverted)
{
gint vcodec = ghb_settings_combo_int(ud->settings, "VideoEncoder");
- *step = 1;
*page = 10;
*digits = 0;
switch (vcodec)
{
*min = 0;
*max = 51;
- *step = 0.1;
- *digits = 3;
+ *step = ghb_settings_combo_double(ud->settings,
+ "VideoQualityGranularity");
+ if (*step == 0.2 || *step == 0.5)
+ *digits = 1;
+ else if (*step == 0.25)
+ *digits = 2;
*inverted = TRUE;
} break;
{
*min = 1;
*max = 31;
+ *step = 1;
*inverted = TRUE;
} break;
{
*min = 0;
*max = 63;
+ *step = 1;
*inverted = FALSE;
} break;
{
*min = 0;
*max = 100;
- *digits = 3;
+ *step = 1;
*inverted = FALSE;
} break;
}
return result;
}
+static gdouble
+lookup_generic_double(combo_opts_t *opts, const GValue *gval)
+{
+ gint ii;
+ gchar *str;
+ gdouble result = -1;
+
+ str = ghb_value_string(gval);
+ for (ii = 0; ii < opts->count; ii++)
+ {
+ if (strcmp(opts->map[ii].shortOpt, str) == 0)
+ {
+ result = opts->map[ii].ivalue;
+ break;
+ }
+ }
+ g_free(str);
+ return result;
+}
+
static const gchar*
lookup_generic_option(combo_opts_t *opts, const GValue *gval)
{
for (ii = 0; ii < acodec_opts.count; ii++)
{
- if (acodec_opts.map[ii].ivalue == val)
+ if ((int)acodec_opts.map[ii].ivalue == val)
{
value = ghb_string_value_new(acodec_opts.map[ii].shortOpt);
break;
// 4 - Int value determined by backend
// 5 - String value determined by backend
store = gtk_list_store_new(5, G_TYPE_STRING, G_TYPE_BOOLEAN,
- G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING);
+ G_TYPE_STRING, G_TYPE_DOUBLE, G_TYPE_STRING);
gtk_combo_box_set_model(combo, GTK_TREE_MODEL(store));
if (GTK_WIDGET_TYPE(combo) == GTK_TYPE_COMBO_BOX)
0, "Same as source",
1, TRUE,
2, "source",
- 3, 0,
+ 3, 0.0,
4, "source",
-1);
for (ii = 0; ii < count; ii++)
0, rates[ii].string,
1, TRUE,
2, rates[ii].string,
- 3, rates[ii].rate,
+ 3, (gdouble)rates[ii].rate,
4, rates[ii].string,
-1);
}
0, "Same as source",
1, TRUE,
2, "source",
- 3, 0,
+ 3, 0.0,
4, "source",
-1);
for (ii = 0; ii < count; ii++)
0, option,
1, TRUE,
2, rates[ii].string,
- 3, rates[ii].rate,
+ 3, (gdouble)rates[ii].rate,
4, rates[ii].string,
-1);
g_free(option);
0, "None",
1, TRUE,
2, "none",
- 3, 0,
+ 3, 0.0,
4, "none",
-1);
for (ii = 0; ii < hb_audio_mixdowns_count; ii++)
0, hb_audio_mixdowns[ii].human_readable_name,
1, TRUE,
2, hb_audio_mixdowns[ii].short_name,
- 3, hb_audio_mixdowns[ii].amixdown,
+ 3, (gdouble)hb_audio_mixdowns[ii].amixdown,
4, hb_audio_mixdowns[ii].internal_name,
-1);
}
0, ghb_language_table[ii].eng_name,
1, TRUE,
2, ghb_language_table[ii].iso639_2,
- 3, ii,
+ 3, (gdouble)ii,
4, ghb_language_table[ii].iso639_1,
-1);
}
0, "No Titles",
1, TRUE,
2, "none",
- 3, -1,
+ 3, -1.0,
4, "none",
-1);
title_opts.map[0].option = "No Titles";
0, titles[ii],
1, TRUE,
2, titles[ii],
- 3, ii,
+ 3, (gdouble)ii,
4, titles[ii],
-1);
title_opts.map[ii].option = titles[ii];
static gboolean
find_combo_item_by_int(GtkTreeModel *store, gint value, GtkTreeIter *iter)
{
- gint ivalue;
+ gdouble ivalue;
gboolean foundit = FALSE;
if (gtk_tree_model_get_iter_first (store, iter))
do
{
gtk_tree_model_get(store, iter, 3, &ivalue, -1);
- if (value == ivalue)
+ if (value == (int)ivalue)
{
foundit = TRUE;
break;
0, "No Audio",
1, TRUE,
2, "none",
- 3, -1,
+ 3, -1.0,
4, "none",
-1);
audio_track_opts.map[0].option = "No Audio";
0, audio->lang.description,
1, TRUE,
2, index_str[ii],
- 3, ii,
+ 3, (gdouble)ii,
4, index_str[ii],
-1);
audio_track_opts.map[ii].option = audio->lang.description,
0, "None",
1, TRUE,
2, "none",
- 3, -2,
+ 3, -2.0,
4, "none",
-1);
subtitle_opts.map[0].option = "None";
0, "Autoselect",
1, TRUE,
2, "auto",
- 3, -1,
+ 3, -1.0,
4, "auto",
-1);
subtitle_opts.map[0].option = "Same as audio";
0, subtitle->lang,
1, TRUE,
2, subtitle->iso639_2,
- 3, ii,
+ 3, (gdouble)ii,
4, subtitle->iso639_2,
-1);
subtitle_opts.map[ii+2].option = subtitle->lang;
0, ghb_language_table[ii].eng_name,
1, TRUE,
2, ghb_language_table[ii].iso639_2,
- 3, ii,
+ 3, (gdouble)ii,
4, ghb_language_table[ii].iso639_2,
-1);
subtitle_opts.map[ii+2].option = ghb_language_table[ii].eng_name;
return 0;
}
+gdouble
+ghb_lookup_combo_double(const gchar *name, const GValue *gval)
+{
+ if (strcmp(name, "AudioBitrate") == 0)
+ return lookup_audio_bitrate_int(gval);
+ else if (strcmp(name, "AudioSamplerate") == 0)
+ return lookup_audio_rate_int(gval);
+ else if (strcmp(name, "VideoFramerate") == 0)
+ return lookup_video_rate_int(gval);
+ else if (strcmp(name, "AudioMixdown") == 0)
+ return lookup_mix_int(gval);
+ else if (strcmp(name, "SourceAudioLang") == 0)
+ return lookup_audio_lang_int(gval);
+ else
+ {
+ return lookup_generic_double(find_combo_table(name), gval);
+ }
+ g_warning("ghb_lookup_combo_double() couldn't find %s", name);
+ return 0;
+}
+
const gchar*
ghb_lookup_combo_option(const gchar *name, const GValue *gval)
{
subtitle_opts_set(builder, "Subtitles", user_data);
title_opts_set(builder, "title");
audio_track_opts_set(builder, "AudioTrack", user_data);
+ generic_opts_set(builder, "VideoQualityGranularity", &vqual_granularity_opts);
generic_opts_set(builder, "LoggingLevel", &logging_opts);
generic_opts_set(builder, "FileFormat", &container_opts);
generic_opts_set(builder, "PictureDeinterlace", &deint_opts);
0, str,
1, TRUE,
2, str,
- 3, rate,
+ 3, (gdouble)rate,
4, str,
-1);
g_free(str);
{
GtkTreeIter iter;
GtkListStore *store;
- gint ivalue;
+ gdouble ivalue;
gboolean done = FALSE;
gint ii = 0;
guint last = (guint)last_rate;
0, hb_audio_bitrates[ii].string,
1, TRUE,
2, hb_audio_bitrates[ii].string,
- 3, hb_audio_bitrates[ii].rate,
+ 3, (gdouble)hb_audio_bitrates[ii].rate,
4, hb_audio_bitrates[ii].string,
-1);
}
}
else
{
-printf("switching to faac\n");
audio.out.codec = HB_ACODEC_FAAC;
}
}
gboolean ghb_validate_filter_string(const gchar *str, gint max_fields);
void ghb_hb_cleanup(gboolean partial);
gint ghb_lookup_combo_int(const gchar *name, const GValue *acodec);
+gdouble ghb_lookup_combo_double(const gchar *name, const GValue *acodec);
const gchar* ghb_lookup_combo_option(const gchar *name, const GValue *acodec);
gchar* ghb_get_tmp_dir();
<true />
<key>update_skip_version</key>
<integer>0</integer>
+ <key>VideoQualityGranularity</key>
+ <string>0.2</string>
<key>version</key>
<string>0.1</string>
</dict>
" </object>\n"
" <object class="GtkAdjustment" id="adjustment5""
">\n"
-" <property name="upper">1</property>\n"
+" <property name="upper">51</property>\n"
" <property name="lower">0</property>\n"
-" <property name="page_increment">1</property>\n"
-" <property name="step_increment">0.1</property>"
-";\n"
+" <property name="page_increment">5</property>\n"
+" <property name="step_increment">0.25</property&g"
+"t;\n"
" <property name="page_size">0</property>\n"
-" <property name="value">0.63</property>\n"
+" <property name="value">20.25</property>\n"
" </object>\n"
" <object class="GtkAdjustment" id="adjustment6""
">\n"
" <child>\n"
" <object class="GtkHSc"
"ale" id="VideoQualitySlider">\n"
-" <property name="wid"
-"th_request">200</property>\n"
" <property name="vis"
"ible">True</property>\n"
" <property name="can"
" <property name="dig"
"its">3</property>\n"
" <property name="val"
-"ue_pos">GTK_POS_RIGHT</property>\n"
-" <signal handler="se"
-"tting_widget_changed_cb" name="value_changed"/>\n"
+"ue_pos">GTK_POS_BOTTOM</property>\n"
+" <signal handler="vq"
+"uality_changed_cb" name="value_changed"/>\n"
" <signal handler="fo"
"rmat_vquality_cb" name="format-value"/>\n"
" </object>\n"
" </packing>\n"
" </child>\n"
" <child>\n"
-" <object class="GtkCheckButton" i"
-"d="EncodeLogLocation">\n"
-" <property name="visible">Tr"
-"ue</property>\n"
-" <property name="can_focus">"
-"True</property>\n"
-" <property name="tooltip_text"&"
-"gt; HandBrake produces 2 activity logs. \n"
-"One for the session and one for each encoding.\n"
-"Store the individual encode logs in the same\n"
-"location as the movie.</property>\n"
-" <property name="label" transla"
-"table="yes">Store logs in destination video directory</"
-"property>\n"
-" <property name="draw_indicator""
-";>True</property>\n"
-" <signal name="toggled" handler"
-"="pref_changed_cb"/>\n"
-" </object>\n"
-" <packing>\n"
-" <property name="expand">Fal"
-"se</property>\n"
-" <property name="position">4"
-"</property>\n"
-" </packing>\n"
-" </child>\n"
-"\n"
-" <child>\n"
" <object class="GtkAlignment" id="
""alignment50">\n"
" <property name="visible">Tr"
" <packing>\n"
" <property name="expand">Fal"
"se</property>\n"
+" <property name="position">4"
+"</property>\n"
+" </packing>\n"
+" </child>\n"
+"\n"
+" <child>\n"
+" <object class="GtkAlignment" id="
+""alignment59">\n"
+" <property name="visible">Tr"
+"ue</property>\n"
+" <property name="left_padding"&"
+"gt;4</property>\n"
+" <child>\n"
+" <object class="GtkHBox" id=&"
+"quot;hbox6">\n"
+" <property name="visible"&g"
+"t;True</property>\n"
+" <property name="spacing"&g"
+"t;4</property>\n"
+" <child>\n"
+" <object class="GtkComboBox&qu"
+"ot; id="VideoQualityGranularity">\n"
+" <property name="visible&quo"
+"t;>True</property>\n"
+" <property name="width_reque"
+"st">55</property>\n"
+" <signal name="changed""
+" handler="vqual_granularity_changed_cb"/>\n"
+" </object>\n"
+" <packing>\n"
+" <property name="expand""
+";>False</property>\n"
+" <property name="position&qu"
+"ot;>0</property>\n"
+" </packing>\n"
+" </child>\n"
+" <child>\n"
+" <object class="GtkLabel""
+" id="label85">\n"
+" <property name="visible&quo"
+"t;>True</property>\n"
+" <property name="xalign""
+";>0</property>\n"
+" <property name="label""
+" translatable="yes">Video Qaulity Granularity</property"
+">\n"
+" </object>\n"
+" <packing>\n"
+" <property name="position&qu"
+"ot;>1</property>\n"
+" </packing>\n"
+" </child>\n"
+" </object>\n"
+" </child>\n"
+" </object>\n"
+" <packing>\n"
+" <property name="expand">Fal"
+"se</property>\n"
" <property name="position">5"
"</property>\n"
" </packing>\n"
" </child>\n"
+" <child>\n"
+" <object class="GtkCheckButton" i"
+"d="EncodeLogLocation">\n"
+" <property name="visible">Tr"
+"ue</property>\n"
+" <property name="can_focus">"
+"True</property>\n"
+" <property name="tooltip_text"&"
+"gt; HandBrake produces 2 activity logs. \n"
+"One for the session and one for each encoding.\n"
+"Store the individual encode logs in the same\n"
+"location as the movie.</property>\n"
+" <property name="label" transla"
+"table="yes">Store logs in destination video directory</"
+"property>\n"
+" <property name="draw_indicator""
+";>True</property>\n"
+" <signal name="toggled" handler"
+"="pref_changed_cb"/>\n"
+" </object>\n"
+" <packing>\n"
+" <property name="expand">Fal"
+"se</property>\n"
+" <property name="position">6"
+"</property>\n"
+" </packing>\n"
+" </child>\n"
"\n"
" <child>\n"
" <object class="GtkAlignment" id="
" <packing>\n"
" <property name="expand">Fal"
"se</property>\n"
-" <property name="position">6"
+" <property name="position">7"
"</property>\n"
" </packing>\n"
" </child>\n"
" <packing>\n"
" <property name="expand">Fal"
"se</property>\n"
-" <property name="position">7"
+" <property name="position">8"
"</property>\n"
" </packing>\n"
" </child>\n"
" <packing>\n"
" <property name="expand">Fal"
"se</property>\n"
-" <property name="position">8"
+" <property name="position">9"
"</property>\n"
" </packing>\n"
" </child>\n"
" <false />\n"
" <key>LoggingLevel</key>\n"
" <string>1</string>\n"
+" <key>VideoQualityGranularity</key>\n"
+" <string>0.2</string>\n"
" <key>allow_tweaks</key>\n"
" <false />\n"
" <key>chapters_in_destination</key>\n"
<property name="value">0</property>
</object>
<object class="GtkAdjustment" id="adjustment5">
- <property name="upper">1</property>
+ <property name="upper">51</property>
<property name="lower">0</property>
- <property name="page_increment">1</property>
- <property name="step_increment">0.1</property>
+ <property name="page_increment">5</property>
+ <property name="step_increment">0.25</property>
<property name="page_size">0</property>
- <property name="value">0.63</property>
+ <property name="value">20.25</property>
</object>
<object class="GtkAdjustment" id="adjustment6">
<property name="upper">4</property>
</child>
<child>
<object class="GtkHScale" id="VideoQualitySlider">
- <property name="width_request">200</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="adjustment">adjustment5</property>
<property name="digits">3</property>
- <property name="value_pos">GTK_POS_RIGHT</property>
- <signal handler="setting_widget_changed_cb" name="value_changed"/>
+ <property name="value_pos">GTK_POS_BOTTOM</property>
+ <signal handler="vquality_changed_cb" name="value_changed"/>
<signal handler="format_vquality_cb" name="format-value"/>
</object>
<packing>
<property name="position">3</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="EncodeLogLocation">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_text"> HandBrake produces 2 activity logs.
-One for the session and one for each encoding.
-Store the individual encode logs in the same
-location as the movie.</property>
- <property name="label" translatable="yes">Store logs in destination video directory</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="pref_changed_cb"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">4</property>
- </packing>
- </child>
-
<child>
<object class="GtkAlignment" id="alignment50">
<property name="visible">True</property>
</object>
</child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkAlignment" id="alignment59">
+ <property name="visible">True</property>
+ <property name="left_padding">4</property>
+ <child>
+ <object class="GtkHBox" id="hbox6">
+ <property name="visible">True</property>
+ <property name="spacing">4</property>
+ <child>
+ <object class="GtkComboBox" id="VideoQualityGranularity">
+ <property name="visible">True</property>
+ <property name="width_request">55</property>
+ <signal name="changed" handler="vqual_granularity_changed_cb"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label85">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Video Qaulity Granularity</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
<packing>
<property name="expand">False</property>
<property name="position">5</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="EncodeLogLocation">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text"> HandBrake produces 2 activity logs.
+One for the session and one for each encoding.
+Store the individual encode logs in the same
+location as the movie.</property>
+ <property name="label" translatable="yes">Store logs in destination video directory</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="pref_changed_cb"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
<child>
<object class="GtkAlignment" id="alignment51">
</object>
<packing>
<property name="expand">False</property>
- <property name="position">6</property>
+ <property name="position">7</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">7</property>
+ <property name="position">8</property>
</packing>
</child>
<child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">8</property>
+ <property name="position">9</property>
</packing>
</child>
</object>
<false />
<key>LoggingLevel</key>
<string>1</string>
+ <key>VideoQualityGranularity</key>
+ <string>0.2</string>
<key>allow_tweaks</key>
<false />
<key>chapters_in_destination</key>
return ghb_lookup_combo_int(key, ghb_settings_get_value(settings, key));
}
+gdouble
+ghb_settings_combo_double(const GValue *settings, const gchar *key)
+{
+ return ghb_lookup_combo_double(key, ghb_settings_get_value(settings, key));
+}
+
const gchar*
ghb_settings_combo_option(const GValue *settings, const gchar *key)
{
GtkTreeModel *store;
GtkTreeIter iter;
gchar *shortOpt;
- gint ivalue;
+ gdouble ivalue;
gboolean foundit = FALSE;
g_debug("combo (%s)", str);
do
{
gtk_tree_model_get(store, &iter, 3, &ivalue, -1);
- if (ivalue == ival)
+ if ((gint)ivalue == ival || ivalue == dval)
{
gtk_combo_box_set_active_iter (
GTK_COMBO_BOX(widget), &iter);
GtkTreeModel *store;
GtkTreeIter iter;
gchar *shortOpt;
- gint ivalue;
+ gdouble ivalue;
gboolean foundit = FALSE;
g_debug("GTK_COMBO_BOX_ENTRY");
do
{
gtk_tree_model_get(store, &iter, 3, &ivalue, -1);
- if (ivalue == ival)
+ if ((gint)ivalue == ival || ivalue == dval)
{
gtk_combo_box_set_active_iter (
GTK_COMBO_BOX(widget), &iter);
gdouble ghb_settings_get_double(const GValue *settings, const gchar *key);
gchar* ghb_settings_get_string(const GValue *settings, const gchar *key);
gint ghb_settings_combo_int(const GValue *settings, const gchar *key);
+gdouble ghb_settings_combo_double(const GValue *settings, const gchar *key);
const gchar* ghb_settings_combo_option(const GValue *settings, const gchar *key);
GValue* ghb_widget_value(GtkWidget *widget);
GtkTreeModel *store;
GtkTreeIter iter;
gchar *shortOpt;
- gint ivalue;
+ gdouble ivalue;
gboolean foundit = FALSE;
GtkWidget *widget;