summaryrefslogtreecommitdiffstats
path: root/macosx/HBTitle.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-05-07 15:33:13 +0000
committerritsuka <[email protected]>2015-05-07 15:33:13 +0000
commit3217ba5b96189802755b90d098d29c2f900dfcbe (patch)
tree2ed1e4a7fbd497d0697664339e420e1801cbd990 /macosx/HBTitle.m
parent878199667e6a7c79ff39b3d48127324fcf2c53ad (diff)
MacGui: wrap more hb_title properties in HBTitle.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7162 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBTitle.m')
-rw-r--r--macosx/HBTitle.m48
1 files changed, 47 insertions, 1 deletions
diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m
index f2e5b4fb3..42453d34a 100644
--- a/macosx/HBTitle.m
+++ b/macosx/HBTitle.m
@@ -97,6 +97,11 @@ extern NSString *keySubTrackSrtCharCode;
}
}
+- (NSURL *)url
+{
+ return [NSURL fileURLWithPath:@(_hb_title->path)];
+}
+
- (int)index
{
return self.hb_title->index;
@@ -114,7 +119,7 @@ extern NSString *keySubTrackSrtCharCode;
- (int)frames
{
- return (self.hb_title->duration / 90000.) * (self.hb_title->vrate.num / (double)self.hb_title->vrate.den);
+ return (int) ((self.hb_title->duration / 90000.) * (self.hb_title->vrate.num / (double)self.hb_title->vrate.den));
}
- (NSString *)timeCode
@@ -123,6 +128,47 @@ extern NSString *keySubTrackSrtCharCode;
self.hb_title->hours, self.hb_title->minutes, self.hb_title->seconds];
}
+- (int)width
+{
+ return _hb_title->geometry.width;
+}
+
+- (int)height
+{
+ return _hb_title->geometry.height;
+}
+
+- (int)parWidth
+{
+ return _hb_title->geometry.par.num;
+}
+
+- (int)parHeight
+{
+ return _hb_title->geometry.par.den;
+}
+
+- (int)autoCropTop
+{
+ return _hb_title->crop[0];
+}
+
+- (int)autoCropBottom
+{
+ return _hb_title->crop[1];
+}
+
+- (int)autoCropLeft
+{
+ return _hb_title->crop[2];
+}
+
+- (int)autoCropRight
+{
+ return _hb_title->crop[3];
+}
+
+
- (NSArray *)audioTracks
{
if (!_audioTracks)