diff options
author | ritsuka <[email protected]> | 2014-12-23 10:23:59 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-12-23 10:23:59 +0000 |
commit | a66b692e29674de9c444fd54f0493d03b4900abc (patch) | |
tree | 1356eec981d0542ad6ca9087794e7cc52a09c664 /macosx/HBTitle.m | |
parent | ee10e1fdb417c7f1047406522379c85c47143bfd (diff) |
MacGui: move the UI helper methods to new categories. Implement NSCoding in more classes.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6643 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBTitle.m')
-rw-r--r-- | macosx/HBTitle.m | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m index 274b47c7a..6d179e383 100644 --- a/macosx/HBTitle.m +++ b/macosx/HBTitle.m @@ -96,11 +96,21 @@ extern NSString *keySubTrackSrtCharCode; } } -- (NSInteger)angles +- (int)angles { return self.hb_title->angle_count; } +- (int)duration +{ + return (self.hb_title->hours * 3600) + (self.hb_title->minutes * 60) + (self.hb_title->seconds); +} + +- (int)frames +{ + return self.duration * (self.hb_title->vrate.num / self.hb_title->vrate.den); +} + - (NSArray *)audioTracks { if (!_audioTracks) |