OSDN Git Service

MacGui: include deep scan ( subtitle foreign language search) pass information in...
authordynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 30 Jun 2009 20:00:42 +0000 (20:00 +0000)
committerdynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 30 Jun 2009 20:00:42 +0000 (20:00 +0000)
- Also removed one queue increment debug log line

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

macosx/Controller.mm
macosx/HBQueueController.mm

index faeb0cc..712622a 100644 (file)
@@ -719,7 +719,6 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
        if( checkScanCount > currentScanCount )
        {
                currentScanCount = checkScanCount;
-        [self writeToActivityLog:"currentScanCount received from fQueueEncodeLibhb"];
        }
     
     //hb_state_t s;
@@ -759,8 +758,25 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
         case HB_STATE_WORKING:
         {
             NSMutableString * string;
+            NSString * pass_desc;
                        /* Update text field */
-                       string = [NSMutableString stringWithFormat: NSLocalizedString( @"Encoding: pass %d of %d, %.2f %%", @"" ), p.job_cur, p.job_count, 100.0 * p.progress];
+            if (p.job_cur == 1 && p.job_count > 1)
+            {
+                if ([[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"SubtitleList"] && [[[[[QueueFileArray objectAtIndex:currentQueueEncodeIndex]objectForKey:@"SubtitleList"] objectAtIndex:0] objectForKey:@"subtitleSourceTrackNum"] intValue] == 1)
+                {
+                    pass_desc = @"(subtitle scan)";   
+                }
+                else
+                {
+                    pass_desc = @"";
+                }
+            }
+            else
+            {
+                pass_desc = @"";
+            }
+            
+                       string = [NSMutableString stringWithFormat: NSLocalizedString( @"Encoding: pass %d %@ of %d, %.2f %%", @"" ), p.job_cur, pass_desc, p.job_count, 100.0 * p.progress];
             
                        if( p.seconds > -1 )
             {
index 3a53192..02e408f 100644 (file)
@@ -967,20 +967,25 @@ return ![(HBQueueOutlineView*)outlineView isDragging];
         [NSString stringWithFormat:@"Chapter %d", [[item objectForKey:@"ChapterStart"] intValue]] :
         [NSString stringWithFormat:@"Chapters %d through %d", [[item objectForKey:@"ChapterStart"] intValue], [[item objectForKey:@"ChapterEnd"] intValue]];
         
-        NSString * passesString;
+        NSString * passesString = @"";
+        /* check to see if our first subtitle track is Foreign Language Search, in which case there is an in depth scan */
+        if ([item objectForKey:@"SubtitleList"] && [[[[item objectForKey:@"SubtitleList"] objectAtIndex:0] objectForKey:@"subtitleSourceTrackNum"] intValue] == 1)
+        {
+          passesString = [passesString stringByAppendingString:@"1 Foreign Language Search Pass - "];
+        }
         if ([[item objectForKey:@"VideoTwoPass"] intValue] == 0)
         {
-            passesString = [NSString stringWithFormat:@"1 Video Pass"];
+            passesString = [passesString stringByAppendingString:@"1 Video Pass"];
         }
         else
         {
             if ([[item objectForKey:@"VideoTurboTwoPass"] intValue] == 1)
             {
-                passesString = [NSString stringWithFormat:@"2 Video Passes Turbo"];
+                passesString = [passesString stringByAppendingString:@"2 Video Passes First Turbo"];
             }
             else
             {
-                passesString = [NSString stringWithFormat:@"2 Video Passes"];
+                passesString = [passesString stringByAppendingString:@"2 Video Passes"];
             }
         }