]> granicus.if.org Git - handbrake/commitdiff
MacGui: fix a few warnings when building in Xcode 11.
authorDamiano Galassi <damiog@gmail.com>
Fri, 13 Sep 2019 10:52:20 +0000 (12:52 +0200)
committerDamiano Galassi <damiog@gmail.com>
Fri, 13 Sep 2019 10:52:20 +0000 (12:52 +0200)
13 files changed:
libhb/platform/macosx/encca_aac.c
macosx/HBOutputPanelController.m
macosx/HBPicture.m
macosx/HBQueueItem.m
macosx/HBRange.m
macosx/HBTitle.m
macosx/HBVideo.m
macosx/HandBrake.xcodeproj/project.pbxproj
macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake-Debug-Sandbox.xcscheme
macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake-Debug.xcscheme
macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake-Distribution.xcscheme
macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake-Release-Sandbox.xcscheme
macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake-Release.xcscheme

index 5c108cba436c997a642efa78a8d3be0b7a085d0f..e29d12d1708de9db7917ee3758eaeaafb640d186 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "handbrake/handbrake.h"
 #include "handbrake/audio_remap.h"
+#include "handbrake/hbffmpeg.h"
 #include <AudioToolbox/AudioToolbox.h>
 #include <CoreAudio/CoreAudio.h>
 
index 3cfec6caaaedf870e9bd81f8230b7aa7809b59a4..7d9b8c66c1c51919cc1ceadf421d69f01ee287c1 100644 (file)
     [super showWindow:sender];
 }
 
