summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorJustin Bull <[email protected]>2019-02-13 09:52:48 -0500
committerJohn Stebbins <[email protected]>2019-02-13 06:52:48 -0800
commitd0e37ca0d75fbcef5bdf47aafe8543e262314ec5 (patch)
treee2766be1f7734793f992bf4c1dbd4ede1b97e086 /macosx
parent7cc7d562b6c67c875b684a48451910af37b3fda7 (diff)
Add WebM support (#1822)
Note that since webm has no official subtitle support, only burned in subtitles can be used with this muxer at this time.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBAudioTrack.m2
-rw-r--r--macosx/HBJob+UIAdditions.m12
-rw-r--r--macosx/HBPreviewGenerator.m4
-rw-r--r--macosx/HBVideo.m2
-rw-r--r--macosx/HandBrakeKit/de.lproj/Localizable.strings3
5 files changed, 21 insertions, 2 deletions
diff --git a/macosx/HBAudioTrack.m b/macosx/HBAudioTrack.m
index a77305cf4..fd7865646 100644
--- a/macosx/HBAudioTrack.m
+++ b/macosx/HBAudioTrack.m
@@ -251,7 +251,7 @@ NSString *keyAudioTrackLanguageIsoCode = @"keyAudioTrackLanguageIsoCode";
}
}
- return HB_ACODEC_CA_AAC;
+ return hb_audio_encoder_get_default(self.container);
}
else
{
diff --git a/macosx/HBJob+UIAdditions.m b/macosx/HBJob+UIAdditions.m
index 4c1cdc8ae..56c721271 100644
--- a/macosx/HBJob+UIAdditions.m
+++ b/macosx/HBJob+UIAdditions.m
@@ -78,6 +78,10 @@ static NSDictionary *shortHeightAttr;
{
title = HBKitLocalizedString(@"MKV File", @"HBJob -> Format display name");
}
+ else if (container->format & HB_MUX_MASK_WEBM)
+ {
+ title = HBKitLocalizedString(@"WebM File", @"HBJob -> Format display name");
+ }
else
{
title = @(container->name);
@@ -922,6 +926,10 @@ static NSDictionary *shortHeightAttr;
{
return HBKitLocalizedString(@"MKV File", @"HBJob -> Format display name");
}
+ else if (container & HB_MUX_MASK_WEBM)
+ {
+ return HBKitLocalizedString(@"WebM File", @"HBJob -> Format display name");
+ }
else
{
const char *name = hb_container_get_name(container);
@@ -951,6 +959,10 @@ static NSDictionary *shortHeightAttr;
{
return @(HB_MUX_AV_MKV);
}
+ else if ([value isEqualToString:HBKitLocalizedString(@"WebM File", @"HBJob -> Format display name")])
+ {
+ return @(HB_MUX_AV_WEBM);
+ }
return @(hb_container_get_from_name([value UTF8String]));
}
diff --git a/macosx/HBPreviewGenerator.m b/macosx/HBPreviewGenerator.m
index efc95e011..dde0ccd32 100644
--- a/macosx/HBPreviewGenerator.m
+++ b/macosx/HBPreviewGenerator.m
@@ -255,6 +255,10 @@
{
destURL = [HBPreviewGenerator generateFileURLForType:@"mkv"];
}
+ else if (self.job.container & 0x400000 /*HB_MUX_MASK_WEBM*/)
+ {
+ destURL = [HBPreviewGenerator generateFileURLForType:@"webm"];
+ }
// return if we couldn't get the fileURL.
if (!destURL)
diff --git a/macosx/HBVideo.m b/macosx/HBVideo.m
index a1fb9bd71..bf8c00d67 100644
--- a/macosx/HBVideo.m
+++ b/macosx/HBVideo.m
@@ -202,7 +202,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
if (!encoderSupported)
{
- self.encoder = HB_VCODEC_X264;
+ self.encoder = hb_video_encoder_get_default(self.job.container);
}
}
diff --git a/macosx/HandBrakeKit/de.lproj/Localizable.strings b/macosx/HandBrakeKit/de.lproj/Localizable.strings
index d3a9eb993..5506abf4c 100644
--- a/macosx/HandBrakeKit/de.lproj/Localizable.strings
+++ b/macosx/HandBrakeKit/de.lproj/Localizable.strings
@@ -208,6 +208,9 @@
"MKV File" = "MKV-Datei";
/* HBJob -> Format display name */
+"WebM File" = "WebM-Datei";
+
+/* HBJob -> Format display name */
"MP4 File" = "MP4-Datei";
/* HBStateFormatter -> pass display name */