summaryrefslogtreecommitdiffstats
path: root/macosx/HBJob.h
blob: fc8bbb9560894ec0805b83b3c2d15df5ebea58a9 (plain)
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
/*  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>

@class HBPreset;

@class HBTitle;

@class HBVideo;
@class HBPicture;
@class HBFilters;

@class HBAudioDefaults;
@class HBSubtitlesDefaults;

typedef NS_ENUM(NSUInteger, HBJobStatus) {
    HBJobStatusNone,
    HBJobStatusWorking,
    HBJobStatusCompleted,
    HBJobStatusCanceled
};

/**
 * HBJob
 */
@interface HBJob : NSObject <NSCoding, NSCopying>

- (instancetype)initWithTitle:(HBTitle *)title url:(NSURL *)fileURL andPreset:(HBPreset *)preset;

@property (nonatomic, readonly) HBJobStatus status;

// libhb
@property (nonatomic, readonly) HBTitle *title;
@property (nonatomic, readonly) NSURL *fileURL;

// Old job format
@property (nonatomic, readwrite, retain) NSDictionary *jobDict;
@property (nonatomic, readonly) NSAttributedString *jobDescription;

// Job settings
@property (nonatomic, readwrite) int fileFormat;

@property (nonatomic, readwrite) BOOL mp4LargeFile;
@property (nonatomic, readwrite) BOOL mp4HttpOptimize;
@property (nonatomic, readwrite) BOOL mp4iPodCompatible;

@property (nonatomic, readonly) HBVideo *video;
@property (nonatomic, readonly) HBPicture *picture;
@property (nonatomic, readonly) HBFilters *filters;

// Defaults settings
@property (nonatomic, readonly) HBAudioDefaults *audioDefaults;
@property (nonatomic, readonly) HBSubtitlesDefaults *subtitlesDefaults;

@end