summaryrefslogtreecommitdiffstats
path: root/macosx/HBController.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2016-02-26 09:50:16 +0100
committerDamiano Galassi <[email protected]>2016-03-11 13:51:17 +0100
commit7481df6459c9ab20c6aa68159243f492d113736b (patch)
treed09e6cc962458cd5f7c1f72c1b532bcc9bc63247 /macosx/HBController.m
parentd5535297783e8728e45c1d79e973287fead81788 (diff)
MacGui: move the objc libhb wrapper to a separate framework.
Diffstat (limited to 'macosx/HBController.m')
-rw-r--r--macosx/HBController.m16
1 files changed, 5 insertions, 11 deletions
diff --git a/macosx/HBController.m b/macosx/HBController.m
index 0bbf67ddf..c7faf6257 100644
--- a/macosx/HBController.m
+++ b/macosx/HBController.m
@@ -13,7 +13,6 @@
#import "HBPresetsManager.h"
#import "HBPreset.h"
#import "HBMutablePreset.h"
-#import "HBUtilities.h"
#import "HBPictureViewController.h"
#import "HBVideoController.h"
@@ -28,10 +27,7 @@
#import "HBPresetsViewController.h"
#import "HBAddPresetController.h"
-#import "HBCore.h"
-#import "HBTitle.h"
-#import "HBJob.h"
-#import "HBStateFormatter.h"
+@import HandBrakeKit;
@interface HBController () <HBPresetsViewControllerDelegate, HBTitleSelectionDelegate, NSDrawerDelegate, NSDraggingDestination>
{
@@ -548,17 +544,15 @@
int hb_num_previews = [[[NSUserDefaults standardUserDefaults] objectForKey:@"PreviewsNumber"] intValue];
int min_title_duration_seconds = [[[NSUserDefaults standardUserDefaults] objectForKey:@"MinTitleScanSeconds"] intValue];
- HBStateFormatter *formatter = [[HBStateFormatter alloc] init];
-
[self.core scanURL:mediaURL
titleIndex:index
previews:hb_num_previews minDuration:min_title_duration_seconds
- progressHandler:^(HBState state, hb_state_t hb_state)
+ progressHandler:^(HBState state, HBProgress progress, NSString *info)
{
- fSrcDVD2Field.stringValue = [formatter stateToString:hb_state title:nil];
+ fSrcDVD2Field.stringValue = info;
fScanIndicator.hidden = NO;
fScanHorizontalLine.hidden = YES;
- fScanIndicator.doubleValue = [formatter stateToPercentComplete:hb_state];
+ fScanIndicator.doubleValue = progress.percent;
}
completionHandler:^(HBCoreResult result)
{
@@ -826,7 +820,7 @@
- (void)chapterPopUpChanged:(NSNotification *)notification
{
// We're changing the chapter range - we may need to flip the m4v/mp4 extension
- if (self.job.container & HB_MUX_MASK_MP4)
+ if (self.job.container & 0x030000 /*HB_MUX_MASK_MP4*/)
{
[self updateFileExtension:notification];
}