From 5d9e1585a9be17528546f82cde903829082e7a2b Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Thu, 10 Mar 2016 13:23:14 -0700 Subject: [PATCH] LinGui: link comb-detect and deinterlace filters When comb-detect is enabled and decomb/deinterlace filter is not, enable decomb. When decomb/detinterlace filter is disabled, disable comb-detect. --- gtk/src/callbacks.c | 30 ++++++++++++++++++++++++++++++ gtk/src/ghb-3.12.ui | 3 ++- gtk/src/ghb-3.14.ui | 3 ++- gtk/src/ghb.ui | 2 +- 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 13d2d8531..b79225df3 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -2127,6 +2127,28 @@ setting_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud) ghb_live_reset(ud); } +G_MODULE_EXPORT void +comb_detect_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud) +{ + ghb_widget_to_setting(ud->settings, widget); + ghb_check_dependency(ud, widget, NULL); + ghb_clear_presets_selection(ud); + ghb_live_reset(ud); + + const char * comb_detect; + comb_detect = ghb_dict_get_string(ud->settings, "PictureCombDetectPreset"); + if (strcasecmp(comb_detect, "off")) + { + const char * deint; + deint = ghb_dict_get_string(ud->settings, "PictureDeinterlaceFilter"); + if (!strcasecmp(deint, "off")) + { + ghb_ui_update(ud, "PictureDeinterlaceFilter", + ghb_string_value("decomb")); + } + } +} + G_MODULE_EXPORT void deint_filter_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { @@ -2137,6 +2159,14 @@ deint_filter_changed_cb(GtkWidget *widget, signal_user_data_t *ud) ghb_update_ui_combo_box(ud, "PictureDeinterlacePreset", NULL, FALSE); ghb_ui_update(ud, "PictureDeinterlacePreset", ghb_dict_get(ud->settings, "PictureDeinterlacePreset")); + + const char * deint; + deint = ghb_dict_get_string(ud->settings, "PictureDeinterlaceFilter"); + if (!strcasecmp(deint, "off")) + { + ghb_ui_update(ud, "PictureCombDetectPreset", + ghb_string_value("off")); + } } G_MODULE_EXPORT void diff --git a/gtk/src/ghb-3.12.ui b/gtk/src/ghb-3.12.ui index 3e9f9d174..023f79c73 100644 --- a/gtk/src/ghb-3.12.ui +++ b/gtk/src/ghb-3.12.ui @@ -2867,6 +2867,7 @@ Players will scale the image in order to achieve the specified aspect.horizontal True False + none 4 32 16 @@ -2965,7 +2966,7 @@ JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity If a deinterlace filter is enabled, only frames that this filter finds to be interlaced will be deinterlaced. - + 0 diff --git a/gtk/src/ghb-3.14.ui b/gtk/src/ghb-3.14.ui index 35139ed59..e9c0421a9 100644 --- a/gtk/src/ghb-3.14.ui +++ b/gtk/src/ghb-3.14.ui @@ -2868,6 +2868,7 @@ Players will scale the image in order to achieve the specified aspect.horizontal True False + none 4 32 16 @@ -2966,7 +2967,7 @@ JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity If a deinterlace filter is enabled, only frames that this filter finds to be interlaced will be deinterlaced. - + 0 diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index b6edfb6f0..9e327ed53 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -2970,7 +2970,7 @@ JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity If a deinterlace filter is enabled, only frames that this filter finds to be interlaced will be deinterlaced. - + 0 -- 2.40.0