+ *max = 1.0;
+ *step = 0.001;
+ *page = 0.1;
+ *digits = 3;
+ }
+}
+
+static gint
+lookup_generic_int(combo_opts_t *opts, const GValue *gval)
+{
+ gint ii;
+ gchar *str;
+ gint 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)
+{
+ gint ii;
+ gchar *str;
+ const gchar *result = "";
+
+ str = ghb_value_string(gval);
+ for (ii = 0; ii < opts->count; ii++)
+ {
+ if (strcmp(opts->map[ii].shortOpt, str) == 0)
+ {
+ result = opts->map[ii].option;
+ break;
+ }
+ }
+ g_free(str);
+ return result;
+}
+
+static gint
+lookup_mix_int(const GValue *mix)
+{
+ gint ii;
+ gchar *str;
+ gint result = 0;
+
+
+ str = ghb_value_string(mix);
+ for (ii = 0; ii < hb_audio_mixdowns_count; ii++)
+ {
+ if (strcmp(hb_audio_mixdowns[ii].short_name, str) == 0)
+ {
+ result = hb_audio_mixdowns[ii].amixdown;
+ break;
+ }
+ }
+ g_free(str);
+ return result;
+}
+
+static const gchar*
+lookup_mix_option(const GValue *mix)
+{
+ gint ii;
+ gchar *str;
+ gchar *result = "None";
+
+
+ str = ghb_value_string(mix);
+ for (ii = 0; ii < hb_audio_mixdowns_count; ii++)
+ {
+ if (strcmp(hb_audio_mixdowns[ii].short_name, str) == 0)
+ {
+ result = hb_audio_mixdowns[ii].human_readable_name;
+ break;
+ }
+ }
+ g_free(str);
+ return result;
+}
+
+static gint
+lookup_video_rate_int(const GValue *vrate)
+{
+ gint ii;
+ gchar *str;
+ gint result = 0;
+
+ str = ghb_value_string(vrate);
+ for (ii = 0; ii < hb_video_rates_count; ii++)
+ {
+ if (strcmp(hb_video_rates[ii].string, str) == 0)
+ {
+ result = hb_video_rates[ii].rate;
+ break;
+ }
+ }
+ g_free(str);
+ // Default to "same as source"
+ return result;
+}
+
+static const gchar*
+lookup_video_rate_option(const GValue *vrate)
+{
+ gint ii;
+ gchar *str;
+ const gchar *result = "Same as source";
+
+ str = ghb_value_string(vrate);
+ for (ii = 0; ii < hb_video_rates_count; ii++)
+ {
+ if (strcmp(hb_video_rates[ii].string, str) == 0)
+ {
+ result = hb_video_rates[ii].string;
+ break;
+ }
+ }
+ g_free(str);
+ // Default to "same as source"
+ return result;
+}
+
+static gint
+lookup_audio_rate_int(const GValue *rate)
+{
+ gint ii;
+ gchar *str;
+ gint result = 0;
+
+ // Coincidentally, the string "source" will return 0
+ // which is our flag to use "same as source"
+ str = ghb_value_string(rate);
+ for (ii = 0; ii < hb_audio_rates_count; ii++)
+ {
+ if (strcmp(hb_audio_rates[ii].string, str) == 0)
+ {
+ result = hb_audio_rates[ii].rate;
+ break;
+ }
+ }
+ g_free(str);
+ return result;
+}
+
+static const gchar*
+lookup_audio_rate_option(const GValue *rate)
+{
+ gint ii;
+ gchar *str;
+ const gchar *result = "Same as source";
+
+ // Coincidentally, the string "source" will return 0
+ // which is our flag to use "same as source"
+ str = ghb_value_string(rate);
+ for (ii = 0; ii < hb_audio_rates_count; ii++)
+ {
+ if (strcmp(hb_audio_rates[ii].string, str) == 0)
+ {
+ result = hb_audio_rates[ii].string;
+ break;
+ }
+ }
+ g_free(str);
+ return result;
+}
+
+static gint
+lookup_audio_bitrate_int(const GValue *rate)
+{
+ gint ii;
+ gchar *str;
+ gint result = 0;
+
+ // Coincidentally, the string "source" will return 0
+ // which is our flag to use "same as source"
+ str = ghb_value_string(rate);
+ for (ii = 0; ii < hb_audio_bitrates_count; ii++)
+ {
+ if (strcmp(hb_audio_bitrates[ii].string, str) == 0)
+ {
+ result = hb_audio_bitrates[ii].rate;
+ break;
+ }
+ }
+ g_free(str);
+ return result;
+}
+
+static const gchar*
+lookup_audio_bitrate_option(const GValue *rate)
+{
+ gint ii;
+ gchar *str;
+ const gchar *result = "Same as source";
+
+ // Coincidentally, the string "source" will return 0
+ // which is our flag to use "same as source"
+ str = ghb_value_string(rate);
+ for (ii = 0; ii < hb_audio_bitrates_count; ii++)
+ {
+ if (strcmp(hb_audio_bitrates[ii].string, str) == 0)
+ {
+ result = hb_audio_bitrates[ii].string;
+ break;
+ }
+ }
+ g_free(str);
+ return result;
+}
+
+static gint
+lookup_audio_lang_int(const GValue *rate)
+{
+ gint ii;
+ gchar *str;
+ gint result = 0;
+
+ // Coincidentally, the string "source" will return 0
+ // which is our flag to use "same as source"
+ str = ghb_value_string(rate);
+ for (ii = 0; ii < LANG_TABLE_SIZE; ii++)
+ {
+ if (strcmp(ghb_language_table[ii].iso639_2, str) == 0)
+ {
+ result = ii;
+ break;
+ }
+ }
+ g_free(str);
+ return result;
+}
+
+static const gchar*
+lookup_audio_lang_option(const GValue *rate)
+{
+ gint ii;
+ gchar *str;
+ const gchar *result = "Same as source";
+
+ // Coincidentally, the string "source" will return 0
+ // which is our flag to use "same as source"
+ str = ghb_value_string(rate);
+ for (ii = 0; ii < LANG_TABLE_SIZE; ii++)
+ {
+ if (strcmp(ghb_language_table[ii].iso639_2, str) == 0)
+ {
+ result = ghb_language_table[ii].eng_name;
+ break;
+ }