diff options
author | Damiano Galassi <[email protected]> | 2019-08-13 10:27:05 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2019-08-13 10:27:05 +0200 |
commit | f2a619679551fd988c4e28bf68108f174d64fb3d (patch) | |
tree | 3b7b294d44d5afd20a864c2b9d2f3676f7a4749a /macosx/HBTitle.h | |
parent | 5b3c3c620855130c7bcd47685ad69a765e0cfd7b (diff) |
MacGui: convert the last usage of NSDictionary to a proper class, fix external subtitles tracks when sandboxed. Add initial support to the model to store the track title.
Diffstat (limited to 'macosx/HBTitle.h')
-rw-r--r-- | macosx/HBTitle.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/macosx/HBTitle.h b/macosx/HBTitle.h index bf87c1385..cf6a25d9e 100644 --- a/macosx/HBTitle.h +++ b/macosx/HBTitle.h @@ -9,7 +9,6 @@ NS_ASSUME_NONNULL_BEGIN @class HBChapter; -@class HBPreset; @interface HBMetadata : NSObject @@ -26,6 +25,37 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface HBTitleAudioTrack : NSObject<NSSecureCoding> + +- (instancetype)initWithDisplayName:(NSString *)displayName; + +@property (nonatomic, readonly) NSString *displayName; +@property (nonatomic, readonly, nullable) NSString *title; + +@property (nonatomic, readonly) int bitRate; +@property (nonatomic, readonly) int sampleRate; +@property (nonatomic, readonly) int codec; +@property (nonatomic, readonly) int codecParam; +@property (nonatomic, readonly) uint64_t channelLayout; + +@property (nonatomic, readonly) NSString *isoLanguageCode; + +@end + +@interface HBTitleSubtitlesTrack : NSObject<NSSecureCoding> + +- (instancetype)initWithDisplayName:(NSString *)displayName type:(int)type fileURL:(nullable NSURL *)fileURL; + +@property (nonatomic, readonly) NSString *displayName; +@property (nonatomic, readonly, nullable) NSString *title; + +@property (nonatomic, readonly) int type; +@property (nonatomic, readonly) NSString *isoLanguageCode; + +@property (nonatomic, readonly, nullable) NSURL *fileURL; + +@end + /** * HBTitles is an interface to the low-level hb_title_t. * the properties are lazy-loaded. @@ -57,8 +87,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly) int autoCropLeft; @property (nonatomic, readonly) int autoCropRight; -@property (nonatomic, readonly) NSArray<NSDictionary<NSString *, id> *> *audioTracks; -@property (nonatomic, readonly) NSArray<NSDictionary<NSString *, id> *> *subtitlesTracks; +@property (nonatomic, readonly) NSArray<HBTitleAudioTrack *> *audioTracks; +@property (nonatomic, readonly) NSArray<HBTitleSubtitlesTrack *> *subtitlesTracks; @property (nonatomic, readonly) NSArray<HBChapter *> *chapters; @property (nonatomic, readonly) HBMetadata *metadata; |