]> granicus.if.org Git - handbrake/commitdiff
MacGui: remove the public hb_state property in HBCore, fix a bug in HBVideo and chang...
authorritsuka <damiog@gmail.com>
Tue, 20 Jan 2015 07:59:31 +0000 (07:59 +0000)
committerritsuka <damiog@gmail.com>
Tue, 20 Jan 2015 07:59:31 +0000 (07:59 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6777 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/HBCore.h
macosx/HBCore.m
macosx/HBJob+UIAdditions.m
macosx/HBVideo.m

index 94bdfe05ac84da464d1b302d0d04ef613dff72ae..8a417af9a9d494a366d270cd3bf379cb985b80a2 100644 (file)
@@ -60,11 +60,6 @@ typedef void (^HBCoreCompletationHandler)(BOOL success);
  */
 @property (nonatomic, readonly) HBState state;
 
-/**
- * Pointer to a hb_state_s struct containing the detailed state information of libhb.
- */
-@property (nonatomic, readonly) hb_state_t *hb_state;
-
 /**
  * Pointer to a libhb handle used by this HBCore instance.
  */
index e3cf37d478cfbcff28cfced25ca336f193c5bc9d..4b0f0f3c30ed0e5688f58d825040c4b315b35cb0 100644 (file)
@@ -17,6 +17,9 @@
  */
 @interface HBCore ()
 
+/// Pointer to a hb_state_s struct containing the detailed state information of libhb.
+@property (nonatomic, readonly) hb_state_t *hb_state;
+
 /// Current state of HBCore.
 @property (nonatomic, readwrite) HBState state;
 
index 1f941e5df503085850a5a618cfe337fe4b9e7b67..d35565d79c277e5a2c8e5b91d2ca3a62bd360444 100644 (file)
@@ -115,8 +115,8 @@ static NSDictionary            *shortHeightAttr;
         {
             // Start Stop is chapters
             startStopString = (self.range.chapterStart == self.range.chapterStop) ?
-            [NSString stringWithFormat:@"Chapter %d", self.range.chapterStart] :
-            [NSString stringWithFormat:@"Chapters %d through %d", self.range.chapterStart, self.range.chapterStop];
+            [NSString stringWithFormat:@"Chapter %d", self.range.chapterStart + 1] :
+            [NSString stringWithFormat:@"Chapters %d through %d", self.range.chapterStart + 1, self.range.chapterStop + 1];
         }
         else if (self.range.type == HBRangeTypeSeconds)
         {
@@ -338,7 +338,7 @@ static NSDictionary            *shortHeightAttr;
                     encoderPresetInfo = [encoderPresetInfo stringByAppendingString: [NSString stringWithFormat:@" - Level: %@", self.video.level]];
                 }
             }
-            [finalString appendString: @"Encoder Options: " withAttributes:detailBoldAttr];
+            [finalString appendString: @"Video Options: " withAttributes:detailBoldAttr];
             [finalString appendString: encoderPresetInfo withAttributes:detailAttr];
             [finalString appendString:@"\n" withAttributes:detailAttr];
         }
@@ -361,11 +361,11 @@ static NSDictionary            *shortHeightAttr;
 
 
         // Seventh Line Audio Details
-        int audioDetailCount = 0;
-        for (NSString *anAudioDetail in audioDetails) {
-            audioDetailCount++;
-            if (anAudioDetail.length) {
-                [finalString appendString: [NSString stringWithFormat: @"Audio Track %d ", audioDetailCount] withAttributes: detailBoldAttr];
+        for (NSString *anAudioDetail in audioDetails)
+        {
+            if (anAudioDetail.length)
+            {
+                [finalString appendString: [NSString stringWithFormat: @"Audio: "] withAttributes: detailBoldAttr];
                 [finalString appendString: anAudioDetail withAttributes: detailAttr];
                 [finalString appendString: @"\n" withAttributes: detailAttr];
             }
index b9e4b44358b1808f0e02a87f316143b227ca7af6..b719f4e7bfbf739b0123c4ab2d33c0b6a89d5d4f 100644 (file)
@@ -195,7 +195,14 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
 - (void)setVideoOptionExtra:(NSString *)videoOptionExtra
 {
     [_videoOptionExtra autorelease];
-    _videoOptionExtra = [videoOptionExtra copy];
+    if (videoOptionExtra != nil)
+    {
+        _videoOptionExtra = [videoOptionExtra copy];
+    }
+    else
+    {
+        _videoOptionExtra = @"";
+    }
     [self postChangedNotification];
 }