OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / gtk / src / hb-backend.c
index 81742f2..8ebdd1d 100644 (file)
@@ -3205,9 +3205,9 @@ void ghb_backend_scan_stop()
 }
 
 void
-ghb_backend_scan(const gchar *path, gint titleindex, gint preview_count)
+ghb_backend_scan(const gchar *path, gint titleindex, gint preview_count, uint64_t min_duration)
 {
-    hb_scan( h_scan, path, titleindex, preview_count, 1 );
+    hb_scan( h_scan, path, titleindex, preview_count, 1, min_duration );
        hb_status.scan.state |= GHB_STATE_SCANNING;
        // initialize count and cur to something that won't cause FPE
        // when computing progress
@@ -3219,7 +3219,7 @@ void
 ghb_backend_queue_scan(const gchar *path, gint titlenum)
 {
        g_debug("ghb_backend_queue_scan()");
-       hb_scan( h_queue, path, titlenum, 10, 0 );
+       hb_scan( h_queue, path, titlenum, 10, 0, 0 );
        hb_status.queue.state |= GHB_STATE_SCANNING;
 }
 
@@ -3600,12 +3600,6 @@ ghb_set_scale(signal_user_data_t *ud, gint mode)
        if (ud->scale_busy) return;
        ud->scale_busy = TRUE;
 
-       if (!ud->dont_clear_presets && (keep_width || keep_height))
-       {
-               ghb_settings_set_int(ud->settings, "PictureWidth", 0);
-               ghb_settings_set_int(ud->settings, "PictureHeight", 0);
-       }
-
        // First configure widgets
        mod = ghb_settings_combo_int(ud->settings, "PictureModulus");
        pic_par = ghb_settings_combo_int(ud->settings, "PicturePAR");
@@ -3708,10 +3702,13 @@ ghb_set_scale(signal_user_data_t *ud, gint mode)
        {
                width = ghb_settings_get_int(ud->settings, "scale_width");
                height = ghb_settings_get_int(ud->settings, "scale_height");
-               max_width = MOD_DOWN(
-                       ghb_settings_get_int(ud->settings, "PictureWidth"), mod);
-               max_height = MOD_DOWN(
-                       ghb_settings_get_int(ud->settings, "PictureHeight"), mod);
+               if (mode & GHB_PIC_USE_MAX)
+               {
+                       max_width = MOD_DOWN(
+                               ghb_settings_get_int(ud->settings, "PictureWidth"), mod);
+                       max_height = MOD_DOWN(
+                               ghb_settings_get_int(ud->settings, "PictureHeight"), mod);
+               }
        }
        g_debug("max_width %d, max_height %d\n", max_width, max_height);