]> granicus.if.org Git - handbrake/commitdiff
MacGui: Fix the DTS source audio mixdown for an attempted AC3 passthru audio track
authordynaflash <dynaflashtech@gmail.com>
Mon, 7 Apr 2008 14:35:35 +0000 (14:35 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Mon, 7 Apr 2008 14:35:35 +0000 (14:35 +0000)
- Since AC3 Passthru will not work with a DTS audio source track, we us mp3 dpl2 for avi and aac dpl2 for mkv and mp4.
- Revert HandBrake.plist to pre 1385 as it was errantly checked in with that commit.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1386 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.mm
macosx/HandBrake.plist

index 66fd95b9d9e8e9ff3ce078c39af98e394f739e01..2f7b52273ce857cd553bd47112e0785bb7d2f299 100644 (file)
@@ -2825,6 +2825,8 @@ the user is using "Custom" settings by determining the sender*/
     /* enable/disable the mixdown text and popupbutton for audio track 1 */
     [fAudTrack1CodecPopUp setEnabled: ([fAudLang1PopUp indexOfSelectedItem] == 0) ? NO : YES];
     [fAudTrack1MixPopUp setEnabled: ([fAudLang1PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack1RatePopUp setEnabled: ([fAudLang1PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack1BitratePopUp setEnabled: ([fAudLang1PopUp indexOfSelectedItem] == 0) ? NO : YES];
     if ([fAudLang1PopUp indexOfSelectedItem] == 0)
     {
         [fAudTrack1CodecPopUp removeAllItems];
@@ -2836,6 +2838,8 @@ the user is using "Custom" settings by determining the sender*/
     /* enable/disable the mixdown text and popupbutton for audio track 2 */
     [fAudTrack2CodecPopUp setEnabled: ([fAudLang2PopUp indexOfSelectedItem] == 0) ? NO : YES];
     [fAudTrack2MixPopUp setEnabled: ([fAudLang2PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack2RatePopUp setEnabled: ([fAudLang2PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack2BitratePopUp setEnabled: ([fAudLang2PopUp indexOfSelectedItem] == 0) ? NO : YES];
     if ([fAudLang2PopUp indexOfSelectedItem] == 0)
     {
         [fAudTrack2CodecPopUp removeAllItems];
@@ -2847,6 +2851,8 @@ the user is using "Custom" settings by determining the sender*/
     /* enable/disable the mixdown text and popupbutton for audio track 3 */
     [fAudTrack3CodecPopUp setEnabled: ([fAudLang3PopUp indexOfSelectedItem] == 0) ? NO : YES];
     [fAudTrack3MixPopUp setEnabled: ([fAudLang3PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack3RatePopUp setEnabled: ([fAudLang3PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack3BitratePopUp setEnabled: ([fAudLang3PopUp indexOfSelectedItem] == 0) ? NO : YES];
     if ([fAudLang3PopUp indexOfSelectedItem] == 0)
     {
         [fAudTrack3CodecPopUp removeAllItems];
@@ -2858,6 +2864,8 @@ the user is using "Custom" settings by determining the sender*/
     /* enable/disable the mixdown text and popupbutton for audio track 4 */
     [fAudTrack4CodecPopUp setEnabled: ([fAudLang4PopUp indexOfSelectedItem] == 0) ? NO : YES];
     [fAudTrack4MixPopUp setEnabled: ([fAudLang4PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack4RatePopUp setEnabled: ([fAudLang4PopUp indexOfSelectedItem] == 0) ? NO : YES];
+    [fAudTrack4BitratePopUp setEnabled: ([fAudLang4PopUp indexOfSelectedItem] == 0) ? NO : YES];
     if ([fAudLang4PopUp indexOfSelectedItem] == 0)
     {
         [fAudTrack4CodecPopUp removeAllItems];
@@ -3256,8 +3264,24 @@ the user is using "Custom" settings by determining the sender*/
                 [mixdownPopUp selectItemWithTag: useMixdown];
 
             }
-         /* Setup our samplerate and bitrate popups we will need based on mixdown */
-        [self audioTrackMixdownChanged: mixdownPopUp];        
+            /* In the case of a DTS source track and the user trying AC3 Passthru (which does not work)
+             * we force the Audio Codec choice back to a workable codec. We use MP3 for avi and aac for all
+             * other containers.
+             */
+            if (audio->in.codec == HB_ACODEC_DCA && [[audiocodecPopUp selectedItem] tag] == HB_ACODEC_AC3)
+            {
+                /* If we are using the avi container, we select MP3 as there is no aac available*/
+                if ([[fDstFormatPopUp selectedItem] tag] == HB_MUX_AVI)
+                {
+                    [audiocodecPopUp selectItemWithTag: HB_ACODEC_LAME];
+                }
+                else
+                {
+                    [audiocodecPopUp selectItemWithTag: HB_ACODEC_FAAC];
+                }
+            }
+            /* Setup our samplerate and bitrate popups we will need based on mixdown */
+            [self audioTrackMixdownChanged: mixdownPopUp];            
         }
     
     }
@@ -3406,7 +3430,6 @@ the user is using "Custom" settings by determining the sender*/
     */
     [sampleratePopUp selectItemWithTitle: @"48"];
     
-    
     /* Since AC3 Pass Thru uses the input ac3 bitrate and a sample rate of 48, we get the input tracks
     * bitrate and dispay it in the bitrate popup even though libhb happily ignores any bitrate input from
     * the gui. We do this for better user feedback in the audio tab as well as the queue for the most part
index 95c1319030ff014ff07a0972ef5d3fb9a170d819..1dc46b0e5c897f34b75745d212db4b86ff045afc 100644 (file)
@@ -9,7 +9,7 @@
        <key>CFBundleExecutable</key>
        <string>HandBrake</string>
        <key>CFBundleGetInfoString</key>
-       <string>0.9.3svn1377</string>
+       <string>0.9.2</string>
        <key>CFBundleIconFile</key>
        <string>HandBrake</string>
        <key>CFBundleIdentifier</key>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>0.9.3svn1377</string>
+       <string>0.9.2</string>
        <key>CFBundleSignature</key>
        <string>HB##</string>
        <key>CFBundleVersion</key>
-       <string>2008040401</string>
+       <string>2008021900</string>
        <key>NSHumanReadableCopyright</key>
        <string>HandBrake Devs</string>
        <key>NSMainNibFile</key>