OSDN Git Service

LinGui: Remove restriction on ac3 passthru when mp4 http optimize is enabled.
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 2 Nov 2008 15:44:35 +0000 (15:44 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 2 Nov 2008 15:44:35 +0000 (15:44 +0000)
These are no longer incompatible options.

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

gtk/src/hb-backend.c
gtk/src/hb-backend.h
gtk/src/queuehandler.c

index 8873224..6d5bf91 100644 (file)
@@ -798,6 +798,7 @@ get_acodec_value(gint val)
        return value;
 }
 
+#if 0
 static GValue*
 get_abitrate_value(gint val)
 {
@@ -814,6 +815,7 @@ get_abitrate_value(gint val)
        }
        return value;
 }
+#endif
 
 static GValue*
 get_amix_value(gint val)
@@ -936,7 +938,6 @@ ghb_grey_combo_options(GtkBuilder *builder)
 {
        GtkWidget *widget;
        gint container, track, titleindex, acodec;
-       gboolean httpopt;
     hb_audio_config_t *audio = NULL;
        GValue *gval;
        
@@ -953,8 +954,6 @@ ghb_grey_combo_options(GtkBuilder *builder)
        gval = ghb_widget_value(widget);
        container = ghb_lookup_combo_int("FileFormat", gval);
        ghb_value_free(gval);
-       widget = GHB_WIDGET (builder, "Mp4HttpOptimize");
-       httpopt = ghb_widget_boolean(widget);
 
        grey_combo_box_item(builder, "x264_analyse", 3, TRUE);
        grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_FAAC, FALSE);
@@ -962,9 +961,7 @@ ghb_grey_combo_options(GtkBuilder *builder)
        grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_VORBIS, FALSE);
 
        gboolean allow_ac3 = TRUE;
-       allow_ac3 = 
-               !(container == HB_MUX_MP4 && httpopt) &&
-               (container != HB_MUX_OGM);
+       allow_ac3 = (container != HB_MUX_OGM);
 
        if (allow_ac3)
        {
@@ -2613,56 +2610,6 @@ ghb_validate_video(signal_user_data_t *ud)
 }
 
 gboolean
-ghb_validate_container(signal_user_data_t *ud)
-{
-       gint container;
-       gchar *message;
-
-       container = ghb_settings_combo_int(ud->settings, "FileFormat");
-       if (container == HB_MUX_MP4)
-       {
-               const GValue *audio_list;
-               gboolean httpopt;
-
-               audio_list = ghb_settings_get_value(ud->settings, "audio_list");
-               httpopt = ghb_settings_get_boolean(ud->settings, "Mp4HttpOptimize");
-               if (httpopt && ghb_ac3_in_audio_list(audio_list))
-               {
-                       message = g_strdup_printf(
-                                       "AC3 audio in HTTP optimized MP4 is not supported.\n\n"
-                                       "You should choose a different audio codec.\n"
-                                       "If you continue, FAAC will be chosen for you.");
-                       if (!ghb_message_dialog(GTK_MESSAGE_WARNING, message, "Cancel", "Continue"))
-                       {
-                               g_free(message);
-                               return FALSE;
-                       }
-                       g_free(message);
-
-                       gint count, ii;
-
-                       count = ghb_array_len(audio_list);
-                       for (ii = 0; ii < count; ii++)
-                       {
-                               GValue *asettings;
-
-                               asettings = ghb_array_get_nth(audio_list, ii);
-                               gint acodec = ghb_settings_combo_int(asettings, "AudioEncoder");
-                               if (acodec == HB_ACODEC_AC3)
-                               {
-                                       GValue *value;
-                                       value = get_acodec_value(HB_ACODEC_FAAC);
-                                       ghb_settings_take_value(asettings, "AudioEncoder", value);
-                                       value = get_abitrate_value(160);
-                                       ghb_settings_take_value(asettings, "AudioBitrate", value);
-                               }
-                       }
-               }
-       }
-       return TRUE;
-}
-
-gboolean
 ghb_validate_audio(signal_user_data_t *ud)
 {
        hb_list_t  * list;
index baeded2..48e85a9 100644 (file)
@@ -129,7 +129,6 @@ gint ghb_calculate_target_bitrate(GValue *settings, gint titleindex);
 gchar* ghb_dvd_volname(const gchar *device);
 gint ghb_get_title_number(gint titleindex);
 
-gboolean ghb_validate_container(signal_user_data_t *ud);
 gboolean ghb_validate_vquality(GValue *settings);
 gboolean ghb_validate_audio(signal_user_data_t *ud);
 gboolean ghb_validate_video(signal_user_data_t *ud);
index 5f9b36b..f8687b7 100644 (file)
@@ -585,11 +585,6 @@ validate_settings(signal_user_data_t *ud)
        {
                return FALSE;
        }
-       // Validate container settings
-       if (!ghb_validate_container(ud))
-       {
-               return FALSE;
-       }
        // Validate filter settings
        if (!ghb_validate_filters(ud))
        {