summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorritsuka <[email protected]>2014-12-30 08:32:05 +0000
committerritsuka <[email protected]>2014-12-30 08:32:05 +0000
commit72531bc27dda83a89049f4c45578fc2aad434c15 (patch)
treed8ca2cf2a01b98dc7b0a6452902a20fc4764ef8e
parentdf7f224eb16b327cbd07a4e77d49ded4c987f011 (diff)
MacGui: hide the iPod 5g check box if the codec is not h.264.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6678 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/English.lproj/MainMenu.xib2
-rw-r--r--macosx/HBJob+UIAdditions.h2
-rw-r--r--macosx/HBJob+UIAdditions.m14
-rw-r--r--macosx/HBJob.m14
4 files changed, 20 insertions, 12 deletions
diff --git a/macosx/English.lproj/MainMenu.xib b/macosx/English.lproj/MainMenu.xib
index 55b60f03f..13e98f79d 100644
--- a/macosx/English.lproj/MainMenu.xib
+++ b/macosx/English.lproj/MainMenu.xib
@@ -415,7 +415,7 @@
<font key="font" metaFont="smallSystem"/>
</buttonCell>
<connections>
- <binding destination="240" name="hidden" keyPath="self.job.mp4OptionsEnabled" id="Vlg-uB-45p">
+ <binding destination="240" name="hidden" keyPath="self.job.mp4iPodCompatibleEnabled" id="eGS-R2-zSV">
<dictionary key="options">
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
diff --git a/macosx/HBJob+UIAdditions.h b/macosx/HBJob+UIAdditions.h
index 0d1e315d3..a8adc4f25 100644
--- a/macosx/HBJob+UIAdditions.h
+++ b/macosx/HBJob+UIAdditions.h
@@ -10,6 +10,8 @@
@interface HBJob (UIAdditions)
@property (nonatomic, readonly) BOOL mp4OptionsEnabled;
+@property (nonatomic, readonly) BOOL mp4iPodCompatibleEnabled;
+
@property (nonatomic, readonly) NSArray *angles;
@end
diff --git a/macosx/HBJob+UIAdditions.m b/macosx/HBJob+UIAdditions.m
index 509668e17..e328c95c0 100644
--- a/macosx/HBJob+UIAdditions.m
+++ b/macosx/HBJob+UIAdditions.m
@@ -11,14 +11,12 @@
- (BOOL)mp4OptionsEnabled
{
- if (self.container & HB_MUX_MASK_MP4)
- {
- return YES;
- }
- else
- {
- return NO;
- }
+ return ((self.container & HB_MUX_MASK_MP4) != 0);
+}
+
+- (BOOL)mp4iPodCompatibleEnabled
+{
+ return ((self.container & HB_MUX_MASK_MP4) != 0) && (self.video.encoder & HB_VCODEC_H264_MASK);
}
- (NSArray *)angles
diff --git a/macosx/HBJob.m b/macosx/HBJob.m
index dccd9434c..3e0c8e3ec 100644
--- a/macosx/HBJob.m
+++ b/macosx/HBJob.m
@@ -128,6 +128,11 @@ NSString *keyContainerTag = @"keyContainerTag";
retval = [NSSet setWithObjects:@"container", nil];
}
+ if ([key isEqualToString:@"mp4iPodCompatibleEnabled"])
+ {
+ retval = [NSSet setWithObjects:@"container", @"video.encoder", nil];
+ }
+
return retval;
}
@@ -231,18 +236,21 @@ NSString *keyContainerTag = @"keyContainerTag";
job->chapter_markers = 0;
}
- if (job->vcodec == HB_VCODEC_X264 || job->vcodec == HB_VCODEC_X265)
+ if (job->vcodec == HB_VCODEC_X264)
{
// iPod 5G atom
job->ipod_atom = self.mp4iPodCompatible;
+ }
+ if (job->vcodec == HB_VCODEC_X264 || job->vcodec == HB_VCODEC_X265)
+ {
// set fastfirstpass if 2-pass and Turbo are enabled
if (self.video.twoPass)
{
job->fastfirstpass = self.video.turboTwoPass;
}
- // advanced x264 options
+ // advanced x264/x265 options
NSString *tmpString;
// translate zero-length strings to NULL for libhb
const char *encoder_preset = NULL;
@@ -260,7 +268,7 @@ NSString *keyContainerTag = @"keyContainerTag";
}
else
{
- // we are using the x264 preset system
+ // we are using the x264/x265 preset system
if ([(tmpString = self.video.completeTune) length])
{
encoder_tune = [tmpString UTF8String];