OSDN Git Service

MacGui: add HB_AMIXDOWN_AC3 to HB QueueController so it reports the new hybrid sound...
[handbrake-jp/handbrake-jp-git.git] / macosx / HBQueueController.mm
index 75095af..594bce0 100644 (file)
@@ -156,11 +156,36 @@ static NSDictionary* _shortHeightAttribute = NULL;
         titleHeight = job->title->height;
         if (job->subtitle >= 0)
         {
-            hb_subtitle_t * aSubtitle = (hb_subtitle_t *) hb_list_item(job->title->list_subtitle, 0);
+            hb_subtitle_t * aSubtitle = (hb_subtitle_t *) hb_list_item(job->title->list_subtitle, job->subtitle);
             if (aSubtitle)
                 subtitleLang = [[NSString stringWithUTF8String:aSubtitle->lang] retain];
         }
 
+        // Calculate and store output dimensions and anamorphic dimensions
+        if (pixel_ratio == 1) // Original PAR Implementation, now called Strict Anamorphic
+        {
+            output_width = titleWidth - crop[2] - crop[3];
+            output_height = titleHeight - crop[0] - crop[1];
+            anamorphic_width = output_width * pixel_aspect_width / pixel_aspect_height;
+            anamorphic_height = output_height;
+        }
+        else if (pixel_ratio == 2) // Loose Anamorphic
+        {
+            // call hb_set_anamorphic_size to do a "dry run" to get the values to be
+            // used by libhb for loose anamorphic.
+            int par_width, par_height;
+            hb_set_anamorphic_size(job, &output_width, &output_height, &par_width, &par_height);
+            anamorphic_width = output_width * par_width / par_height;
+            anamorphic_height = output_height;
+        }
+        else    // No Anamorphic
+        {
+            output_width = width;
+            output_height = height;
+            anamorphic_width = 0;       // not needed for this case
+            anamorphic_height = 0;      // not needed for this case
+        }
+        
     }
     return self;
 }
@@ -400,17 +425,12 @@ static NSDictionary* _shortHeightAttribute = NULL;
     if (withPictureInfo)
     {
         NSString * jobPictureInfo;
-        // integers for picture values deinterlace, crop[4], keep_ratio, grayscale, pixel_ratio, pixel_aspect_width, pixel_aspect_height,
-        // maxWidth, maxHeight
-        if (pixel_ratio == 1)
-        {
-            int croppedWidth = titleWidth - crop[2] - crop[3];
-            int displayparwidth = croppedWidth * pixel_aspect_width / pixel_aspect_height;
-            int displayparheight = titleHeight - crop[0] - crop[1];
-            jobPictureInfo = [NSString stringWithFormat:@"%dx%d (%dx%d Anamorphic)", displayparwidth, displayparheight, width, displayparheight];
-        }
+        if (pixel_ratio == 1) // Original PAR Implementation, now called Strict Anamorphic
+            jobPictureInfo = [NSString stringWithFormat:@"%d x %d (%d x %d Strict Anamorphic)", output_width, output_height, anamorphic_width, anamorphic_height];
+        else if (pixel_ratio == 2) // Loose Anamorphic
+            jobPictureInfo = [NSString stringWithFormat:@"%d x %d (%d x %d Loose Anamorphic)", output_width, output_height, anamorphic_width, anamorphic_height];
         else
-            jobPictureInfo = [NSString stringWithFormat:@"%dx%d", width, height];
+            jobPictureInfo = [NSString stringWithFormat:@"%d x %d", output_width, output_height];
         if (keep_ratio == 1)
             jobPictureInfo = [jobPictureInfo stringByAppendingString:@" Keep Aspect Ratio"];
         
@@ -497,8 +517,9 @@ static NSDictionary* _shortHeightAttribute = NULL;
                 jobAudioInfo = [jobAudioInfo stringByAppendingString:[NSString stringWithFormat:@", Track %d: Dolby Surround", ai + 1]];
             if (audio_mixdowns[ai] == HB_AMIXDOWN_DOLBYPLII)
                 jobAudioInfo = [jobAudioInfo stringByAppendingString:[NSString stringWithFormat:@", Track %d: Dolby Pro Logic II", ai + 1]];
-            if (audio_mixdowns[ai] == HB_AMIXDOWN_6CH)
-                jobAudioInfo = [jobAudioInfo stringByAppendingString:[NSString stringWithFormat:@", Track %d: 6-channel discreet", ai + 1]];
+            if (audio_mixdowns[ai] == HB_AMIXDOWN_AC3)
+                jobAudioInfo = [jobAudioInfo stringByAppendingString:[NSString stringWithFormat:@", Pass-Through", ai + 1]];
+                
         }
         if (withIcon)   // implies indent the info
             [finalString appendString: @"\t" withAttributes:detailBoldAttr];
@@ -508,7 +529,7 @@ static NSDictionary* _shortHeightAttribute = NULL;
     
     if (withSubtitleInfo)
     {
-        // subtitle can == -1 in two cases:
+        // subtitle scan == -1 in two cases:
         // autoselect: when pass == -1
         // none: when pass != -1
         if ((subtitle == -1) && (pass == -1))