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 =
{
}
}
-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)
{
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;
}
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;
}
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;
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 )
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;