1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
/* HBJob.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>
#import "HBPreset.h"
#import "HBTitle.h"
#import "HBRange.h"
#import "HBVideo.h"
#import "HBPicture.h"
#import "HBFilters.h"
#import "HBAudio.h"
#import "HBAudioTrackPreset.h"
#import "HBAudioDefaults.h"
#import "HBSubtitlesDefaults.h"
#include "hb.h"
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,
HBJobStateCompleted,
HBJobStateCanceled
};
/**
* HBJob
*/
@interface HBJob : NSObject <NSCoding, NSCopying>
- (instancetype)initWithTitle:(HBTitle *)title andPreset:(HBPreset *)preset;
- (void)applyPreset:(HBPreset *)preset;
- (void)applyCurrentSettingsToPreset:(NSMutableDictionary *)dict;
/**
* Current state of the job.
*/
@property (nonatomic, readwrite) HBJobState state;
@property (nonatomic, readwrite, assign) HBTitle *title;
@property (nonatomic, readonly) int titleIdx;
@property (nonatomic, readwrite) int pidId;
// Urls
@property (nonatomic, readonly) NSURL *fileURL;
@property (nonatomic, readwrite, copy) NSURL *destURL;
// Libhb job
@property (nonatomic, readonly) hb_job_t *hb_job;
@property (nonatomic, readonly) NSAttributedString *jobDescription;
// Job settings
@property (nonatomic, readwrite) int container;
@property (nonatomic, readwrite) int angle;
@property (nonatomic, readwrite) BOOL mp4HttpOptimize;
@property (nonatomic, readwrite) BOOL mp4iPodCompatible;
@property (nonatomic, readonly) HBRange *range;
@property (nonatomic, readonly) HBVideo *video;
@property (nonatomic, readonly) HBPicture *picture;
@property (nonatomic, readonly) HBFilters *filters;
@property (nonatomic, readonly) NSMutableArray *audioTracks;
@property (nonatomic, readonly) NSMutableArray *subtitlesTracks;
@property (nonatomic, readwrite) BOOL chaptersEnabled;
@property (nonatomic, readonly) NSMutableArray *chapterTitles;
// Defaults settings
@property (nonatomic, readonly) HBAudioDefaults *audioDefaults;
@property (nonatomic, readonly) HBSubtitlesDefaults *subtitlesDefaults;
@end
|