OSDN Git Service

LinGui: remove target file size option
[handbrake-jp/handbrake-jp-git.git] / gtk / src / hb-backend.c
index 8029720..0f7bba1 100644 (file)
@@ -303,9 +303,9 @@ combo_opts_t bpyramid_opts =
 
 static options_map_t d_weightp_opts[] =
 {
-       {"Off",   "0", 0, "0"},
-       {"Blind", "1", 1, "1"},
-       {"Smart", "2", 2, "2"},
+       {"Off",    "0", 0, "0"},
+       {"Simple", "1", 1, "1"},
+       {"Smart",  "2", 2, "2"},
 };
 combo_opts_t weightp_opts =
 {
@@ -3856,24 +3856,6 @@ set_preview_job_settings(hb_job_t *job, GValue *settings)
        }
 }
 
-gint
-ghb_calculate_target_bitrate(GValue *settings, gint titleindex)
-{
-       hb_list_t  * list;
-       hb_title_t * title;
-       hb_job_t   * job;
-       gint size;
-
-       if (h_scan == NULL) return 1500;
-       list = hb_get_titles( h_scan );
-    title = hb_list_item( list, titleindex );
-       if (title == NULL) return 1500;
-       job   = title->job;
-       if (job == NULL) return 1500;
-       size = ghb_settings_get_int(settings, "VideoTargetSize");
-       return hb_calc_bitrate( job, size );
-}
-
 gboolean
 ghb_validate_filter_string(const gchar *str, gint max_fields)
 {
@@ -4438,6 +4420,7 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
                gint start, end;
                gint num_chapters = hb_list_count(title->list_chapter);
                gint duration = title->duration / 90000;
+               job->chapter_markers = FALSE;
                job->chapter_start = 1;
                job->chapter_end = num_chapters;
 
@@ -4451,8 +4434,6 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
                }
                if (ghb_settings_combo_int(js, "PtoPType") == 1)
                {
-                       job->chapter_start = 1;
-                       job->chapter_end = num_chapters;
                        start = ghb_settings_get_int(js, "start_point");
                        end = ghb_settings_get_int(js, "end_point");
                        job->pts_to_start = (int64_t)MIN(duration-1, start) * 90000;
@@ -4461,8 +4442,6 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
                }
                if (ghb_settings_combo_int(js, "PtoPType") == 2)
                {
-                       job->chapter_start = 1;
-                       job->chapter_end = num_chapters;
                        start = ghb_settings_get_int(js, "start_point");
                        end = ghb_settings_get_int(js, "end_point");
                        gint64 max_frames;
@@ -4471,7 +4450,10 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
                        job->frame_to_stop = (int64_t)MAX(start, end-1) - 
                                                                 job->frame_to_start;
                }
-               job->chapter_markers = ghb_settings_get_boolean(js, "ChapterMarkers");
+               if (job->chapter_start != job->chapter_end)
+               {
+                       job->chapter_markers = ghb_settings_get_boolean(js, "ChapterMarkers");
+               }
                if (job->chapter_start == job->chapter_end)
                        job->chapter_markers = 0;
                if ( job->chapter_markers )
@@ -4702,17 +4684,6 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
         hb_audio_add( job, &audio );
                tcount++;
        }
-       // I was tempted to move this up with the reset of the video quality
-       // settings, but I suspect the settings above need to be made
-       // first in order for hb_calc_bitrate to be accurate.
-       if (ghb_settings_get_boolean(js, "vquality_type_target"))
-       {
-               gint size;
-               
-               size = ghb_settings_get_int(js, "VideoTargetSize");
-        job->vbitrate = hb_calc_bitrate( job, size );
-               job->vquality = -1.0;
-       }
 
        dest_str = ghb_settings_get_string(js, "destination");
        job->file = dest_str;