+/**
+ Write the HandBrake version number to the log
+ */
 - (void)writeHeader
 {
-    // Lets report the HandBrake version number here to the activity log and text log file
     NSDictionary *infoDict = NSBundle.mainBundle.infoDictionary;
     NSString *versionStringFull = [NSString stringWithFormat:@"Handbrake Version: %@ (%@)", infoDict[@"CFBundleShortVersionString"], infoDict[@"CFBundleVersion"]];
     [HBUtilities writeToActivityLog:"%s", versionStringFull.UTF8String];
  */
 - (IBAction)openActivityLogFile:(id)sender
 {
-    // Opens the activity window log file in the users default text editor
     [NSWorkspace.sharedWorkspace openURL:self.outputFile.url];
 }
 
index a623d96001f106ff53cf6a5d68c6bf4d8fb81f1d..113a771427ee9a6a39123d8c5a3ce250ec6d7ca9 100644 (file)
@@ -571,7 +571,7 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification";
     encodeInt(_height);
 
     encodeBool(_keepDisplayAspect);
-    encodeInt(_anamorphicMode);
+    encodeInteger(_anamorphicMode);
     encodeInt(_modulus);
 
     encodeInt(_displayWidth);
@@ -603,7 +603,7 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification";
     decodeInt(_height); if (_height < 0) { goto fail; }
 
     decodeBool(_keepDisplayAspect);
-    decodeInt(_anamorphicMode);
+    decodeInteger(_anamorphicMode);
     if (_anamorphicMode < HBPictureAnarmophicModeNone || _anamorphicMode > HBPictureAnarmophicModeAuto)
     {
         goto fail;
index b8feb4b0e12968cdd0d7e4c9f6ebe626966ac7df..6915d61ddbbf1d73c3117abf9bdb285c6c39f1f0 100644 (file)
@@ -230,7 +230,7 @@ static NSString *versionKey = @"HBQueueItemVersion";
 - (void)encodeWithCoder:(nonnull NSCoder *)coder
 {
     [coder encodeInt:1 forKey:versionKey];
-    encodeInt(_state);
+    encodeInteger(_state);
     encodeObject(_job);
     encodeObject(_uuid);
 
@@ -251,7 +251,7 @@ static NSString *versionKey = @"HBQueueItemVersion";
 
     if (version == 1 && (self = [super init]))
     {
-        decodeInt(_state); if (_state < HBQueueItemStateReady || _state > HBQueueItemStateFailed) { goto fail; }
+        decodeInteger(_state); if (_state < HBQueueItemStateReady || _state > HBQueueItemStateFailed) { goto fail; }
         decodeObjectOrFail(_job, HBJob);
         decodeObjectOrFail(_uuid, NSString);
 
index 5a8d9d27a12d699e2ed9a2db9cc35be54a6bd62f..26b354395afce3d98f636831893962609c938659 100644 (file)
@@ -12,8 +12,6 @@ NSString *HBRangeChangedNotification = @"HBRangeChangedNotification";
 
 @implementation HBRange
 
-#pragma mark - NSCoding
-
 - (instancetype)initWithTitle:(HBTitle *)title
 {
     self = [super init];
@@ -193,7 +191,7 @@ NSString *HBRangeChangedNotification = @"HBRangeChangedNotification";
 {
     [coder encodeInt:1 forKey:@"HBRangeVersion"];
 
-    encodeInt(_type);
+    encodeInteger(_type);
 
     encodeInt(_chapterStart);
     encodeInt(_chapterStop);
@@ -209,7 +207,7 @@ NSString *HBRangeChangedNotification = @"HBRangeChangedNotification";
 {
     self = [super init];
 
-    decodeInt(_type); if (_type < HBRangeTypeChapters || _type > HBRangePreviewIndex) { goto fail; }
+    decodeInteger(_type); if (_type < HBRangeTypeChapters || _type > HBRangePreviewIndex) { goto fail; }
     decodeInt(_chapterStart);  if (_chapterStart < 0) { goto fail; }
     decodeInt(_chapterStop);  if (_chapterStop < _chapterStart) { goto fail; }
 
index 895ef6fe8b044b6ece79dd098d59ec0316a95841..653b63b4ca2cfb65f2efc364b6f380d8a01725d1 100644 (file)
@@ -128,9 +128,8 @@ fail:
     if (self)
     {
         _displayName = [displayName copy];
-        _title = @"";
         _type = type;
-        _isoLanguageCode = @"";
+        _isoLanguageCode = @"und";
         _fileURL = fileURL;
     }
     return self;
index c062759e0c5aa53711d3766d396d9db32a6cef1e..cb4cca3b9ea986a84af3f6073df8d55e7926c15e 100644 (file)
@@ -499,7 +499,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
 
     encodeInt(_encoder);
 
-    encodeInt(_qualityType);
+    encodeInteger(_qualityType);
     encodeInt(_avgBitrate);
     encodeDouble(_quality);
 
@@ -507,7 +507,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
     encodeDouble(_qualityMaxValue);
 
     encodeInt(_frameRate);
-    encodeInt(_frameRateMode);
+    encodeInteger(_frameRateMode);
 
     encodeBool(_twoPass);
     encodeBool(_turboTwoPass);
@@ -528,7 +528,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
 
     decodeInt(_encoder);
 
-    decodeInt(_qualityType); if (_qualityType < HBVideoQualityTypeAvgBitrate || _qualityType > HBVideoQualityTypeConstantQuality) { goto fail; }
+    decodeInteger(_qualityType); if (_qualityType < HBVideoQualityTypeAvgBitrate || _qualityType > HBVideoQualityTypeConstantQuality) { goto fail; }
     decodeInt(_avgBitrate); if (_avgBitrate < 0) { goto fail; }
     decodeDouble(_quality);
 
@@ -536,7 +536,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
     decodeDouble(_qualityMaxValue);
 
     decodeInt(_frameRate); if (_frameRate < 0) { goto fail; }
-    decodeInt(_frameRateMode); if (_frameRateMode < HBVideoFrameRateModeVFR_PFR || _frameRateMode > HBVideoFrameRateModeCFR) { goto fail; }
+    decodeInteger(_frameRateMode); if (_frameRateMode < HBVideoFrameRateModeVFR_PFR || _frameRateMode > HBVideoFrameRateModeCFR) { goto fail; }
     decodeBool(_twoPass);
     decodeBool(_turboTwoPass);
 
index 2b30ed702e04831cbddfa7bb2069f2728e3377f6..a09bf0a66dd869b4949b6f3b98ca0dbce925f868 100644 (file)
                273F1FE014AD9DA40021BE6D /* Project object */ = {
                        isa = PBXProject;
                        attributes = {
-                               LastUpgradeCheck = 1010;
+                               LastUpgradeCheck = 1100;
                                TargetAttributes = {
                                        273F203814ADBC200021BE6D = {
                                                SystemCapabilities = {
                                        "\"$(EXTERNAL_BUILD)/libhb\"",
                                        "\"$(EXTERNAL_BUILD)/contrib/lib\"",
                                );
+                               PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrake;
                                PRODUCT_NAME = "$(TARGET_NAME)";
                                WRAPPER_EXTENSION = app;
                        };
                                        "\"$(EXTERNAL_BUILD)/libhb\"",
                                        "\"$(EXTERNAL_BUILD)/contrib/lib\"",
                                );
+                               PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrake;
                                PRODUCT_NAME = "$(TARGET_NAME)";
                                WRAPPER_EXTENSION = app;
                        };
                                        "\"$(EXTERNAL_BUILD)/libhb\"",
                                        "\"$(EXTERNAL_BUILD)/contrib/lib\"",
                                );
+                               PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrake;
                                PRODUCT_NAME = "$(TARGET_NAME)";
                                WRAPPER_EXTENSION = app;
                        };
                                        "\"$(EXTERNAL_BUILD)/libhb\"",
                                        "\"$(EXTERNAL_BUILD)/contrib/lib\"",
                                );
+                               PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrake;
                                PRODUCT_NAME = "$(TARGET_NAME)";
                                WRAPPER_EXTENSION = app;
                        };
index de32f36003ba37f3d6cfaafb5cb90be43f407e58..162a366eac4cc433af5f003120daf39113e6ff1d 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1010"
+   LastUpgradeVersion = "1100"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"
@@ -55,8 +55,6 @@
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
       <MacroExpansion>
          <BuildableReference
             BuildableIdentifier = "primary"
@@ -66,8 +64,8 @@
             ReferencedContainer = "container:HandBrake.xcodeproj">
          </BuildableReference>
       </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
+      <Testables>
+      </Testables>
    </TestAction>
    <LaunchAction
       buildConfiguration = "debug-sandbox"
@@ -89,8 +87,6 @@
             ReferencedContainer = "container:HandBrake.xcodeproj">
          </BuildableReference>
       </BuildableProductRunnable>
-      <AdditionalOptions>
-      </AdditionalOptions>
    </LaunchAction>
    <ProfileAction
       buildConfiguration = "debug-sandbox"
index 712b607dfe1539829b7560a129c3f64ce5bf957b..19705086612653906b82ed5d35f6bf86b3bce046 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1010"
+   LastUpgradeVersion = "1100"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       shouldUseLaunchSchemeArgsEnv = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "273F203814ADBC200021BE6D"
+            BuildableName = "HandBrake.app"
+            BlueprintName = "HandBrake"
+            ReferencedContainer = "container:HandBrake.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
       <Testables>
          <TestableReference
             skipped = "NO">
             </BuildableReference>
          </TestableReference>
       </Testables>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "273F203814ADBC200021BE6D"
-            BuildableName = "HandBrake.app"
-            BlueprintName = "HandBrake"
-            ReferencedContainer = "container:HandBrake.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
    </TestAction>
    <LaunchAction
       buildConfiguration = "debug"
@@ -85,8 +83,6 @@
             ReferencedContainer = "container:HandBrake.xcodeproj">
          </BuildableReference>
       </BuildableProductRunnable>
-      <AdditionalOptions>
-      </AdditionalOptions>
    </LaunchAction>
    <ProfileAction
       buildConfiguration = "debug"
index 4d31568c7c40a0a9a40a675914d75563a684da75..d2c005c918b441f93625ed3465905badc0ceb59f 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1010"
+   LastUpgradeVersion = "1100"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
       <MacroExpansion>
          <BuildableReference
             BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
             ReferencedContainer = "container:HandBrake.xcodeproj">
          </BuildableReference>
       </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
+      <Testables>
+      </Testables>
    </TestAction>
    <LaunchAction
       buildConfiguration = "release"
@@ -61,8 +59,6 @@
             ReferencedContainer = "container:HandBrake.xcodeproj">
          </BuildableReference>
       </BuildableProductRunnable>
-      <AdditionalOptions>
-      </AdditionalOptions>
    </LaunchAction>
    <ProfileAction
       buildConfiguration = "release"
index 1e04e9b67c329f2bab03ca4208c4776edd94daca..cd943e093158546f1537b15f299caff20a4aa8ab 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1010"
+   LastUpgradeVersion = "1100"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       shouldUseLaunchSchemeArgsEnv = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "273F1FFE14ADAE950021BE6D"
+            BuildableName = "HandBrakeCLI"
+            BlueprintName = "HandBrakeCLI"
+            ReferencedContainer = "container:HandBrake.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
       <Testables>
          <TestableReference
             skipped = "NO">
             </BuildableReference>
          </TestableReference>
       </Testables>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "273F1FFE14ADAE950021BE6D"
-            BuildableName = "HandBrakeCLI"
-            BlueprintName = "HandBrakeCLI"
-            ReferencedContainer = "container:HandBrake.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
    </TestAction>
    <LaunchAction
       buildConfiguration = "release-sandbox"
             ReferencedContainer = "container:HandBrake.xcodeproj">
          </BuildableReference>
       </BuildableProductRunnable>
-      <AdditionalOptions>
-      </AdditionalOptions>
    </LaunchAction>
    <ProfileAction
       buildConfiguration = "release-sandbox"
index 907022fea6c73a3bcd3f755954366e9b751a7c3c..ce3bfef8ef1bc5d26b39ebc59dc63728f3767bea 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1010"
+   LastUpgradeVersion = "1100"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       shouldUseLaunchSchemeArgsEnv = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "273F203814ADBC200021BE6D"
+            BuildableName = "HandBrake.app"
+            BlueprintName = "HandBrake"
+            ReferencedContainer = "container:HandBrake.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
       <Testables>
          <TestableReference
             skipped = "NO">
             </BuildableReference>
          </TestableReference>
       </Testables>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "273F203814ADBC200021BE6D"
-            BuildableName = "HandBrake.app"
-            BlueprintName = "HandBrake"
-            ReferencedContainer = "container:HandBrake.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
    </TestAction>
    <LaunchAction
       buildConfiguration = "release"
             ReferencedContainer = "container:HandBrake.xcodeproj">
          </BuildableReference>
       </BuildableProductRunnable>
-      <AdditionalOptions>
-      </AdditionalOptions>
    </LaunchAction>
    <ProfileAction
       buildConfiguration = "release"