• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

githubのコードからのfolk


Commit MetaInfo

Revision75a84adcf721b5965c63f78984b8a624dddf6c0c (tree)
Time2011-02-26 09:04:39
Authorjstebbins <jstebbins@b64f...>
Commiterjstebbins

Log Message

LinGui: remove target file size option

git-svn-id: svn://localhost/HandBrake/trunk@3808 b64f7644-9d1e-0410-96f1-a4d463321fa5

Change Summary

Incremental Difference

--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -1491,11 +1491,6 @@ title_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
14911491 ghb_adjust_audio_rate_combos(ud);
14921492 ghb_set_pref_audio(titleindex, ud);
14931493 ghb_set_pref_subtitle(titleindex, ud);
1494- if (ghb_settings_get_boolean(ud->settings, "vquality_type_target"))
1495- {
1496- gint bitrate = ghb_calculate_target_bitrate (ud->settings, titleindex);
1497- ghb_ui_update(ud, "VideoAvgBitrate", ghb_int64_value(bitrate));
1498- }
14991494
15001495 // Unfortunately, there is no way to query how many frames were
15011496 // actually generated during the scan.
@@ -1672,24 +1667,6 @@ vcodec_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
16721667 }
16731668
16741669 G_MODULE_EXPORT void
1675-target_size_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
1676-{
1677- const gchar *name = ghb_get_setting_key(widget);
1678- g_debug("target_size_changed_cb () %s", name);
1679- ghb_widget_to_setting(ud->settings, widget);
1680- ghb_check_dependency(ud, widget, NULL);
1681- ghb_clear_presets_selection(ud);
1682- ghb_live_reset(ud);
1683- if (ghb_settings_get_boolean(ud->settings, "vquality_type_target"))
1684- {
1685- gint titleindex;
1686- titleindex = ghb_settings_combo_int(ud->settings, "title");
1687- gint bitrate = ghb_calculate_target_bitrate (ud->settings, titleindex);
1688- ghb_ui_update(ud, "VideoAvgBitrate", ghb_int64_value(bitrate));
1689- }
1690-}
1691-
1692-G_MODULE_EXPORT void
16931670 start_point_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
16941671 {
16951672 gint start, end;
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -1920,49 +1920,11 @@ FFmpeg's and Theora's scale is more linear. These encoders do not have a lossle
19201920 </packing>
19211921 </child>
19221922 <child>
1923- <object class="GtkRadioButton" id="vquality_type_target">
1924- <property name="visible">True</property>
1925- <property name="can_focus">True</property>
1926- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
1927- <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>
1928- <property name="label" translatable="yes">Target Size (MB):</property>
1929- <property name="draw_indicator">True</property>
1930- <property name="group">vquality_type_constant</property>
1931- <signal handler="target_size_changed_cb" name="toggled"/>
1932- </object>
1933- <packing>
1934- <property name="left_attach">0</property>
1935- <property name="right_attach">1</property>
1936- <property name="top_attach">3</property>
1937- <property name="bottom_attach">4</property>
1938- <property name="y_options">GTK_FILL</property>
1939- <property name="x_options">GTK_FILL</property>
1940- </packing>
1941- </child>
1942- <child>
1943- <object class="GtkSpinButton" id="VideoTargetSize">
1944- <property name="visible">True</property>
1945- <property name="can_focus">True</property>
1946- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
1947- <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>
1948- <property name="adjustment">adjustment4</property>
1949- <signal handler="target_size_changed_cb" name="value_changed"/>
1950- </object>
1951- <packing>
1952- <property name="left_attach">1</property>
1953- <property name="right_attach">2</property>
1954- <property name="top_attach">3</property>
1955- <property name="bottom_attach">4</property>
1956- <property name="y_options">GTK_FILL</property>
1957- <property name="x_options"></property>
1958- </packing>
1959- </child>
1960- <child>
19611923 <object class="GtkCheckButton" id="VideoTwoPass">
19621924 <property name="visible">True</property>
19631925 <property name="can_focus">True</property>
19641926 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
1965- <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>
1927+ <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>
19661928 <property name="label" translatable="yes">2-Pass Encoding</property>
19671929 <property name="draw_indicator">True</property>
19681930 <signal handler="setting_widget_changed_cb" name="toggled"/>
@@ -1970,8 +1932,8 @@ FFmpeg's and Theora's scale is more linear. These encoders do not have a lossle
19701932 <packing>
19711933 <property name="left_attach">0</property>
19721934 <property name="right_attach">1</property>
1973- <property name="top_attach">4</property>
1974- <property name="bottom_attach">5</property>
1935+ <property name="top_attach">3</property>
1936+ <property name="bottom_attach">4</property>
19751937 <property name="y_options">GTK_FILL</property>
19761938 <property name="x_options">GTK_FILL</property>
19771939 </packing>
@@ -1997,8 +1959,8 @@ FFmpeg's and Theora's scale is more linear. These encoders do not have a lossle
19971959 <packing>
19981960 <property name="left_attach">0</property>
19991961 <property name="right_attach">1</property>
2000- <property name="top_attach">5</property>
2001- <property name="bottom_attach">6</property>
1962+ <property name="top_attach">4</property>
1963+ <property name="bottom_attach">5</property>
20021964 <property name="y_options">GTK_FILL</property>
20031965 <property name="x_options">GTK_FILL</property>
20041966 </packing>
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -3856,24 +3856,6 @@ set_preview_job_settings(hb_job_t *job, GValue *settings)
38563856 }
38573857 }
38583858
3859-gint
3860-ghb_calculate_target_bitrate(GValue *settings, gint titleindex)
3861-{
3862- hb_list_t * list;
3863- hb_title_t * title;
3864- hb_job_t * job;
3865- gint size;
3866-
3867- if (h_scan == NULL) return 1500;
3868- list = hb_get_titles( h_scan );
3869- title = hb_list_item( list, titleindex );
3870- if (title == NULL) return 1500;
3871- job = title->job;
3872- if (job == NULL) return 1500;
3873- size = ghb_settings_get_int(settings, "VideoTargetSize");
3874- return hb_calc_bitrate( job, size );
3875-}
3876-
38773859 gboolean
38783860 ghb_validate_filter_string(const gchar *str, gint max_fields)
38793861 {
@@ -4702,17 +4684,6 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
47024684 hb_audio_add( job, &audio );
47034685 tcount++;
47044686 }
4705- // I was tempted to move this up with the reset of the video quality
4706- // settings, but I suspect the settings above need to be made
4707- // first in order for hb_calc_bitrate to be accurate.
4708- if (ghb_settings_get_boolean(js, "vquality_type_target"))
4709- {
4710- gint size;
4711-
4712- size = ghb_settings_get_int(js, "VideoTargetSize");
4713- job->vbitrate = hb_calc_bitrate( job, size );
4714- job->vquality = -1.0;
4715- }
47164687
47174688 dest_str = ghb_settings_get_string(js, "destination");
47184689 job->file = dest_str;
--- a/gtk/src/hb-backend.h
+++ b/gtk/src/hb-backend.h
@@ -156,7 +156,6 @@ gchar* ghb_build_x264opts_string(GValue *settings);
156156 GdkPixbuf* ghb_get_preview_image(
157157 gint titleindex, gint index, signal_user_data_t *ud,
158158 gint *width, gint *height);
159-gint ghb_calculate_target_bitrate(GValue *settings, gint titleindex);
160159 gchar* ghb_dvd_volname(const gchar *device);
161160 gint ghb_get_title_number(gint titleindex);
162161 gint ghb_subtitle_track_source(signal_user_data_t *ud, gint track);
--- a/gtk/src/internal_defaults.xml
+++ b/gtk/src/internal_defaults.xml
@@ -104,8 +104,6 @@
104104 <false />
105105 <key>vquality_type_constant</key>
106106 <false />
107- <key>vquality_type_target</key>
108- <false />
109107 <key>SrtLanguage</key>
110108 <string>und</string>
111109 <key>SrtCodeset</key>
@@ -212,8 +210,6 @@
212210 <false />
213211 <key>vquality_type_constant</key>
214212 <false />
215- <key>vquality_type_target</key>
216- <false />
217213 <key>VideoFramerateCFR</key>
218214 <false />
219215 <key>VideoFrameratePFR</key>
--- a/gtk/src/makedeps.py
+++ b/gtk/src/makedeps.py
@@ -21,7 +21,6 @@ dep_map = (
2121 DepEntry("angle_count", "angle", "1", True, True),
2222 DepEntry("angle_count", "angle_label", "1", True, True),
2323 DepEntry("vquality_type_bitrate", "VideoAvgBitrate", "TRUE", False, False),
24- DepEntry("vquality_type_target", "VideoTargetSize", "TRUE", False, False),
2524 DepEntry("vquality_type_constant", "VideoQualitySlider", "TRUE", False, False),
2625 DepEntry("vquality_type_constant", "VideoTwoPass", "TRUE", True, False),
2726 DepEntry("vquality_type_constant", "VideoTurboTwoPass", "TRUE", True, False),
--- a/gtk/src/presets.c
+++ b/gtk/src/presets.c
@@ -2643,21 +2643,18 @@ import_xlat_preset(GValue *dict)
26432643 } break;
26442644 }
26452645 // VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant
2646+ // *note: target is no longer used
26462647 switch (vqtype)
26472648 {
26482649 case 0:
26492650 {
2650- ghb_dict_insert(dict, g_strdup("vquality_type_target"),
2651- ghb_boolean_value_new(TRUE));
26522651 ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"),
2653- ghb_boolean_value_new(FALSE));
2652+ ghb_boolean_value_new(TRUE));
26542653 ghb_dict_insert(dict, g_strdup("vquality_type_constant"),
26552654 ghb_boolean_value_new(FALSE));
26562655 } break;
26572656 case 1:
26582657 {
2659- ghb_dict_insert(dict, g_strdup("vquality_type_target"),
2660- ghb_boolean_value_new(FALSE));
26612658 ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"),
26622659 ghb_boolean_value_new(TRUE));
26632660 ghb_dict_insert(dict, g_strdup("vquality_type_constant"),
@@ -2665,8 +2662,6 @@ import_xlat_preset(GValue *dict)
26652662 } break;
26662663 case 2:
26672664 {
2668- ghb_dict_insert(dict, g_strdup("vquality_type_target"),
2669- ghb_boolean_value_new(FALSE));
26702665 ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"),
26712666 ghb_boolean_value_new(FALSE));
26722667 ghb_dict_insert(dict, g_strdup("vquality_type_constant"),
@@ -2674,8 +2669,6 @@ import_xlat_preset(GValue *dict)
26742669 } break;
26752670 default:
26762671 {
2677- ghb_dict_insert(dict, g_strdup("vquality_type_target"),
2678- ghb_boolean_value_new(FALSE));
26792672 ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"),
26802673 ghb_boolean_value_new(FALSE));
26812674 ghb_dict_insert(dict, g_strdup("vquality_type_constant"),
@@ -2825,12 +2818,10 @@ import_xlat_presets(GValue *presets)
28252818 static void
28262819 export_xlat_preset(GValue *dict)
28272820 {
2828- gboolean autoscale, target, br, constant;
2821+ gboolean autoscale, br, constant;
28292822
28302823 g_debug("export_xlat_prest ()");
28312824 autoscale = ghb_value_boolean(preset_dict_get_value(dict, "autoscale"));
2832- target = ghb_value_boolean(
2833- preset_dict_get_value(dict, "vquality_type_target"));
28342825 br = ghb_value_boolean(
28352826 preset_dict_get_value(dict, "vquality_type_bitrate"));
28362827 constant = ghb_value_boolean(
@@ -2844,12 +2835,8 @@ export_xlat_preset(GValue *dict)
28442835 ghb_int_value_new(1));
28452836
28462837 // VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant
2847- if (target)
2848- {
2849- ghb_dict_insert(dict, g_strdup("VideoQualityType"),
2850- ghb_int_value_new(0));
2851- }
2852- else if (br)
2838+ // *note: target is no longer used
2839+ if (br)
28532840 {
28542841 ghb_dict_insert(dict, g_strdup("VideoQualityType"),
28552842 ghb_int_value_new(1));