From: John Stebbins Date: Wed, 17 Apr 2019 15:33:31 +0000 (-0600) Subject: LinGui: fix additional mingw gtk UI build issues X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f96678482e066da83cb6927b150c53bce4e1009a;p=handbrake LinGui: fix additional mingw gtk UI build issues --- diff --git a/gtk/configure.ac b/gtk/configure.ac index 4a1788efb..33822f524 100644 --- a/gtk/configure.ac +++ b/gtk/configure.ac @@ -191,13 +191,10 @@ fi if test "x$use_x265" = "xyes" ; then HB_LIBS="$HB_LIBS -lx265" -if test "x$use_numa" = "xyes" ; then - HB_LIBS="$HB_LIBS -lnuma" -fi fi if test "x$use_qsv" = "xyes" ; then - HB_LIBS="$HB_LIBS -lmfx -lva -lva-drm" + HB_LIBS="$HB_LIBS -lmfx" fi case $host in @@ -215,6 +212,16 @@ case $host in *-*-freebsd*) HB_LIBS="$HB_LIBS -lpthread" ;; + *-*-linux*) + if test "x$use_qsv" = "xyes" ; then + HB_LIBS="$HB_LIBS -lva -lva-drm" + fi + if test "x$use_x265" = "xyes" ; then + if test "x$use_numa" = "xyes" ; then + HB_LIBS="$HB_LIBS -lnuma" + fi + fi + ;; *) HB_LIBS="$HB_LIBS -ldl -lpthread" ;; diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 0e066c08a..f73892ba9 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -86,6 +86,7 @@ #include "hb-backend.h" #include "ghb-dvd.h" #include "ghbcellrenderertext.h" +#include "libavutil/parseutils.h" static void update_queue_labels(signal_user_data_t *ud); static void load_all_titles(signal_user_data_t *ud, int titleindex); @@ -1063,7 +1064,7 @@ parse_datestring(const char *src, struct tm *tm) for (int i = 0; i < sizeof(maps); i++) { - if (hb_validate_param_string(maps[i].pattern), src) + if (hb_validate_param_string(maps[i].pattern, src)) { av_small_strptime(src, maps[i].format, tm); return 1; diff --git a/gtk/src/main.c b/gtk/src/main.c index dc064ac5d..afa55194b 100644 --- a/gtk/src/main.c +++ b/gtk/src/main.c @@ -616,7 +616,7 @@ IoRedirect(signal_user_data_t *ud) // Open activity log. config = ghb_get_user_config_dir(NULL); pid = getpid(); - path = g_strdup_printf("%s/Activity.log.%d", config, pid); + path = g_strdup_printf("%s/Activity.log.%"PRId64, config, (long)pid); ud->activity_log = g_io_channel_new_file (path, "w", NULL); ud->job_activity_log = NULL; str = g_strdup_printf("%s", path); diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c index 95b79c51b..d00dc4a66 100644 --- a/gtk/src/queuehandler.c +++ b/gtk/src/queuehandler.c @@ -1175,7 +1175,7 @@ ghb_low_disk_check(signal_user_data_t *ud) hb_window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window")); dialog = gtk_message_dialog_new(hb_window, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, - _("%sThe destination filesystem is almost full: %"PRIu64"MB free.\n" + _("%sThe destination filesystem is almost full: %"PRId64" MB free.\n" "Destination: %s\n" "Encode may be incomplete if you proceed.\n"), paused_msg, free_size / (1024 * 1024), dest); diff --git a/gtk/src/videohandler.c b/gtk/src/videohandler.c index a85f5a8b6..926fac6e0 100644 --- a/gtk/src/videohandler.c +++ b/gtk/src/videohandler.c @@ -306,8 +306,6 @@ format_video_preset_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud) return g_strdup_printf(" %-12s", "ERROR"); } -#include - G_MODULE_EXPORT gchar* format_vquality_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud) { diff --git a/libhb/param.h b/libhb/param.h index d0d5cb9c4..378c5e578 100644 --- a/libhb/param.h +++ b/libhb/param.h @@ -26,6 +26,7 @@ hb_dict_t * hb_generate_filter_settings(int filter_id, const char *preset, char * hb_generate_filter_settings_json(int filter_id, const char *preset, const char *tune, const char *custom); +int hb_validate_param_string(const char *regex_pattern, const char *param_string); int hb_validate_filter_preset(int filter_id, const char *preset, const char *tune, const char *custom); int hb_validate_filter_settings(int filter_id, const hb_dict_t *settings);