diff options
author | jstebbins <[email protected]> | 2014-02-23 23:21:13 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-02-23 23:21:13 +0000 |
commit | 7387f3e798334b15e2a5eb8d2273731f65184037 (patch) | |
tree | e96239af761c074be62186affa7c6809c553c7f9 /gtk/src | |
parent | ebd9533599ce8cedca9f11efde75f60ca5141b66 (diff) |
LinGui: use hb_video_encoder_get_presets()
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6075 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/main.c | 2 | ||||
-rw-r--r-- | gtk/src/presets.c | 7 | ||||
-rw-r--r-- | gtk/src/x264handler.c | 5 |
3 files changed, 8 insertions, 6 deletions
diff --git a/gtk/src/main.c b/gtk/src/main.c index 9232a1fc6..6a778c003 100644 --- a/gtk/src/main.c +++ b/gtk/src/main.c @@ -1002,7 +1002,7 @@ main(int argc, char *argv[]) GtkWidget *presetSlider = GHB_WIDGET(ud->builder, "x264PresetSlider"); const char * const *x264_presets; int count = 0; - x264_presets = hb_x264_presets(); + x264_presets = hb_video_encoder_get_presets(HB_VCODEC_X264); while (x264_presets && x264_presets[count]) count++; gtk_range_set_range(GTK_RANGE(presetSlider), 0, count-1); diff --git a/gtk/src/presets.c b/gtk/src/presets.c index 940cadaaa..fe3172f5e 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -1047,12 +1047,13 @@ ghb_preset_to_settings(GValue *settings, GValue *preset) ghb_dict_remove(settings, "x264Option"); } - const char * const *x264preset = hb_x264_presets(); + const char * const *x264presets; + x264presets = hb_video_encoder_get_presets(HB_VCODEC_X264); char *x264Preset = ghb_settings_get_string(settings, "x264Preset"); int ii; - for (ii = 0; x264preset[ii]; ii++) + for (ii = 0; x264presets[ii]; ii++) { - if (!strcasecmp(x264Preset, x264preset[ii])) + if (!strcasecmp(x264Preset, x264presets[ii])) { ghb_settings_set_int(settings, "x264PresetSlider", ii); } diff --git a/gtk/src/x264handler.c b/gtk/src/x264handler.c index ad3e92ca2..09b15613b 100644 --- a/gtk/src/x264handler.c +++ b/gtk/src/x264handler.c @@ -91,7 +91,8 @@ x264_setting_changed_cb(GtkWidget *widget, signal_user_data_t *ud) ghb_widget_to_setting(ud->settings, widget); int x264Preset = ghb_settings_get_int(ud->settings, "x264PresetSlider"); - const char * preset = hb_x264_presets()[x264Preset]; + const char *preset; + preset = hb_video_encoder_get_presets(HB_VCODEC_X264)[x264Preset]; ghb_settings_set_string(ud->settings, "x264Preset", preset); if (!ghb_settings_get_boolean(ud->settings, "x264UseAdvancedOptions")) @@ -1255,7 +1256,7 @@ format_x264_preset_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud) const char * const *x264_presets; const char *preset = "medium"; - x264_presets = hb_x264_presets(); + x264_presets = hb_video_encoder_get_presets(HB_VCODEC_X264); preset = x264_presets[(int)val]; |