githubのコードからのfolk
Revision | 75a84adcf721b5965c63f78984b8a624dddf6c0c (tree) |
---|---|
Time | 2011-02-26 09:04:39 |
Author | jstebbins <jstebbins@b64f...> |
Commiter | jstebbins |
LinGui: remove target file size option
git-svn-id: svn://localhost/HandBrake/trunk@3808 b64f7644-9d1e-0410-96f1-a4d463321fa5
@@ -1491,11 +1491,6 @@ title_changed_cb(GtkWidget *widget, signal_user_data_t *ud) | ||
1491 | 1491 | ghb_adjust_audio_rate_combos(ud); |
1492 | 1492 | ghb_set_pref_audio(titleindex, ud); |
1493 | 1493 | 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 | - } | |
1499 | 1494 | |
1500 | 1495 | // Unfortunately, there is no way to query how many frames were |
1501 | 1496 | // actually generated during the scan. |
@@ -1672,24 +1667,6 @@ vcodec_changed_cb(GtkWidget *widget, signal_user_data_t *ud) | ||
1672 | 1667 | } |
1673 | 1668 | |
1674 | 1669 | 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 | |
1693 | 1670 | start_point_changed_cb(GtkWidget *widget, signal_user_data_t *ud) |
1694 | 1671 | { |
1695 | 1672 | gint start, end; |
@@ -1920,49 +1920,11 @@ FFmpeg's and Theora's scale is more linear. These encoders do not have a lossle | ||
1920 | 1920 | </packing> |
1921 | 1921 | </child> |
1922 | 1922 | <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> | |
1961 | 1923 | <object class="GtkCheckButton" id="VideoTwoPass"> |
1962 | 1924 | <property name="visible">True</property> |
1963 | 1925 | <property name="can_focus">True</property> |
1964 | 1926 | <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> | |
1966 | 1928 | <property name="label" translatable="yes">2-Pass Encoding</property> |
1967 | 1929 | <property name="draw_indicator">True</property> |
1968 | 1930 | <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 | ||
1970 | 1932 | <packing> |
1971 | 1933 | <property name="left_attach">0</property> |
1972 | 1934 | <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> | |
1975 | 1937 | <property name="y_options">GTK_FILL</property> |
1976 | 1938 | <property name="x_options">GTK_FILL</property> |
1977 | 1939 | </packing> |
@@ -1997,8 +1959,8 @@ FFmpeg's and Theora's scale is more linear. These encoders do not have a lossle | ||
1997 | 1959 | <packing> |
1998 | 1960 | <property name="left_attach">0</property> |
1999 | 1961 | <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> | |
2002 | 1964 | <property name="y_options">GTK_FILL</property> |
2003 | 1965 | <property name="x_options">GTK_FILL</property> |
2004 | 1966 | </packing> |
@@ -3856,24 +3856,6 @@ set_preview_job_settings(hb_job_t *job, GValue *settings) | ||
3856 | 3856 | } |
3857 | 3857 | } |
3858 | 3858 | |
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 | - | |
3877 | 3859 | gboolean |
3878 | 3860 | ghb_validate_filter_string(const gchar *str, gint max_fields) |
3879 | 3861 | { |
@@ -4702,17 +4684,6 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex) | ||
4702 | 4684 | hb_audio_add( job, &audio ); |
4703 | 4685 | tcount++; |
4704 | 4686 | } |
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 | - } | |
4716 | 4687 | |
4717 | 4688 | dest_str = ghb_settings_get_string(js, "destination"); |
4718 | 4689 | job->file = dest_str; |
@@ -156,7 +156,6 @@ gchar* ghb_build_x264opts_string(GValue *settings); | ||
156 | 156 | GdkPixbuf* ghb_get_preview_image( |
157 | 157 | gint titleindex, gint index, signal_user_data_t *ud, |
158 | 158 | gint *width, gint *height); |
159 | -gint ghb_calculate_target_bitrate(GValue *settings, gint titleindex); | |
160 | 159 | gchar* ghb_dvd_volname(const gchar *device); |
161 | 160 | gint ghb_get_title_number(gint titleindex); |
162 | 161 | gint ghb_subtitle_track_source(signal_user_data_t *ud, gint track); |
@@ -104,8 +104,6 @@ | ||
104 | 104 | <false /> |
105 | 105 | <key>vquality_type_constant</key> |
106 | 106 | <false /> |
107 | - <key>vquality_type_target</key> | |
108 | - <false /> | |
109 | 107 | <key>SrtLanguage</key> |
110 | 108 | <string>und</string> |
111 | 109 | <key>SrtCodeset</key> |
@@ -212,8 +210,6 @@ | ||
212 | 210 | <false /> |
213 | 211 | <key>vquality_type_constant</key> |
214 | 212 | <false /> |
215 | - <key>vquality_type_target</key> | |
216 | - <false /> | |
217 | 213 | <key>VideoFramerateCFR</key> |
218 | 214 | <false /> |
219 | 215 | <key>VideoFrameratePFR</key> |
@@ -21,7 +21,6 @@ dep_map = ( | ||
21 | 21 | DepEntry("angle_count", "angle", "1", True, True), |
22 | 22 | DepEntry("angle_count", "angle_label", "1", True, True), |
23 | 23 | DepEntry("vquality_type_bitrate", "VideoAvgBitrate", "TRUE", False, False), |
24 | - DepEntry("vquality_type_target", "VideoTargetSize", "TRUE", False, False), | |
25 | 24 | DepEntry("vquality_type_constant", "VideoQualitySlider", "TRUE", False, False), |
26 | 25 | DepEntry("vquality_type_constant", "VideoTwoPass", "TRUE", True, False), |
27 | 26 | DepEntry("vquality_type_constant", "VideoTurboTwoPass", "TRUE", True, False), |
@@ -2643,21 +2643,18 @@ import_xlat_preset(GValue *dict) | ||
2643 | 2643 | } break; |
2644 | 2644 | } |
2645 | 2645 | // VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant |
2646 | + // *note: target is no longer used | |
2646 | 2647 | switch (vqtype) |
2647 | 2648 | { |
2648 | 2649 | case 0: |
2649 | 2650 | { |
2650 | - ghb_dict_insert(dict, g_strdup("vquality_type_target"), | |
2651 | - ghb_boolean_value_new(TRUE)); | |
2652 | 2651 | ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"), |
2653 | - ghb_boolean_value_new(FALSE)); | |
2652 | + ghb_boolean_value_new(TRUE)); | |
2654 | 2653 | ghb_dict_insert(dict, g_strdup("vquality_type_constant"), |
2655 | 2654 | ghb_boolean_value_new(FALSE)); |
2656 | 2655 | } break; |
2657 | 2656 | case 1: |
2658 | 2657 | { |
2659 | - ghb_dict_insert(dict, g_strdup("vquality_type_target"), | |
2660 | - ghb_boolean_value_new(FALSE)); | |
2661 | 2658 | ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"), |
2662 | 2659 | ghb_boolean_value_new(TRUE)); |
2663 | 2660 | ghb_dict_insert(dict, g_strdup("vquality_type_constant"), |
@@ -2665,8 +2662,6 @@ import_xlat_preset(GValue *dict) | ||
2665 | 2662 | } break; |
2666 | 2663 | case 2: |
2667 | 2664 | { |
2668 | - ghb_dict_insert(dict, g_strdup("vquality_type_target"), | |
2669 | - ghb_boolean_value_new(FALSE)); | |
2670 | 2665 | ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"), |
2671 | 2666 | ghb_boolean_value_new(FALSE)); |
2672 | 2667 | ghb_dict_insert(dict, g_strdup("vquality_type_constant"), |
@@ -2674,8 +2669,6 @@ import_xlat_preset(GValue *dict) | ||
2674 | 2669 | } break; |
2675 | 2670 | default: |
2676 | 2671 | { |
2677 | - ghb_dict_insert(dict, g_strdup("vquality_type_target"), | |
2678 | - ghb_boolean_value_new(FALSE)); | |
2679 | 2672 | ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"), |
2680 | 2673 | ghb_boolean_value_new(FALSE)); |
2681 | 2674 | ghb_dict_insert(dict, g_strdup("vquality_type_constant"), |
@@ -2825,12 +2818,10 @@ import_xlat_presets(GValue *presets) | ||
2825 | 2818 | static void |
2826 | 2819 | export_xlat_preset(GValue *dict) |
2827 | 2820 | { |
2828 | - gboolean autoscale, target, br, constant; | |
2821 | + gboolean autoscale, br, constant; | |
2829 | 2822 | |
2830 | 2823 | g_debug("export_xlat_prest ()"); |
2831 | 2824 | autoscale = ghb_value_boolean(preset_dict_get_value(dict, "autoscale")); |
2832 | - target = ghb_value_boolean( | |
2833 | - preset_dict_get_value(dict, "vquality_type_target")); | |
2834 | 2825 | br = ghb_value_boolean( |
2835 | 2826 | preset_dict_get_value(dict, "vquality_type_bitrate")); |
2836 | 2827 | constant = ghb_value_boolean( |
@@ -2844,12 +2835,8 @@ export_xlat_preset(GValue *dict) | ||
2844 | 2835 | ghb_int_value_new(1)); |
2845 | 2836 | |
2846 | 2837 | // 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) | |
2853 | 2840 | { |
2854 | 2841 | ghb_dict_insert(dict, g_strdup("VideoQualityType"), |
2855 | 2842 | ghb_int_value_new(1)); |