summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/HBAudioController.h10
-rw-r--r--macosx/HBAudioController.m22
-rw-r--r--macosx/HBAudioTrack.h (renamed from macosx/HBAudio.h)27
-rw-r--r--macosx/HBAudioTrack.m (renamed from macosx/HBAudio.m)30
-rw-r--r--macosx/HBJob.h15
-rw-r--r--macosx/HBJob.m13
-rw-r--r--macosx/HBQueueController.mm2
-rw-r--r--macosx/HandBrake.xcodeproj/project.pbxproj12
8 files changed, 64 insertions, 67 deletions
diff --git a/macosx/HBAudioController.h b/macosx/HBAudioController.h
index 83dba5c29..9088e5b92 100644
--- a/macosx/HBAudioController.h
+++ b/macosx/HBAudioController.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
@class HBJob;
-@class HBAudio;
+@class HBAudioTrack;
/**
* HBAudioController
@@ -25,16 +25,16 @@
- (void) applySettingsFromPreset:(NSDictionary *)preset;
- (BOOL) anyCodecMatches: (int) aCodecValue;
-- (void) settingTrackToNone: (HBAudio *) newNoneTrack;
-- (void) switchingTrackFromNone: (HBAudio *) noLongerNoneTrack;
+- (void) settingTrackToNone: (HBAudioTrack *) newNoneTrack;
+- (void) switchingTrackFromNone: (HBAudioTrack *) noLongerNoneTrack;
@end
@interface HBAudioController (KVC)
- (NSUInteger) countOfAudioArray;
-- (HBAudio *) objectInAudioArrayAtIndex: (NSUInteger) index;
-- (void) insertObject: (HBAudio *) audioObject inAudioArrayAtIndex: (NSUInteger) index;
+- (HBAudioTrack *) objectInAudioArrayAtIndex: (NSUInteger) index;
+- (void) insertObject: (HBAudioTrack *) audioObject inAudioArrayAtIndex: (NSUInteger) index;
- (void) removeObjectFromAudioArrayAtIndex: (NSUInteger) index;
@end
diff --git a/macosx/HBAudioController.m b/macosx/HBAudioController.m
index 093efaa45..961e904a0 100644
--- a/macosx/HBAudioController.m
+++ b/macosx/HBAudioController.m
@@ -6,7 +6,7 @@
//
#import "HBAudioController.h"
-#import "HBAudio.h"
+#import "HBAudioTrack.h"
#import "HBAudioDefaultsController.h"
#import "HBJob.h"
@@ -116,7 +116,7 @@
for (HBAudioTrackPreset *preset in templateAudioArray)
{
BOOL fallenBack = NO;
- HBAudio *newAudio = [[HBAudio alloc] init];
+ HBAudioTrack *newAudio = [[HBAudioTrack alloc] init];
[newAudio setController: self];
[self insertObject: newAudio inAudioArrayAtIndex: [self countOfAudioArray]];
[newAudio setVideoContainerTag: [self videoContainerTag]];
@@ -289,7 +289,7 @@
NSUInteger audioArrayCount = [self countOfAudioArray];
for (NSUInteger i = 0; i < audioArrayCount && !retval; i++)
{
- HBAudio *anAudio = [self objectInAudioArrayAtIndex: i];
+ HBAudioTrack *anAudio = [self objectInAudioArrayAtIndex: i];
if ([anAudio enabled] && aCodecValue == [[anAudio codec][keyAudioCodec] intValue])
{
retval = YES;
@@ -301,7 +301,7 @@
- (void) addNewAudioTrack
{
- HBAudio *newAudio = [[HBAudio alloc] init];
+ HBAudioTrack *newAudio = [[HBAudioTrack alloc] init];
[newAudio setController: self];
[self insertObject: newAudio inAudioArrayAtIndex: [self countOfAudioArray]];
[newAudio setVideoContainerTag: [self videoContainerTag]];
@@ -314,7 +314,7 @@
#pragma mark -
#pragma mark Notification Handling
-- (void) settingTrackToNone: (HBAudio *) newNoneTrack
+- (void) settingTrackToNone: (HBAudioTrack *) newNoneTrack
{
// If this is not the last track in the array we need to remove it. We then need to see if a new
@@ -329,7 +329,7 @@
[self switchingTrackFromNone: nil]; // see if we need to add one to the list
}
-- (void) switchingTrackFromNone: (HBAudio *) noLongerNoneTrack
+- (void) switchingTrackFromNone: (HBAudioTrack *) noLongerNoneTrack
{
NSUInteger count = [self countOfAudioArray];
@@ -338,7 +338,7 @@
// If there is no last track that is None we add one.
if (0 < count)
{
- HBAudio *lastAudio = [self objectInAudioArrayAtIndex: count - 1];
+ HBAudioTrack *lastAudio = [self objectInAudioArrayAtIndex: count - 1];
if ([lastAudio enabled])
{
needToAdd = YES;
@@ -364,7 +364,7 @@
[self setVideoContainerTag: notDict[keyContainerTag]];
// Update each of the instances because this value influences possible settings.
- for (HBAudio *audioObject in audioArray)
+ for (HBAudioTrack *audioObject in audioArray)
{
[audioObject setVideoContainerTag: [self videoContainerTag]];
}
@@ -398,7 +398,7 @@
self.masterTrackArray = newTrackArray;
// Readd the controller reference to the audio tracks.
- for (HBAudio *audioTrack in audioArray)
+ for (HBAudioTrack *audioTrack in audioArray)
{
audioTrack.controller = self;
}
@@ -448,13 +448,13 @@
return [audioArray count];
}
-- (HBAudio *) objectInAudioArrayAtIndex: (NSUInteger) index
+- (HBAudioTrack *) objectInAudioArrayAtIndex: (NSUInteger) index
{
return audioArray[index];
}
-- (void) insertObject: (HBAudio *) audioObject inAudioArrayAtIndex: (NSUInteger) index;
+- (void) insertObject: (HBAudioTrack *) audioObject inAudioArrayAtIndex: (NSUInteger) index;
{
[audioArray insertObject: audioObject atIndex: index];
diff --git a/macosx/HBAudio.h b/macosx/HBAudioTrack.h
index 14b191646..ed9749fa7 100644
--- a/macosx/HBAudio.h
+++ b/macosx/HBAudioTrack.h
@@ -1,14 +1,25 @@
-//
-// HBAudio.h
-// HandBrake
-//
-// Created on 2010-08-30.
-//
+/* HBAudioTrack.h $
-#import <Cocoa/Cocoa.h>
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr/>.
+ It may be used under the terms of the GNU General Public License. */
+
+#import <Foundation/Foundation.h>
@class HBAudioController;
+/**
+ * Audio track dicts keys.
+ */
+extern NSString *keyAudioTrackIndex;
+extern NSString *keyAudioTrackName;
+extern NSString *keyAudioInputBitrate;
+extern NSString *keyAudioInputSampleRate;
+extern NSString *keyAudioInputCodec;
+extern NSString *keyAudioInputCodecParam;
+extern NSString *keyAudioInputChannelLayout;
+extern NSString *keyAudioTrackLanguageIsoCode;
+
extern NSString *keyAudioCodecName;
extern NSString *keyAudioSampleRateName;
extern NSString *keyAudioBitrateName;
@@ -18,7 +29,7 @@ extern NSString *keyAudioMixdown;
extern NSString *keyAudioSamplerate;
extern NSString *keyAudioBitrate;
-@interface HBAudio : NSObject <NSCoding, NSCopying>
+@interface HBAudioTrack : NSObject <NSCoding, NSCopying>
@property (nonatomic, retain) NSDictionary *track;
@property (nonatomic, retain) NSDictionary *codec;
diff --git a/macosx/HBAudio.m b/macosx/HBAudioTrack.m
index d4129bde7..7b35411b4 100644
--- a/macosx/HBAudio.m
+++ b/macosx/HBAudioTrack.m
@@ -1,16 +1,24 @@
-//
-// HBAudio.m
-// HandBrake
-//
-// Created on 2010-08-30.
-//
-
-#import "HBAudio.h"
+/* HBAudioTrack.m $
+
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr/>.
+ It may be used under the terms of the GNU General Public License. */
+
+#import "HBAudioTrack.h"
#import "HBAudioController.h"
#import "HBJob.h"
#import "NSCodingMacro.h"
#import "hb.h"
+NSString *keyAudioTrackIndex = @"keyAudioTrackIndex";
+NSString *keyAudioTrackName = @"keyAudioTrackName";
+NSString *keyAudioInputBitrate = @"keyAudioInputBitrate";
+NSString *keyAudioInputSampleRate = @"keyAudioInputSampleRate";
+NSString *keyAudioInputCodec = @"keyAudioInputCodec";
+NSString *keyAudioInputCodecParam = @"keyAudioInputCodecParam";
+NSString *keyAudioInputChannelLayout = @"keyAudioInputChannelLayout";
+NSString *keyAudioTrackLanguageIsoCode = @"keyAudioTrackLanguageIsoCode";
+
NSString *keyAudioCodecName = @"keyAudioCodecName";
NSString *keyAudioSupportedMuxers = @"keyAudioSupportedMuxers";
NSString *keyAudioSampleRateName = @"keyAudioSampleRateName";
@@ -61,7 +69,7 @@ static NSMutableArray *masterBitRateArray = nil;
@end
-@implementation HBAudio
+@implementation HBAudioTrack
#pragma mark -
#pragma mark Object Setup
@@ -69,7 +77,7 @@ static NSMutableArray *masterBitRateArray = nil;
+ (void) initialize
{
- if ([HBAudio class] == self)
+ if ([HBAudioTrack class] == self)
{
masterCodecArray = [[NSMutableArray alloc] init]; // knowingly leaked
for (const hb_encoder_t *audio_encoder = hb_audio_encoder_get_next(NULL);
@@ -580,7 +588,7 @@ static NSMutableArray *masterBitRateArray = nil;
- (instancetype)copyWithZone:(NSZone *)zone
{
- HBAudio *copy = [[[self class] alloc] init];
+ HBAudioTrack *copy = [[[self class] alloc] init];
if (copy)
{
diff --git a/macosx/HBJob.h b/macosx/HBJob.h
index 0ae7fb0b1..721db9dfe 100644
--- a/macosx/HBJob.h
+++ b/macosx/HBJob.h
@@ -14,7 +14,7 @@
#import "HBPicture.h"
#import "HBFilters.h"
-#import "HBAudio.h"
+#import "HBAudioTrack.h"
#import "HBAudioTrackPreset.h"
#import "HBAudioDefaults.h"
@@ -26,19 +26,6 @@ extern NSString *HBMixdownChangedNotification;
extern NSString *HBContainerChangedNotification;
extern NSString *keyContainerTag;
-
-/**
- * Audio track dicts keys.
- */
-extern NSString *keyAudioTrackIndex;
-extern NSString *keyAudioTrackName;
-extern NSString *keyAudioInputBitrate;
-extern NSString *keyAudioInputSampleRate;
-extern NSString *keyAudioInputCodec;
-extern NSString *keyAudioInputCodecParam;
-extern NSString *keyAudioInputChannelLayout;
-extern NSString *keyAudioTrackLanguageIsoCode;
-
typedef NS_ENUM(NSUInteger, HBJobState) {
HBJobStateReady,
HBJobStateWorking,
diff --git a/macosx/HBJob.m b/macosx/HBJob.m
index 7847731d4..62280becc 100644
--- a/macosx/HBJob.m
+++ b/macosx/HBJob.m
@@ -7,21 +7,12 @@
#import "HBJob.h"
#import "HBPreset.h"
-#import "HBAudio.h"
+#import "HBAudioTrack.h"
#import "HBAudioController.h"
#import "HBSubtitlesController.h"
#import "NSCodingMacro.h"
-NSString *keyAudioTrackIndex = @"keyAudioTrackIndex";
-NSString *keyAudioTrackName = @"keyAudioTrackName";
-NSString *keyAudioInputBitrate = @"keyAudioInputBitrate";
-NSString *keyAudioInputSampleRate = @"keyAudioInputSampleRate";
-NSString *keyAudioInputCodec = @"keyAudioInputCodec";
-NSString *keyAudioInputCodecParam = @"keyAudioInputCodecParam";
-NSString *keyAudioInputChannelLayout = @"keyAudioInputChannelLayout";
-NSString *keyAudioTrackLanguageIsoCode = @"keyAudioTrackLanguageIsoCode";
-
NSString *HBMixdownChangedNotification = @"HBMixdownChangedNotification";
NSString *HBContainerChangedNotification = @"HBContainerChangedNotification";
NSString *keyContainerTag = @"keyContainerTag";
@@ -482,7 +473,7 @@ NSString *keyContainerTag = @"keyContainerTag";
// Audio tracks and mixdowns
// Now lets add our new tracks to the audio list here
- for (HBAudio *audioTrack in self.audioTracks)
+ for (HBAudioTrack *audioTrack in self.audioTracks)
{
if (audioTrack.enabled)
{
diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm
index cb49f9a42..205a6a5a2 100644
--- a/macosx/HBQueueController.mm
+++ b/macosx/HBQueueController.mm
@@ -789,7 +789,7 @@
NSMutableArray *audioDetails = [NSMutableArray arrayWithCapacity:job.audioTracks.count];
BOOL autoPassthruPresent = NO;
- for (HBAudio *audioTrack in job.audioTracks)
+ for (HBAudioTrack *audioTrack in job.audioTracks)
{
audioCodecSummary = [NSString stringWithFormat: @"%@", audioTrack.codec[keyAudioCodecName]];
NSNumber *drc = audioTrack.drc;
diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj
index 2572b468a..e5e26d054 100644
--- a/macosx/HandBrake.xcodeproj/project.pbxproj
+++ b/macosx/HandBrake.xcodeproj/project.pbxproj
@@ -23,7 +23,7 @@
273F208B14ADBE3B0021BE6D /* test.c in Sources */ = {isa = PBXBuildFile; fileRef = 273F208814ADBE3B0021BE6D /* test.c */; };
273F20AC14ADBE670021BE6D /* Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F208F14ADBE670021BE6D /* Controller.m */; };
273F20AD14ADBE670021BE6D /* HBAdvancedController.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F209014ADBE670021BE6D /* HBAdvancedController.m */; };
- 273F20AE14ADBE670021BE6D /* HBAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F209214ADBE670021BE6D /* HBAudio.m */; };
+ 273F20AE14ADBE670021BE6D /* HBAudioTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F209214ADBE670021BE6D /* HBAudioTrack.m */; };
273F20AF14ADBE670021BE6D /* HBAudioController.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F209414ADBE670021BE6D /* HBAudioController.m */; };
273F20B114ADBE670021BE6D /* HBDVDDetector.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F209814ADBE670021BE6D /* HBDVDDetector.m */; };
273F20B214ADBE670021BE6D /* HBImageAndTextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F209A14ADBE670021BE6D /* HBImageAndTextCell.m */; };
@@ -269,8 +269,8 @@
273F208E14ADBE670021BE6D /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Controller.h; sourceTree = "<group>"; };
273F208F14ADBE670021BE6D /* Controller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Controller.m; sourceTree = "<group>"; };
273F209014ADBE670021BE6D /* HBAdvancedController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBAdvancedController.m; sourceTree = "<group>"; };
- 273F209114ADBE670021BE6D /* HBAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBAudio.h; sourceTree = "<group>"; };
- 273F209214ADBE670021BE6D /* HBAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBAudio.m; sourceTree = "<group>"; };
+ 273F209114ADBE670021BE6D /* HBAudioTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBAudioTrack.h; sourceTree = "<group>"; };
+ 273F209214ADBE670021BE6D /* HBAudioTrack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBAudioTrack.m; sourceTree = "<group>"; };
273F209314ADBE670021BE6D /* HBAudioController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBAudioController.h; sourceTree = "<group>"; };
273F209414ADBE670021BE6D /* HBAudioController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBAudioController.m; sourceTree = "<group>"; };
273F209714ADBE670021BE6D /* HBDVDDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBDVDDetector.h; sourceTree = "<group>"; };
@@ -902,8 +902,8 @@
A932E272198834130047D13E /* HBAudioDefaults.m */,
A9F4728B1976BAA70009EC65 /* HBSubtitlesDefaults.h */,
A9F4728C1976BAA70009EC65 /* HBSubtitlesDefaults.m */,
- 273F209114ADBE670021BE6D /* HBAudio.h */,
- 273F209214ADBE670021BE6D /* HBAudio.m */,
+ 273F209114ADBE670021BE6D /* HBAudioTrack.h */,
+ 273F209214ADBE670021BE6D /* HBAudioTrack.m */,
A90A0CAD1988D57200DA65CE /* HBAudioTrackPreset.h */,
A90A0CAE1988D57200DA65CE /* HBAudioTrackPreset.m */,
A9AA447D1970729300D7DEFC /* HBPreviewGenerator.h */,
@@ -1190,7 +1190,7 @@
A9AA447A1970664A00D7DEFC /* HBUtilities.m in Sources */,
273F20AC14ADBE670021BE6D /* Controller.m in Sources */,
273F20AD14ADBE670021BE6D /* HBAdvancedController.m in Sources */,
- 273F20AE14ADBE670021BE6D /* HBAudio.m in Sources */,
+ 273F20AE14ADBE670021BE6D /* HBAudioTrack.m in Sources */,
A9DEC87A1A23C89E00C79B48 /* HBPicture.m in Sources */,
273F20AF14ADBE670021BE6D /* HBAudioController.m in Sources */,
A9537BF31A48A99500141102 /* HBVideo+UIAdditions.m in Sources */,