diff options
author | Damiano Galassi <[email protected]> | 2016-10-29 13:24:01 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2016-10-29 14:08:19 +0200 |
commit | 185a922d275ef95db2fa73ee31e07bcafbdecaae (patch) | |
tree | 8ae73547d8acaf987091d5ab29bf3a3db279bf4a /macosx | |
parent | 2e48a329ffa5123439cf82b5163176713eb64432 (diff) |
MacGui: use hb_preset_job_init instead of custom logic for audio, subtitles and picture job settings.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBAudio.h | 8 | ||||
-rw-r--r-- | macosx/HBAudio.m | 168 | ||||
-rw-r--r-- | macosx/HBAudioDefaults.h | 1 | ||||
-rw-r--r-- | macosx/HBAudioDefaults.m | 5 | ||||
-rw-r--r-- | macosx/HBCore.m | 4 | ||||
-rw-r--r-- | macosx/HBFilters.h | 2 | ||||
-rw-r--r-- | macosx/HBFilters.m | 2 | ||||
-rw-r--r-- | macosx/HBJob+HBJobConversion.h | 6 | ||||
-rw-r--r-- | macosx/HBJob+HBJobConversion.m | 13 | ||||
-rw-r--r-- | macosx/HBJob+Private.h | 52 | ||||
-rw-r--r-- | macosx/HBJob.h | 2 | ||||
-rw-r--r-- | macosx/HBJob.m | 21 | ||||
-rw-r--r-- | macosx/HBPicture.h | 2 | ||||
-rw-r--r-- | macosx/HBPicture.m | 133 | ||||
-rw-r--r-- | macosx/HBPreset.h | 2 | ||||
-rw-r--r-- | macosx/HBPreset.m | 1 | ||||
-rw-r--r-- | macosx/HBPresetCoding.h | 2 | ||||
-rw-r--r-- | macosx/HBRange.m | 2 | ||||
-rw-r--r-- | macosx/HBSubtitles.h | 8 | ||||
-rw-r--r-- | macosx/HBSubtitles.m | 145 | ||||
-rw-r--r-- | macosx/HBSubtitlesDefaults.h | 2 | ||||
-rw-r--r-- | macosx/HBSubtitlesDefaults.m | 5 | ||||
-rw-r--r-- | macosx/HBTitle+Private.h (renamed from macosx/HBTitlePrivate.h) | 6 | ||||
-rw-r--r-- | macosx/HBTitle.h | 1 | ||||
-rw-r--r-- | macosx/HBTitle.m | 26 | ||||
-rw-r--r-- | macosx/HBVideo.h | 5 | ||||
-rw-r--r-- | macosx/HBVideo.m | 2 | ||||
-rw-r--r-- | macosx/HandBrake.xcodeproj/project.pbxproj | 8 |
28 files changed, 251 insertions, 383 deletions
diff --git a/macosx/HBAudio.h b/macosx/HBAudio.h index d56f59d16..5d73830a7 100644 --- a/macosx/HBAudio.h +++ b/macosx/HBAudio.h @@ -7,7 +7,7 @@ #import <Foundation/Foundation.h> #import "HBPresetCoding.h" -@class HBTitle; +@class HBJob; @class HBAudioTrack; @class HBAudioDefaults; @@ -15,9 +15,11 @@ NS_ASSUME_NONNULL_BEGIN extern NSString *HBAudioChangedNotification; -@interface HBAudio : NSObject <NSSecureCoding, NSCopying, HBPresetCoding> +@interface HBAudio : NSObject <NSSecureCoding, NSCopying> -- (instancetype)initWithTitle:(HBTitle *)title; +- (instancetype)initWithJob:(HBJob *)job; + +@property (nonatomic, readwrite, weak) HBJob *job; @property (nonatomic, readonly) NSMutableArray<NSDictionary *> *sourceTracks; @property (nonatomic, readonly) NSMutableArray<HBAudioTrack *> *tracks; diff --git a/macosx/HBAudio.m b/macosx/HBAudio.m index 81936d790..6c6bda46c 100644 --- a/macosx/HBAudio.m +++ b/macosx/HBAudio.m @@ -6,12 +6,15 @@ #import "HBAudio.h" +#import "HBJob.h" +#import "HBJob+HBJobConversion.m" #import "HBTitle.h" #import "HBAudioTrack.h" #import "HBAudioTrackPreset.h" #import "HBAudioDefaults.h" #import "HBCodingUtilities.h" +#import "HBJob+Private.h" #include "hb.h" @@ -24,14 +27,15 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; @implementation HBAudio -- (instancetype)initWithTitle:(HBTitle *)title +- (instancetype)initWithJob:(HBJob *)job { self = [super init]; if (self) { + _job = job; _container = HB_MUX_MP4; - _sourceTracks = [title.audioTracks mutableCopy]; + _sourceTracks = [job.title.audioTracks mutableCopy]; _tracks = [[NSMutableArray alloc] init]; _defaults = [[HBAudioDefaults alloc] init]; @@ -112,7 +116,7 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; - (void)reloadDefaults { - [self addTracksFromDefaults]; + [self addDefaultTracksFromJobSettings:self.job.jobDict]; } - (void)setContainer:(int)container @@ -128,8 +132,6 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; // Update the Auto Passthru Fallback Codec Popup // lets get the tag of the currently selected item first so we might reset it later [self.defaults validateEncoderFallbackForVideoContainer:container]; - - //[self validatePassthru]; } } @@ -177,12 +179,9 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; #pragma mark - Defaults -- (void)addTracksFromDefaults +- (void)addDefaultTracksFromJobSettings:(NSDictionary *)settings { - BOOL firstTrack = NO; - BOOL allTracks = NO; - NSMutableIndexSet *tracksAdded = [NSMutableIndexSet indexSet]; - NSMutableIndexSet *tracksToAdd = [NSMutableIndexSet indexSet]; + NSArray<NSDictionary<NSString *, id> *> *tracks = settings[@"Audio"][@"AudioList"]; // Reinitialize the configured list of audio tracks while (self.countOfTracks) @@ -190,144 +189,31 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; [self removeObjectFromTracksAtIndex:0]; } - if (self.defaults.trackSelectionBehavior != HBAudioTrackSelectionBehaviorNone) + // Add the tracks + for (NSDictionary *trackDict in tracks) { - // Add tracks of Default and Alternate Language by name - for (NSString *languageISOCode in self.defaults.trackSelectionLanguages) - { - NSMutableIndexSet *tracksIndexes = [[self _tracksWithISOCode:languageISOCode - selectOnlyFirst:self.defaults.trackSelectionBehavior == HBAudioTrackSelectionBehaviorFirst] mutableCopy]; - [tracksIndexes removeIndexes:tracksAdded]; - if (tracksIndexes.count) - { - [self _processPresetAudioArray:self.defaults.tracksArray forTracks:tracksIndexes firstOnly:firstTrack]; - firstTrack = self.defaults.secondaryEncoderMode ? YES : NO; - [tracksAdded addIndexes:tracksIndexes]; - } - } + HBAudioTrack *track = [self trackFromSourceTrackIndex:[trackDict[@"Track"] unsignedIntegerValue] + 1]; - // If no preferred Language was found, add standard track 1 - if (tracksAdded.count == 0 && self.sourceTracks.count > 1) + track.drc = [trackDict[@"DRC"] doubleValue]; + track.gain = [trackDict[@"Gain"] doubleValue]; + track.mixdown = hb_mixdown_get_from_name([trackDict[@"Mixdown"] UTF8String]); + if ([trackDict[@"Samplerate"] isKindOfClass:[NSString class]]) { - [tracksToAdd addIndex:1]; - } - } - - // If all tracks should be added, add all track numbers that are not yet processed - if (allTracks) - { - [tracksToAdd addIndexesInRange:NSMakeRange(1, self.sourceTracks.count - 1)]; - [tracksToAdd removeIndexes:tracksAdded]; - } - - if (tracksToAdd.count) - { - [self _processPresetAudioArray:self.defaults.tracksArray forTracks:tracksToAdd firstOnly:firstTrack]; - } - - // Add an None item - [self addNoneTrack]; -} - -/** - * Uses the templateAudioArray from the preset to create the audios for the specified trackIndex. - * - * @param templateAudioArray the track template. - * @param trackIndex the index of the source track. - * @param firstOnly use only the first track of the template or all. - */ -- (void)_processPresetAudioArray:(NSArray *)templateAudioArray forTrack:(NSUInteger)trackIndex firstOnly:(BOOL)firstOnly -{ - for (HBAudioTrackPreset *preset in templateAudioArray) - { - HBAudioTrack *newAudio = [[HBAudioTrack alloc] initWithTrackIdx:trackIndex - container:self.container - dataSource:self - delegate:self]; - [newAudio setUndo:self.undo]; - - [self insertObject:newAudio inTracksAtIndex:[self countOfTracks]]; - - int inputCodec = [self.sourceTracks[trackIndex][keyAudioInputCodec] intValue]; - int outputCodec = preset.encoder; - - // Check if we need to use a fallback - if (preset.encoder & HB_ACODEC_PASS_FLAG && !(preset.encoder & inputCodec & HB_ACODEC_PASS_MASK)) - { - outputCodec = hb_audio_encoder_get_fallback_for_passthru(outputCodec); - - // If we couldn't find an encoder for the passthru format - // fall back to the selected encoder fallback - if (outputCodec == HB_ACODEC_INVALID) - { - outputCodec = self.defaults.encoderFallback; - } - } - - int supportedMuxers = hb_audio_encoder_get_from_codec(outputCodec)->muxers; - - // If our preset wants us to support a codec that the track does not support, - // instead of changing the codec we remove the audio instead. - if (supportedMuxers & self.container) - { - newAudio.drc = preset.drc; - newAudio.gain = preset.gain; - newAudio.mixdown = preset.mixdown; - newAudio.sampleRate = preset.sampleRate; - newAudio.bitRate = preset.bitRate; - newAudio.encoder = outputCodec; + int sampleRate = hb_audio_samplerate_get_from_name([trackDict[@"Samplerate"] UTF8String]); + track.sampleRate = sampleRate == -1 ? 0 : sampleRate; } else { - [self removeObjectFromTracksAtIndex:[self countOfTracks] - 1]; + track.sampleRate = [trackDict[@"Samplerate"] intValue]; } + track.bitRate = [trackDict[@"Bitrate"] intValue]; + track.encoder = hb_audio_encoder_get_from_name([trackDict[@"Encoder"] UTF8String]); - - if (firstOnly) - { - break; - } + [self insertObject:track inTracksAtIndex:[self countOfTracks]]; } -} - -/** - * Matches the source audio tracks with the specific language iso code. - * - * @param isoCode the iso code to match. - * @param selectOnlyFirst whether to match only the first track for the iso code. - * - * @return a NSIndexSet with the index of the matched tracks. - */ -- (NSIndexSet *)_tracksWithISOCode:(NSString *)isoCode selectOnlyFirst:(BOOL)selectOnlyFirst -{ - NSMutableIndexSet *indexes = [NSMutableIndexSet indexSet]; - [self.sourceTracks enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { - if (idx) // Note that we skip the "None" track - { - if ([isoCode isEqualToString:@"und"] || [obj[keyAudioTrackLanguageIsoCode] isEqualToString:isoCode]) - { - [indexes addIndex:idx]; - - if (selectOnlyFirst) - { - *stop = YES; - } - } - } - }]; - - return indexes; -} - -- (void)_processPresetAudioArray:(NSArray<HBAudioTrackPreset *> *)templateAudioArray forTracks:(NSIndexSet *)trackIndexes firstOnly:(BOOL)firstOnly -{ - __block BOOL firstTrack = firstOnly; - [trackIndexes enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { - // Add the track - [self _processPresetAudioArray: self.defaults.tracksArray forTrack:idx firstOnly:firstTrack]; - firstTrack = self.defaults.secondaryEncoderMode ? YES : NO; - }]; + // Add an None item + [self addNoneTrack]; } - (BOOL)anyCodecMatches:(int)codec @@ -422,10 +308,10 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; [self.defaults writeToPreset:preset]; } -- (void)applyPreset:(HBPreset *)preset +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings { - [self.defaults applyPreset:preset]; - [self addTracksFromDefaults]; + [self.defaults applyPreset:preset jobSettings:settings]; + [self addDefaultTracksFromJobSettings:settings]; } #pragma mark - diff --git a/macosx/HBAudioDefaults.h b/macosx/HBAudioDefaults.h index fce8185ef..8d3c1a8f3 100644 --- a/macosx/HBAudioDefaults.h +++ b/macosx/HBAudioDefaults.h @@ -47,6 +47,7 @@ typedef NS_ENUM(NSUInteger, HBAudioTrackSelectionBehavior) { @property(nonatomic, readonly) NSArray<NSString *> *audioEncoderFallbacks; - (void)validateEncoderFallbackForVideoContainer:(int)container; +- (void)applyPreset:(HBPreset *)preset; @property (nonatomic, readwrite, weak, nullable) NSUndoManager *undo; diff --git a/macosx/HBAudioDefaults.m b/macosx/HBAudioDefaults.m index 60bb933c8..5f52d82fe 100644 --- a/macosx/HBAudioDefaults.m +++ b/macosx/HBAudioDefaults.m @@ -321,6 +321,11 @@ } } +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings +{ + [self applyPreset:preset]; +} + - (void)writeToPreset:(HBMutablePreset *)preset { // Track selection behavior diff --git a/macosx/HBCore.m b/macosx/HBCore.m index dcc4d24e3..eae767060 100644 --- a/macosx/HBCore.m +++ b/macosx/HBCore.m @@ -11,7 +11,7 @@ #import "HBUtilities.h" #import "HBStateFormatter+Private.h" -#import "HBTitlePrivate.h" +#import "HBTitle+Private.h" #include <dlfcn.h> @@ -256,7 +256,7 @@ static void hb_error_handler(const char *errmsg) for (int i = 0; i < hb_list_count(title_set->list_title); i++) { hb_title_t *title = (hb_title_t *) hb_list_item(title_set->list_title, i); - [titles addObject:[[HBTitle alloc] initWithTitle:title featured:(title->index == title_set->feature)]]; + [titles addObject:[[HBTitle alloc] initWithTitle:title handle:self.hb_handle featured:(title->index == title_set->feature)]]; } self.titles = [titles copy]; diff --git a/macosx/HBFilters.h b/macosx/HBFilters.h index 37416697d..e5f7cbb65 100644 --- a/macosx/HBFilters.h +++ b/macosx/HBFilters.h @@ -14,7 +14,7 @@ extern NSString * const HBFiltersChangedNotification; /** * Filters settings. */ -@interface HBFilters : NSObject <NSSecureCoding, NSCopying, HBPresetCoding> +@interface HBFilters : NSObject <NSSecureCoding, NSCopying> @property (nonatomic, readwrite, copy) NSString *detelecine; @property (nonatomic, readwrite, copy) NSString *detelecineCustomString; diff --git a/macosx/HBFilters.m b/macosx/HBFilters.m index 910c4186d..981b75310 100644 --- a/macosx/HBFilters.m +++ b/macosx/HBFilters.m @@ -475,7 +475,7 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification"; preset[@"PictureRotate"] = [NSString stringWithFormat:@"angle=%d:hflip=%d", self.rotate, self.flip]; } -- (void)applyPreset:(HBPreset *)preset +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings { self.notificationsEnabled = NO; diff --git a/macosx/HBJob+HBJobConversion.h b/macosx/HBJob+HBJobConversion.h index b46aabc18..58e51e5bc 100644 --- a/macosx/HBJob+HBJobConversion.h +++ b/macosx/HBJob+HBJobConversion.h @@ -11,6 +11,12 @@ @interface HBJob (HBJobConversion) /** + * Returns a job settings dict by applying + * the current preset to the job. + */ +@property (nonatomic, readonly) NSDictionary *jobDict; + +/** * Converts the job to a hb_job_t struct. */ @property (nonatomic, readonly) hb_job_t *hb_job; diff --git a/macosx/HBJob+HBJobConversion.m b/macosx/HBJob+HBJobConversion.m index e90ccfd6c..5c6d9126b 100644 --- a/macosx/HBJob+HBJobConversion.m +++ b/macosx/HBJob+HBJobConversion.m @@ -13,10 +13,21 @@ #import "HBChapter.h" -#import "HBTitlePrivate.h" +#import "HBTitle+Private.h" +#import "HBMutablePreset.h" @implementation HBJob (HBJobConversion) +- (NSDictionary *)jobDict +{ + NSAssert(self.title, @"HBJob: calling jobDict without a valid title loaded"); + + HBMutablePreset *preset = [[HBMutablePreset alloc] init]; + [self writeToPreset:preset]; + + return [self.title jobSettingsWithPreset:preset]; +} + /** * Prepares a hb_job_t */ diff --git a/macosx/HBJob+Private.h b/macosx/HBJob+Private.h new file mode 100644 index 000000000..acd78da1f --- /dev/null +++ b/macosx/HBJob+Private.h @@ -0,0 +1,52 @@ +// +// HBJob+HBJob_Private.h +// HandBrake +// +// Created by Damiano Galassi on 29/10/16. +// +// + +#import <HandBrakeKit/HandBrakeKit.h> + +@interface HBVideo (Private) + +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings; + +@end + +@interface HBPicture (Private) + +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings; + +@end + +@interface HBFilters (Private) + +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings; + +@end + +@interface HBAudio (Private) + +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings; + +@end + +@interface HBSubtitles (Private) + +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings; + +@end + +@interface HBAudioDefaults (Private) + +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings; + +@end + +@interface HBSubtitlesDefaults (Private) + +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings; + +@end + diff --git a/macosx/HBJob.h b/macosx/HBJob.h index 008fb7802..416ac5b1c 100644 --- a/macosx/HBJob.h +++ b/macosx/HBJob.h @@ -44,6 +44,8 @@ typedef NS_ENUM(NSUInteger, HBJobState){ - (instancetype)initWithTitle:(HBTitle *)title andPreset:(HBPreset *)preset; +- (void)applyPreset:(HBPreset *)preset; + /// Current state of the job. @property (nonatomic, readwrite) HBJobState state; diff --git a/macosx/HBJob.m b/macosx/HBJob.m index 7fa3b58f5..483735d33 100644 --- a/macosx/HBJob.m +++ b/macosx/HBJob.m @@ -5,7 +5,8 @@ It may be used under the terms of the GNU General Public License. */ #import "HBJob.h" -#import "HBTitle.h" +#import "HBJob+Private.h" +#import "HBTitle+Private.h" #import "HBAudioDefaults.h" #import "HBSubtitlesDefaults.h" @@ -13,6 +14,7 @@ #import "HBCodingUtilities.h" #import "HBMutablePreset.h" + #include "hb.h" NSString *HBContainerChangedNotification = @"HBContainerChangedNotification"; @@ -47,8 +49,8 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification"; _picture = [[HBPicture alloc] initWithTitle:title]; _filters = [[HBFilters alloc] init]; - _audio = [[HBAudio alloc] initWithTitle:title]; - _subtitles = [[HBSubtitles alloc] initWithTitle:title]; + _audio = [[HBAudio alloc] initWithJob:self]; + _subtitles = [[HBSubtitles alloc] initWithJob:self]; _chapterTitles = [title.chapters copy]; @@ -64,7 +66,10 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification"; - (void)applyPreset:(HBPreset *)preset { + NSAssert(self.title, @"HBJob: calling applyPreset: without a valid title loaded"); + self.presetName = preset.name; + NSDictionary *jobSettings = [self.title jobSettingsWithPreset:preset]; self.container = hb_container_get_from_name([preset[@"FileFormat"] UTF8String]); @@ -75,8 +80,11 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification"; // Chapter Markers self.chaptersEnabled = [preset[@"ChapterMarkers"] boolValue]; - [@[self.audio, self.subtitles, self.filters, self.picture, self.video] makeObjectsPerformSelector:@selector(applyPreset:) - withObject:preset]; + [self.picture applyPreset:preset jobSettings:jobSettings]; + [self.filters applyPreset:preset jobSettings:jobSettings]; + [self.audio applyPreset:preset jobSettings:jobSettings]; + [self.subtitles applyPreset:preset jobSettings:jobSettings]; + [self.video applyPreset:preset jobSettings:jobSettings]; } - (void)writeToPreset:(HBMutablePreset *)preset @@ -290,6 +298,9 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification"; decodeObject(_audio, HBAudio); decodeObject(_subtitles, HBSubtitles); + _audio.job = self; + _video.job = self; + decodeBool(_chaptersEnabled); decodeObject(_chapterTitles, NSArray); diff --git a/macosx/HBPicture.h b/macosx/HBPicture.h index 74830139f..2b0dc9503 100644 --- a/macosx/HBPicture.h +++ b/macosx/HBPicture.h @@ -23,7 +23,7 @@ extern NSString * const HBPictureChangedNotification; /** * HBPicture */ -@interface HBPicture : NSObject <NSSecureCoding, NSCopying, HBPresetCoding> +@interface HBPicture : NSObject <NSSecureCoding, NSCopying> - (instancetype)initWithTitle:(HBTitle *)title; diff --git a/macosx/HBPicture.m b/macosx/HBPicture.m index c0f7db15a..b9419e2bc 100644 --- a/macosx/HBPicture.m +++ b/macosx/HBPicture.m @@ -47,6 +47,7 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; _sourceHeight = 720; _anamorphicMode = HBPictureAnarmophicModeNone; + _modulus = 2; _parWidth = 1; _parHeight = 1; @@ -654,30 +655,42 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; preset[@"PictureRightCrop"] = @(self.cropRight); } -- (void)applyPreset:(HBPreset *)preset +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings { + NSDictionary<NSString *, NSNumber *> *par = settings[@"PAR"]; + NSDictionary<NSString *, id> *filterList = settings[@"Filters"][@"FilterList"]; + NSDictionary<NSString *, NSNumber *> *cropScale = nil; + + for (NSDictionary *dict in filterList) + { + if ([dict[@"ID"] intValue] == HB_FILTER_CROP_SCALE) + { + cropScale = dict[@"Settings"]; + } + } + self.validating = YES; self.notificationsEnabled = NO; - /* Note: objectForKey:@"UsesPictureSettings" refers to picture size, which encompasses: - * height, width, keep ar, anamorphic and crop settings. - * picture filters are handled separately below. - */ - int maxWidth = self.sourceWidth - self.cropLeft - self.cropRight; - int maxHeight = self.sourceHeight - self.cropTop - self.cropBottom; - int parWidth = self.parWidth; - int parHeight = self.parHeight; - int jobMaxWidth = 0, jobMaxHeight = 0; - - /* Check to see if the objectForKey:@"UsesPictureSettings is greater than 0, as 0 means use picture sizing "None" - * ( 2 is use max for source and 1 is use exact size when the preset was created ) and the - * preset completely ignores any picture sizing values in the preset. - */ - if ([preset[@"UsesPictureSettings"] intValue] > 0) + + // Check to see if UsesPictureSettings is greater than 0, as 0 means use picture sizing "None" + // (2 is use max for source and 1 is use exact size when the preset was created) and the + // preset completely ignores any picture sizing values in the preset. + if (cropScale && [preset[@"UsesPictureSettings"] intValue]) { // If Cropping is set to custom, then recall all four crop values from // when the preset was created and apply them - if ([preset[@"PictureAutoCrop"] intValue] == 0) + if ([preset[@"PictureAutoCrop"] boolValue]) + { + self.autocrop = YES; + + // Here we use the auto crop values determined right after scan + self.cropTop = [cropScale[@"crop-top"] intValue]; + self.cropBottom = [cropScale[@"crop-bottom"] intValue]; + self.cropLeft = [cropScale[@"crop-left"] intValue]; + self.cropRight = [cropScale[@"crop-right"] intValue]; + } + else { self.autocrop = NO; @@ -687,19 +700,6 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; self.cropLeft = [preset[@"PictureLeftCrop"] intValue]; self.cropRight = [preset[@"PictureRightCrop"] intValue]; } - else // if auto crop has been saved in preset, set to auto and use post scan auto crop - { - self.autocrop = YES; - /* Here we use the auto crop values determined right after scan */ - self.cropTop = self.autoCropTop; - self.cropBottom = self.autoCropBottom; - self.cropLeft = self.autoCropLeft; - self.cropRight = self.autoCropRight; - } - - // crop may have changed, reset maxWidth/maxHeight - maxWidth = self.sourceWidth - self.cropLeft - self.cropRight; - maxHeight = self.sourceHeight - self.cropTop - self.cropBottom; // Set modulus if (preset[@"PictureModulus"]) @@ -725,81 +725,20 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; else if ([preset[@"PicturePAR"] isEqualToString:@"custom"]) { self.anamorphicMode = HB_ANAMORPHIC_CUSTOM; - parWidth = [preset[@"PicturePARWidth"] intValue]; - parHeight = [preset[@"PicturePARHeight"] intValue]; } else { self.anamorphicMode = HB_ANAMORPHIC_LOOSE; } - self.width = self.sourceWidth - self.cropLeft - self.cropRight; - self.height = self.sourceHeight - self.cropTop - self.cropBottom; + self.parWidth = [par[@"Num"] intValue]; + self.parHeight = [par[@"Den"] intValue]; - // Check to see if the "UsesPictureSettings" is 2, - // which means "Use max. picture size for source" - // If not 2 it must be 1 here which means "Use the picture - // size specified in the preset" - if ([preset[@"UsesPictureSettings"] intValue] != 2) - { - // if the preset specifies neither max. width nor height - // (both are 0), use the max. picture size - // - // if the specified non-zero dimensions exceed those of the - // source, also use the max. picture size (no upscaling) - if ([preset[@"PictureWidth"] intValue] > 0) - { - jobMaxWidth = [preset[@"PictureWidth"] intValue]; - } - if ([preset[@"PictureHeight"] intValue] > 0) - { - jobMaxHeight = [preset[@"PictureHeight"] intValue]; - } - } + self.width = [cropScale[@"width"] intValue]; + self.height = [cropScale[@"height"] intValue]; + + self.displayWidth = self.width * self.parWidth / self.parHeight; } - // Modulus added to maxWidth/maxHeight to allow a small amount of - // upscaling to the next mod boundary. This does not apply to - // explicit limits set for device compatibility. It only applies - // when limiting to cropped title dimensions. - maxWidth += self.modulus - 1; - maxHeight += self.modulus - 1; - if (jobMaxWidth == 0 || jobMaxWidth > maxWidth) - jobMaxWidth = maxWidth; - if (jobMaxHeight == 0 || jobMaxHeight > maxHeight) - jobMaxHeight = maxHeight; - - hb_geometry_t srcGeo, resultGeo; - hb_geometry_settings_t uiGeo; - - srcGeo.width = self.sourceWidth; - srcGeo.height = self.sourceHeight; - srcGeo.par.num = self.sourceParNum; - srcGeo.par.den = self.sourceParDen; - - uiGeo.mode = self.anamorphicMode; - uiGeo.keep = self.keepDisplayAspect * HB_KEEP_DISPLAY_ASPECT; - uiGeo.itu_par = 0; - uiGeo.modulus = self.modulus; - int crop[4] = {self.cropTop, self.cropBottom, self.cropLeft, self.cropRight}; - memcpy(uiGeo.crop, crop, sizeof(int[4])); - uiGeo.geometry.width = self.width; - uiGeo.geometry.height = self.height; - - hb_rational_t par = {parWidth, parHeight}; - uiGeo.geometry.par = par; - - uiGeo.maxWidth = jobMaxWidth; - uiGeo.maxHeight = jobMaxHeight; - hb_set_anamorphic_size2(&srcGeo, &uiGeo, &resultGeo); - - int display_width; - display_width = resultGeo.width * resultGeo.par.num / resultGeo.par.den; - - self.width = resultGeo.width; - self.height = resultGeo.height; - self.parWidth = resultGeo.par.num; - self.parHeight = resultGeo.par.den; - self.displayWidth = display_width; self.validating = NO; self.notificationsEnabled = YES; diff --git a/macosx/HBPreset.h b/macosx/HBPreset.h index 100972784..7d4551fed 100644 --- a/macosx/HBPreset.h +++ b/macosx/HBPreset.h @@ -79,6 +79,8 @@ typedef NS_ENUM(NSUInteger, HBPresetFormat) { - (nullable id)objectForKey:(NSString *)key; - (nullable id)objectForKeyedSubscript:(NSString *)key; +@property (nonatomic, strong, nullable, readonly) NSMutableDictionary *content; + @end NS_ASSUME_NONNULL_END diff --git a/macosx/HBPreset.m b/macosx/HBPreset.m index dcc164765..97faea58a 100644 --- a/macosx/HBPreset.m +++ b/macosx/HBPreset.m @@ -27,6 +27,7 @@ { _name = @"New Preset"; _presetDescription = @""; + _content = [[NSMutableDictionary alloc] init]; self.isLeaf = YES; } return self; diff --git a/macosx/HBPresetCoding.h b/macosx/HBPresetCoding.h index 9b51f6d3a..e8529fb4b 100644 --- a/macosx/HBPresetCoding.h +++ b/macosx/HBPresetCoding.h @@ -14,4 +14,4 @@ - (void)applyPreset:(HBPreset *)preset; - (void)writeToPreset:(HBMutablePreset *)preset; -@end
\ No newline at end of file +@end diff --git a/macosx/HBRange.m b/macosx/HBRange.m index defc73efe..54468ff7a 100644 --- a/macosx/HBRange.m +++ b/macosx/HBRange.m @@ -5,7 +5,7 @@ It may be used under the terms of the GNU General Public License. */ #import "HBRange.h" -#import "HBTitlePrivate.h" +#import "HBTitle+Private.h" #import "HBCodingUtilities.h" NSString *HBRangeChangedNotification = @"HBRangeChangedNotification"; diff --git a/macosx/HBSubtitles.h b/macosx/HBSubtitles.h index 0a2c56594..afda6a659 100644 --- a/macosx/HBSubtitles.h +++ b/macosx/HBSubtitles.h @@ -9,13 +9,15 @@ NS_ASSUME_NONNULL_BEGIN -@class HBTitle; +@class HBJob; @class HBSubtitlesTrack; @class HBSubtitlesDefaults; -@interface HBSubtitles : NSObject <NSSecureCoding, NSCopying, HBPresetCoding> +@interface HBSubtitles : NSObject <NSSecureCoding, NSCopying> -- (instancetype)initWithTitle:(HBTitle *)title; +- (instancetype)initWithJob:(HBJob *)job; + +@property (nonatomic, readwrite, weak) HBJob *job; - (void)addAllTracks; - (void)removeAll; diff --git a/macosx/HBSubtitles.m b/macosx/HBSubtitles.m index 1c9b401ff..b920623ff 100644 --- a/macosx/HBSubtitles.m +++ b/macosx/HBSubtitles.m @@ -9,8 +9,11 @@ #import "HBSubtitlesTrack.h" +#import "HBJob.h" +#import "HBJob+HBJobConversion.h" #import "HBTitle.h" #import "HBCodingUtilities.h" +#import "HBJob+Private.h" #include "common.h" @@ -32,14 +35,15 @@ extern NSString *keySubTrackSrtFileURL; @implementation HBSubtitles -- (instancetype)initWithTitle:(HBTitle *)title +- (instancetype)initWithJob:(HBJob *)job { self = [super init]; if (self) { + _job = job; _container = HB_MUX_MP4; - _sourceTracks = [title.subtitlesTracks mutableCopy]; + _sourceTracks = [job.title.subtitlesTracks mutableCopy]; _tracks = [[NSMutableArray alloc] init]; _defaults = [[HBSubtitlesDefaults alloc] init]; @@ -123,10 +127,10 @@ extern NSString *keySubTrackSrtFileURL; [self insertObject:track inTracksAtIndex:0]; } } - [self addNoneTrack]; } + // Else add a new None track - else if (oldSourceIdx == NONE_TRACK_INDEX) + if (oldSourceIdx == NONE_TRACK_INDEX) { [self addNoneTrack]; } @@ -204,7 +208,7 @@ extern NSString *keySubTrackSrtFileURL; - (void)reloadDefaults { - [self addTracksFromDefaults]; + [self addDefaultTracksFromJobSettings:self.job.jobDict]; } - (void)addSrtTrackFromURL:(NSURL *)srtURL @@ -275,134 +279,41 @@ extern NSString *keySubTrackSrtFileURL; #pragma mark - Defaults -/** - * Remove all the subtitles tracks and - * add new ones based on the defaults settings - */ -- (IBAction)addTracksFromDefaults +- (void)addDefaultTracksFromJobSettings:(NSDictionary *)settings { - // Keeps a set of the indexes of the added track - // so we don't add the same track twice. - NSMutableIndexSet *tracksAdded = [NSMutableIndexSet indexSet]; + NSArray<NSDictionary<NSString *, id> *> *tracks = settings[@"Subtitle"][@"SubtitleList"]; + NSDictionary<NSString *, id> *search = settings[@"Subtitle"][@"Search"]; + // Reinitialize the configured list of audio tracks while (self.countOfTracks) { [self removeObjectFromTracksAtIndex:0]; } // Add the foreign audio search pass - if (self.defaults.addForeignAudioSearch) + if ([search[@"Enable"] boolValue]) { - [self addTrack:[self trackFromSourceTrackIndex:FOREIGN_TRACK_INDEX]]; - } + HBSubtitlesTrack *track = [self trackFromSourceTrackIndex:FOREIGN_TRACK_INDEX]; - // Add the tracks for the selected languages - if (self.defaults.trackSelectionBehavior != HBSubtitleTrackSelectionBehaviorNone) - { - for (NSString *lang in self.defaults.trackSelectionLanguages) - { - NSUInteger idx = 0; - for (NSDictionary *track in self.sourceTracks) - { - if (idx > FOREIGN_TRACK_INDEX && - ([lang isEqualToString:@"und"] || [track[keySubTrackLanguageIsoCode] isEqualToString:lang])) - { - if (![tracksAdded containsIndex:idx]) - { - [self addTrack:[self trackFromSourceTrackIndex:idx]]; - } - [tracksAdded addIndex:idx]; - - if (self.defaults.trackSelectionBehavior == HBSubtitleTrackSelectionBehaviorFirst) - { - break; - } - } - idx++; - } - } - } + track.burnedIn = [search[@"Burn"] boolValue]; + track.forcedOnly = [search[@"Forced"] boolValue]; - // Add the closed captions track if there is one. - if (self.defaults.addCC) - { - NSUInteger idx = 0; - for (NSDictionary *track in self.sourceTracks) - { - if ([track[keySubTrackType] intValue] == CC608SUB) - { - if (![tracksAdded containsIndex:idx]) - { - [self addTrack:[self trackFromSourceTrackIndex:idx]]; - } - - if (self.defaults.trackSelectionBehavior == HBSubtitleTrackSelectionBehaviorFirst) - { - break; - } - } - idx++; - } + [self addTrack:track]; } - // Set the burn key for the appropriate track. - if (self.defaults.burnInBehavior != HBSubtitleTrackBurnInBehaviorNone && self.tracks.count) + // Add the tracks + for (NSDictionary *trackDict in tracks) { - if (self.defaults.burnInBehavior == HBSubtitleTrackBurnInBehaviorFirst) - { - if (self.tracks.firstObject.sourceTrackIdx != FOREIGN_TRACK_INDEX) - { - self.tracks.firstObject.burnedIn = YES; - } - else if (self.tracks.count > 1) - { - self.tracks[0].burnedIn = NO; - self.tracks[1].burnedIn = YES; - } - } - else if (self.defaults.burnInBehavior == HBSubtitleTrackBurnInBehaviorForeignAudio) - { - if (self.tracks.firstObject.sourceTrackIdx == FOREIGN_TRACK_INDEX) - { - self.tracks.firstObject.burnedIn = YES; - } - } - else if (self.defaults.burnInBehavior == HBSubtitleTrackBurnInBehaviorForeignAudioThenFirst) - { - self.tracks.firstObject.burnedIn = YES; - } - } + HBSubtitlesTrack *track = [self trackFromSourceTrackIndex:[trackDict[@"Track"] unsignedIntegerValue] + 2]; - // Burn-in the first dvd or bluray track and remove the others. - if (self.defaults.burnInDVDSubtitles || self.defaults.burnInBluraySubtitles) - { - // Ugly settings for ugly players - BOOL bitmapSubtitlesFound = NO; + track.burnedIn = [trackDict[@"Burn"] boolValue]; + track.forcedOnly = [trackDict[@"Forced"] boolValue]; - NSMutableArray *tracksToDelete = [[NSMutableArray alloc] init]; - for (HBSubtitlesTrack *track in self.tracks) - { - if (track.sourceTrackIdx != 1) - { - if (((track.type == VOBSUB && self.defaults.burnInDVDSubtitles) || - (track.type == PGSSUB && self.defaults.burnInBluraySubtitles)) && - !bitmapSubtitlesFound) - { - track.burnedIn = YES; - bitmapSubtitlesFound = YES; - } - else if (track.type == VOBSUB || track.type == PGSSUB) - { - [tracksToDelete addObject:track]; - } - } - } - [self.tracks removeObjectsInArray:tracksToDelete]; + [self addTrack:track]; } - // Add an empty track + // Add an None item [self addNoneTrack]; - [self validatePassthru]; } #pragma mark - Validation @@ -549,10 +460,10 @@ extern NSString *keySubTrackSrtFileURL; [self.defaults writeToPreset:preset]; } -- (void)applyPreset:(HBPreset *)preset +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings { - [self.defaults applyPreset:preset]; - [self addTracksFromDefaults]; + [self.defaults applyPreset:preset jobSettings:settings]; + [self addDefaultTracksFromJobSettings:settings]; } #pragma mark - diff --git a/macosx/HBSubtitlesDefaults.h b/macosx/HBSubtitlesDefaults.h index 148f8ad82..a44551e1e 100644 --- a/macosx/HBSubtitlesDefaults.h +++ b/macosx/HBSubtitlesDefaults.h @@ -35,6 +35,8 @@ typedef NS_ENUM(NSUInteger, HBSubtitleTrackBurnInBehavior) { @property (nonatomic, readwrite) BOOL burnInDVDSubtitles; @property (nonatomic, readwrite) BOOL burnInBluraySubtitles; +- (void)applyPreset:(HBPreset *)preset; + @property (nonatomic, readwrite, weak, nullable) NSUndoManager *undo; @end diff --git a/macosx/HBSubtitlesDefaults.m b/macosx/HBSubtitlesDefaults.m index 5dfd4b5a8..fa1044a69 100644 --- a/macosx/HBSubtitlesDefaults.m +++ b/macosx/HBSubtitlesDefaults.m @@ -129,6 +129,11 @@ self.burnInBluraySubtitles = [preset[@"SubtitleBurnBDSub"] boolValue]; } +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings +{ + [self applyPreset:preset]; +} + - (void)writeToPreset:(HBMutablePreset *)preset { if (self.trackSelectionBehavior == HBSubtitleTrackSelectionBehaviorFirst) diff --git a/macosx/HBTitlePrivate.h b/macosx/HBTitle+Private.h index 01e9532eb..76aecdba4 100644 --- a/macosx/HBTitlePrivate.h +++ b/macosx/HBTitle+Private.h @@ -19,11 +19,13 @@ * @param title the libhb title to wrap. * @param featured whether the title is the featured one or not. */ -- (instancetype)initWithTitle:(hb_title_t *)title featured:(BOOL)featured; +- (instancetype)initWithTitle:(hb_title_t *)title handle:(hb_handle_t *)handle featured:(BOOL)featured; /** * The internal libhb structure. */ @property (nonatomic, readonly) hb_title_t *hb_title; -@end
\ No newline at end of file +- (NSDictionary *)jobSettingsWithPreset:(HBPreset *)preset; + +@end diff --git a/macosx/HBTitle.h b/macosx/HBTitle.h index 898166d6f..37d5a360b 100644 --- a/macosx/HBTitle.h +++ b/macosx/HBTitle.h @@ -9,6 +9,7 @@ NS_ASSUME_NONNULL_BEGIN @class HBChapter; +@class HBPreset; /** * HBTitles is an interface to the low-level hb_title_t. diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m index a0cd592d4..5d87bfaad 100644 --- a/macosx/HBTitle.m +++ b/macosx/HBTitle.m @@ -5,8 +5,10 @@ It may be used under the terms of the GNU General Public License. */ #import "HBTitle.h" -#import "HBTitlePrivate.h" +#import "HBTitle+Private.h" #import "HBChapter.h" +#import "HBPreset.h" +#import "NSDictionary+HBAdditions.h" #include "lang.h" @@ -26,6 +28,7 @@ extern NSString *keySubTrackType; @interface HBTitle () @property (nonatomic, readonly) hb_title_t *hb_title; +@property (nonatomic, readonly) hb_handle_t *hb_handle; @property (nonatomic, readwrite, strong) NSString *name; @property (nonatomic, readwrite) NSArray *audioTracks; @@ -36,7 +39,7 @@ extern NSString *keySubTrackType; @implementation HBTitle -- (instancetype)initWithTitle:(hb_title_t *)title featured:(BOOL)featured +- (instancetype)initWithTitle:(hb_title_t *)title handle:(hb_handle_t *)handle featured:(BOOL)featured { self = [super init]; if (self) @@ -47,6 +50,7 @@ extern NSString *keySubTrackType; } _hb_title = title; + _hb_handle = handle; _featured = featured; } @@ -256,4 +260,22 @@ extern NSString *keySubTrackType; return _chapters; } +- (NSDictionary *)jobSettingsWithPreset:(HBPreset *)preset +{ + NSDictionary *result = nil; + + hb_dict_t *hb_preset = [preset content].hb_value; + hb_dict_t *job = hb_preset_job_init(self.hb_handle, self.hb_title->index, hb_preset); + + if (job) + { + result = [[NSDictionary alloc] initWithHBDict:job]; + } + + hb_dict_free(&hb_preset); + hb_dict_free(&job); + + return result; +} + @end diff --git a/macosx/HBVideo.h b/macosx/HBVideo.h index a8ceef808..50678ec41 100644 --- a/macosx/HBVideo.h +++ b/macosx/HBVideo.h @@ -26,10 +26,12 @@ extern NSString * const HBVideoChangedNotification; /** * HBVideo */ -@interface HBVideo : NSObject <NSSecureCoding, NSCopying, HBPresetCoding> +@interface HBVideo : NSObject <NSSecureCoding, NSCopying> - (instancetype)initWithJob:(HBJob *)job; +@property (nonatomic, readwrite, weak) HBJob *job; + - (void)containerChanged; @property (nonatomic, readwrite) int encoder; @@ -58,7 +60,6 @@ extern NSString * const HBVideoChangedNotification; @property (nonatomic, readwrite) BOOL fastDecode; -@property (nonatomic, readwrite, weak) HBJob *job; @property (nonatomic, readonly) NSString *completeTune; @property (nonatomic, readwrite, weak, nullable) NSUndoManager *undo; diff --git a/macosx/HBVideo.m b/macosx/HBVideo.m index 6a1bdf5fb..d1641087e 100644 --- a/macosx/HBVideo.m +++ b/macosx/HBVideo.m @@ -553,7 +553,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification"; return string; } -- (void)applyPreset:(HBPreset *)preset +- (void)applyPreset:(HBPreset *)preset jobSettings:(NSDictionary *)settings { self.notificationsEnabled = NO; diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index b6f145dac..786c4e4a0 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -175,6 +175,7 @@ A91F97361D7B2A4E00D82DCE /* HBAudioTransformers.m in Sources */ = {isa = PBXBuildFile; fileRef = A91F97341D7B2A4E00D82DCE /* HBAudioTransformers.m */; }; A92268781A6E555500A8D5C5 /* HBAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A92268771A6E555500A8D5C5 /* HBAppDelegate.m */; }; A922687B1A6E569B00A8D5C5 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A92268791A6E569B00A8D5C5 /* MainWindow.xib */; }; + A9294CC91DC4BBF7004D3415 /* HBJob+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A9294CC71DC4BBF7004D3415 /* HBJob+Private.h */; }; A932E26C1988334B0047D13E /* AudioDefaults.xib in Resources */ = {isa = PBXBuildFile; fileRef = A932E26A1988334B0047D13E /* AudioDefaults.xib */; }; A9350F501CCA7F490089F970 /* HBQTKitPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = A9350F4E1CCA7C3B0089F970 /* HBQTKitPlayer.m */; }; A937EECB1C6C7C0300EEAE6D /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = A937EECA1C6C7C0300EEAE6D /* dsa_pub.pem */; }; @@ -420,6 +421,7 @@ A92268761A6E555500A8D5C5 /* HBAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBAppDelegate.h; sourceTree = "<group>"; }; A92268771A6E555500A8D5C5 /* HBAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBAppDelegate.m; sourceTree = "<group>"; }; A922687A1A6E569B00A8D5C5 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = MainWindow.xib; sourceTree = "<group>"; }; + A9294CC71DC4BBF7004D3415 /* HBJob+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HBJob+Private.h"; sourceTree = "<group>"; }; A932E26B1988334B0047D13E /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = AudioDefaults.xib; sourceTree = "<group>"; }; A932E26D198833920047D13E /* HBAudioDefaultsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBAudioDefaultsController.h; sourceTree = "<group>"; }; A932E26E198833920047D13E /* HBAudioDefaultsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBAudioDefaultsController.m; sourceTree = "<group>"; }; @@ -489,7 +491,7 @@ A98C29C31977B10600AF5DED /* HBLanguagesSelection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBLanguagesSelection.m; sourceTree = "<group>"; }; A98F38041C7DCA7E00E469C8 /* HBStateFormatter+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HBStateFormatter+Private.h"; sourceTree = "<group>"; }; A98F38051C7DCA7E00E469C8 /* HBStateFormatter+Private.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HBStateFormatter+Private.m"; sourceTree = "<group>"; }; - A98FD5941B19C6E400FCC7A5 /* HBTitlePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBTitlePrivate.h; sourceTree = "<group>"; }; + A98FD5941B19C6E400FCC7A5 /* HBTitle+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HBTitle+Private.h"; sourceTree = "<group>"; }; A9906B2B1A710920001D82D5 /* HBQueueController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBQueueController.m; sourceTree = "<group>"; }; A990D9051A64562200139032 /* HBJob+HBJobConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HBJob+HBJobConversion.h"; sourceTree = "<group>"; }; A990D9061A64562200139032 /* HBJob+HBJobConversion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HBJob+HBJobConversion.m"; sourceTree = "<group>"; }; @@ -1079,9 +1081,10 @@ A9DEC8731A23C87500C79B48 /* HBCore.m */, A971281D1A2C75180088C076 /* HBTitle.h */, A971281E1A2C75180088C076 /* HBTitle.m */, - A98FD5941B19C6E400FCC7A5 /* HBTitlePrivate.h */, + A98FD5941B19C6E400FCC7A5 /* HBTitle+Private.h */, A9DEC87D1A23DF6F00C79B48 /* HBJob.h */, A9DEC87E1A23DF6F00C79B48 /* HBJob.m */, + A9294CC71DC4BBF7004D3415 /* HBJob+Private.h */, A990D9051A64562200139032 /* HBJob+HBJobConversion.h */, A990D9061A64562200139032 /* HBJob+HBJobConversion.m */, A918066F1A4807B000FC9BED /* HBRange.h */, @@ -1260,6 +1263,7 @@ A91CE2EC1C7DAEEE0068F46F /* HBStateFormatter.h in Headers */, A91CE2ED1C7DAEEE0068F46F /* HBUtilities.h in Headers */, A91CE2FB1C7DB99D0068F46F /* HBPresetsManager.h in Headers */, + A9294CC91DC4BBF7004D3415 /* HBJob+Private.h in Headers */, A91CE2FC1C7DB99D0068F46F /* HBPreset.h in Headers */, A91CE2FD1C7DB99D0068F46F /* HBMutablePreset.h in Headers */, A98B8E241C7DD2A200B810C9 /* HBPresetCoding.h in Headers */, |