ghb_adjust_audio_rate_combos(ud);
ghb_set_pref_audio(titleindex, ud);
ghb_set_pref_subtitle(titleindex, ud);
- if (ghb_settings_get_boolean(ud->settings, "vquality_type_target"))
- {
- gint bitrate = ghb_calculate_target_bitrate (ud->settings, titleindex);
- ghb_ui_update(ud, "VideoAvgBitrate", ghb_int64_value(bitrate));
- }
// Unfortunately, there is no way to query how many frames were
// actually generated during the scan.
}
G_MODULE_EXPORT void
-target_size_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
-{
- const gchar *name = ghb_get_setting_key(widget);
- g_debug("target_size_changed_cb () %s", name);
- ghb_widget_to_setting(ud->settings, widget);
- ghb_check_dependency(ud, widget, NULL);
- ghb_clear_presets_selection(ud);
- ghb_live_reset(ud);
- if (ghb_settings_get_boolean(ud->settings, "vquality_type_target"))
- {
- gint titleindex;
- titleindex = ghb_settings_combo_int(ud->settings, "title");
- gint bitrate = ghb_calculate_target_bitrate (ud->settings, titleindex);
- ghb_ui_update(ud, "VideoAvgBitrate", ghb_int64_value(bitrate));
- }
-}
-
-G_MODULE_EXPORT void
start_point_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
gint start, end;
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="vquality_type_target">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="tooltip-text" translatable="yes">Set the desired final size of the output file. This uses the known duration of the video to calculate the bitrate that will be required to achieve the desired size.</property>
- <property name="label" translatable="yes">Target Size (MB):</property>
- <property name="draw_indicator">True</property>
- <property name="group">vquality_type_constant</property>
- <signal handler="target_size_changed_cb" name="toggled"/>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options">GTK_FILL</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="VideoTargetSize">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="tooltip-text" translatable="yes">Set the desired final size of the output file. This uses the known duration of the video to calculate the bitrate that will be required to achieve the desired size.</property>
- <property name="adjustment">adjustment4</property>
- <signal handler="target_size_changed_cb" name="value_changed"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options">GTK_FILL</property>
- <property name="x_options"></property>
- </packing>
- </child>
- <child>
<object class="GtkCheckButton" id="VideoTwoPass">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="tooltip-text" translatable="yes">Perform 2 Pass Encoding. 'Bitrate' or 'Target Size' options are prerequisites. During the 1st pass, statistics about the video are collected. Then in the second pass, those statistics are used to make bitrate allocation decisions.</property>
+ <property name="tooltip-text" translatable="yes">Perform 2 Pass Encoding. The 'Bitrate' option is prerequisite. During the 1st pass, statistics about the video are collected. Then in the second pass, those statistics are used to make bitrate allocation decisions.</property>
<property name="label" translatable="yes">2-Pass Encoding</property>
<property name="draw_indicator">True</property>
<signal handler="setting_widget_changed_cb" name="toggled"/>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="y_options">GTK_FILL</property>
<property name="x_options">GTK_FILL</property>
</packing>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="y_options">GTK_FILL</property>
<property name="x_options">GTK_FILL</property>
</packing>
}
}
-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)
{
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;
GdkPixbuf* ghb_get_preview_image(
gint titleindex, gint index, signal_user_data_t *ud,
gint *width, gint *height);
-gint ghb_calculate_target_bitrate(GValue *settings, gint titleindex);
gchar* ghb_dvd_volname(const gchar *device);
gint ghb_get_title_number(gint titleindex);
gint ghb_subtitle_track_source(signal_user_data_t *ud, gint track);
<false />
<key>vquality_type_constant</key>
<false />
- <key>vquality_type_target</key>
- <false />
<key>SrtLanguage</key>
<string>und</string>
<key>SrtCodeset</key>
<false />
<key>vquality_type_constant</key>
<false />
- <key>vquality_type_target</key>
- <false />
<key>VideoFramerateCFR</key>
<false />
<key>VideoFrameratePFR</key>
DepEntry("angle_count", "angle", "1", True, True),
DepEntry("angle_count", "angle_label", "1", True, True),
DepEntry("vquality_type_bitrate", "VideoAvgBitrate", "TRUE", False, False),
- DepEntry("vquality_type_target", "VideoTargetSize", "TRUE", False, False),
DepEntry("vquality_type_constant", "VideoQualitySlider", "TRUE", False, False),
DepEntry("vquality_type_constant", "VideoTwoPass", "TRUE", True, False),
DepEntry("vquality_type_constant", "VideoTurboTwoPass", "TRUE", True, False),
} break;
}
// VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant
+ // *note: target is no longer used
switch (vqtype)
{
case 0:
{
- ghb_dict_insert(dict, g_strdup("vquality_type_target"),
- ghb_boolean_value_new(TRUE));
ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"),
- ghb_boolean_value_new(FALSE));
+ ghb_boolean_value_new(TRUE));
ghb_dict_insert(dict, g_strdup("vquality_type_constant"),
ghb_boolean_value_new(FALSE));
} break;
case 1:
{
- ghb_dict_insert(dict, g_strdup("vquality_type_target"),
- ghb_boolean_value_new(FALSE));
ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"),
ghb_boolean_value_new(TRUE));
ghb_dict_insert(dict, g_strdup("vquality_type_constant"),
} break;
case 2:
{
- ghb_dict_insert(dict, g_strdup("vquality_type_target"),
- ghb_boolean_value_new(FALSE));
ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"),
ghb_boolean_value_new(FALSE));
ghb_dict_insert(dict, g_strdup("vquality_type_constant"),
} break;
default:
{
- ghb_dict_insert(dict, g_strdup("vquality_type_target"),
- ghb_boolean_value_new(FALSE));
ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"),
ghb_boolean_value_new(FALSE));
ghb_dict_insert(dict, g_strdup("vquality_type_constant"),
static void
export_xlat_preset(GValue *dict)
{
- gboolean autoscale, target, br, constant;
+ gboolean autoscale, br, constant;
g_debug("export_xlat_prest ()");
autoscale = ghb_value_boolean(preset_dict_get_value(dict, "autoscale"));
- target = ghb_value_boolean(
- preset_dict_get_value(dict, "vquality_type_target"));
br = ghb_value_boolean(
preset_dict_get_value(dict, "vquality_type_bitrate"));
constant = ghb_value_boolean(
ghb_int_value_new(1));
// VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant
- if (target)
- {
- ghb_dict_insert(dict, g_strdup("VideoQualityType"),
- ghb_int_value_new(0));
- }
- else if (br)
+ // *note: target is no longer used
+ if (br)
{
ghb_dict_insert(dict, g_strdup("VideoQualityType"),
ghb_int_value_new(1));