Commit f851dd21 authored by GitLab CI's avatar GitLab CI

Merge remote-tracking branch 'upstream/master' into master-build

* upstream/master:
  encavcodec: fix chapter mark postion for nvenc encodes
  ffmpeg: fix seeking in mkv > 2GB
  MacGui: update sign script to sign the new xpc service.
  MacGui: fix a warnings and the tests.
  MacGui: make it possible to localize mixdowns.
  make: Rearrange configure.py help output into a more logical order.
  make: Revise security section comments in configure.py.
  make: Move harden option to the new Security group in configure.py.
  make: Move sandbox option into new Security group in configure.py.
  make: Add a configure.py option to enable app sandbox.
  Better error message when avcodec_find_encoder_by_name() fails (#2252)
parents 55cbcd0d a58118b8
From c294f38c91f440880ffd28fda0eeb1154431ab7e Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Date: Sat, 17 Aug 2019 02:27:51 +0200
Subject: [PATCH] avformat/matroskadec: Fix seeking
matroska_reset_status (a function that is used during seeking (among
other things)) used an int for the return value of avio_seek which
returns an int64_t. Checking the return value then indicated an error
even though the seek was successfull for targets in the range of
2GB-4GB, 6GB-8GB, ... This error implied that the status hasn't been
reset and in particular, the old level was still considered to be in
force, so that ebml_parse returned errors because the newly parsed
elements were of course not contained in the previously active and still
wrongly considered active master element any more.
Addresses ticket #8084.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavformat/matroskadec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 4e20f15792..1ea9b807e6 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -757,7 +757,7 @@ static int matroska_reset_status(MatroskaDemuxContext *matroska,
uint32_t id, int64_t position)
{
if (position >= 0) {
- int err = avio_seek(matroska->ctx->pb, position, SEEK_SET);
+ int64_t err = avio_seek(matroska->ctx->pb, position, SEEK_SET);
if (err < 0)
return err;
}
--
2.21.0
......@@ -102,6 +102,7 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
{
int ret = 0;
char reason[80];
char * codec_name = NULL;
AVCodec * codec = NULL;
AVCodecContext * context;
AVRational fps;
......@@ -121,37 +122,37 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
case AV_CODEC_ID_MPEG4:
{
hb_log("encavcodecInit: MPEG-4 ASP encoder");
codec = avcodec_find_encoder_by_name("mpeg4");
codec_name = "mpeg4";
} break;
case AV_CODEC_ID_MPEG2VIDEO:
{
hb_log("encavcodecInit: MPEG-2 encoder");
codec = avcodec_find_encoder_by_name("mpeg2video");
codec_name = "mpeg2video";
} break;
case AV_CODEC_ID_VP8:
{
hb_log("encavcodecInit: VP8 encoder");
codec = avcodec_find_encoder_by_name("libvpx");
codec_name = "libvpx";
} break;
case AV_CODEC_ID_VP9:
{
hb_log("encavcodecInit: VP9 encoder");
codec = avcodec_find_encoder_by_name("libvpx-vp9");
codec_name = "libvpx-vp9";
} break;
case AV_CODEC_ID_H264:
{
switch (job->vcodec) {
case HB_VCODEC_FFMPEG_NVENC_H264:
hb_log("encavcodecInit: H.264 (Nvidia NVENC)");
codec = avcodec_find_encoder_by_name("h264_nvenc");
codec_name = "h264_nvenc";
break;
case HB_VCODEC_FFMPEG_VCE_H264:
hb_log("encavcodecInit: H.264 (AMD VCE)");
codec = avcodec_find_encoder_by_name("h264_amf");
codec_name = "h264_amf";
break;
case HB_VCODEC_FFMPEG_VT_H264:
hb_log("encavcodecInit: H.264 (VideoToolbox)");
codec = avcodec_find_encoder_by_name("h264_videotoolbox");
codec_name = "h264_videotoolbox";
break;
}
}break;
......@@ -160,30 +161,36 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
switch (job->vcodec) {
case HB_VCODEC_FFMPEG_NVENC_H265:
hb_log("encavcodecInit: H.265 (Nvidia NVENC)");
codec = avcodec_find_encoder_by_name("hevc_nvenc");
codec_name = "hevc_nvenc";
break;
case HB_VCODEC_FFMPEG_VCE_H265:
hb_log("encavcodecInit: H.265 (AMD VCE)");
codec = avcodec_find_encoder_by_name("hevc_amf");
codec_name = "hevc_amf";
break;
case HB_VCODEC_FFMPEG_VT_H265:
hb_log("encavcodecInit: H.265 (VideoToolbox)");
codec = avcodec_find_encoder_by_name("hevc_videotoolbox");
codec_name = "hevc_videotoolbox";
break;
}
}break;
default:
{
hb_error("encavcodecInit: unsupported encoder!");
ret = 1;
goto done;
}
}
if (codec_name == NULL)
{
// Catch all when the switch above fails
hb_log( "encavcodecInit: Unable to determine codec_name "
"from hb_work_object_t.codec_param=%d and "
"hb_job_t.vcodec=%x", w->codec_param,
job->vcodec );
ret = 1;
goto done;
}
codec = avcodec_find_encoder_by_name(codec_name);
if( !codec )
{
hb_log( "encavcodecInit: avcodec_find_encoder "
"failed" );
hb_log( "encavcodecInit: avcodec_find_encoder_by_name(%s) "
"failed", codec_name );
ret = 1;
goto done;
}
......@@ -365,10 +372,6 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
av_dict_set( &av_opts, "init_qpB", qualityB, 0 );
av_dict_set( &av_opts, "init_qpI", qualityI, 0 );
hb_log( "encavcodec: encoding at rc=vbr %.2f", job->vquality );
// Force IDR frames when we force a new keyframe for chapters
av_dict_set( &av_opts, "forced-idr", "1", 0 );
}
else if ( job->vcodec == HB_VCODEC_FFMPEG_VCE_H264 || job->vcodec == HB_VCODEC_FFMPEG_VCE_H265 )
{
......@@ -530,8 +533,12 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
//context->tier = FF_TIER_UNKNOWN;
}
if ( job->vcodec == HB_VCODEC_FFMPEG_NVENC_H264 || job->vcodec == HB_VCODEC_FFMPEG_NVENC_H265 )
if (job->vcodec == HB_VCODEC_FFMPEG_NVENC_H264 ||
job->vcodec == HB_VCODEC_FFMPEG_NVENC_H265)
{
// Force IDR frames when we force a new keyframe for chapters
av_dict_set( &av_opts, "forced-idr", "1", 0 );
// Set profile and level
if (job->encoder_profile != NULL && *job->encoder_profile)
{
......
......@@ -1669,7 +1669,7 @@ int hb_global_init_no_hardware()
int hb_global_init()
{
/* Print hardening status on global init */
#if HB_PROJECT_HOST_HARDEN
#if HB_PROJECT_SECURITY_HARDEN
hb_log( "Compile-time hardening features are enabled" );
#endif
......
......@@ -38,7 +38,6 @@ dnl
<<#>>define HB_PROJECT_HOST_RELEASE "__HOST_release"
<<#>>define HB_PROJECT_HOST_TITLE "__HOST_title"
<<#>>define HB_PROJECT_HOST_ARCH "__HOST_arch"
<<#>>define HB_PROJECT_HOST_HARDEN __HOST_harden
<<#>>define HB_PROJECT_FEATURE_ASM __FEATURE_asm
<<#>>define HB_PROJECT_FEATURE_FDK_AAC __FEATURE_fdk_aac
......@@ -54,4 +53,6 @@ dnl
<<#>>define HB_PROJECT_FEATURE_X265 __FEATURE_x265
<<#>>define HB_PROJECT_FEATURE_NUMA __FEATURE_numa
<<#>>define HB_PROJECT_SECURITY_HARDEN __SECURITY_harden
#endif /* HB_PROJECT_PROJECT_H */
This diff is collapsed.
......@@ -360,13 +360,17 @@ Dolby Surround and Dolby Pro Logic II convert multi-channel audio to stereo and
</popUpButtonCell>
<accessibility description="Mixdown"/>
<connections>
<binding destination="uS1-Fd-V9I" name="selectedValue" keyPath="objectValue.mixdown" previousBinding="Mgj-Wp-HJE" id="uAM-Z4-LBG">
<binding destination="uS1-Fd-V9I" name="content" keyPath="objectValue.mixdowns" id="NKE-F5-7xp">
<dictionary key="options">
<string key="NSValueTransformerName">HBMixdownTransformer</string>
<string key="NSValueTransformerName">HBMixdownsTransformer</string>
</dictionary>
</binding>
<binding destination="uS1-Fd-V9I" name="enabled" keyPath="objectValue.mixdownEnabled" id="c7n-yf-re8"/>
<binding destination="uS1-Fd-V9I" name="content" keyPath="objectValue.mixdowns" id="Mgj-Wp-HJE"/>
<binding destination="uS1-Fd-V9I" name="selectedValue" keyPath="objectValue.mixdown" previousBinding="NKE-F5-7xp" id="OiI-FJ-A66">
<dictionary key="options">
<string key="NSValueTransformerName">HBMixdownTransformer</string>
</dictionary>
</binding>
</connections>
</popUpButton>
</subviews>
......
......@@ -19,6 +19,9 @@
@interface HBEncoderTransformer : NSValueTransformer
@end
@interface HBMixdownsTransformer : NSValueTransformer
@end
@interface HBMixdownTransformer : NSValueTransformer
@end
......
......@@ -119,24 +119,126 @@
@end
@implementation HBMixdownTransformer
static NSDictionary<NSString *, NSString *> *localizedMixdownsNames;
static NSDictionary<NSString *, NSNumber *> *localizedReversedMixdownsNames;
+ (Class)transformedValueClass
@implementation HBMixdownsTransformer
+ (void)initialize
{
return [NSString class];
if (self == [HBMixdownsTransformer class]) {
localizedMixdownsNames =
@{@"None": HBKitLocalizedString(@"None", @"HBAudio -> Mixdown"),
@"Mono": HBKitLocalizedString(@"Mono", @"HBAudio -> Mixdown"),
@"Mono (Left Only)": HBKitLocalizedString(@"Mono (Left Only)", @"HBAudio -> Mixdown"),
@"Mono (Right Only)": HBKitLocalizedString(@"Mono (Right Only)", @"HBAudio -> Mixdown"),
@"Stereo": HBKitLocalizedString(@"Stereo", @"HBAudio -> Mixdown"),
@"Dolby Surround": HBKitLocalizedString(@"Dolby Surround", @"HBAudio -> Mixdown"),
@"Dolby Pro Logic II": HBKitLocalizedString(@"Dolby Pro Logic II", @"HBAudio -> Mixdown"),
@"5.1 Channels": HBKitLocalizedString(@"5.1 Channels", @"HBAudio -> Mixdown"),
@"6.1 Channels": HBKitLocalizedString(@"6.1 Channels", @"HBAudio -> Mixdown"),
@"7.1 Channels": HBKitLocalizedString(@"7.1 Channels", @"HBAudio -> Mixdown"),
@"7.1 (5F/2R/LFE)": HBKitLocalizedString(@"7.1 (5F/2R/LFE)", @"HBAudio -> Mixdown"),
};
localizedReversedMixdownsNames =
@{HBKitLocalizedString(@"None", @"HBAudio -> Mixdown"): @(HB_AMIXDOWN_NONE),
HBKitLocalizedString(@"Mono", @"HBAudio -> Mixdown"): @(HB_AMIXDOWN_MONO),
HBKitLocalizedString(@"Mono (Left Only)", @"HBAudio -> Mixdown"): @(HB_AMIXDOWN_LEFT),
HBKitLocalizedString(@"Mono (Right Only)", @"HBAudio -> Mixdown"): @(HB_AMIXDOWN_RIGHT),
HBKitLocalizedString(@"Stereo", @"HBAudio -> Mixdown"): @(HB_AMIXDOWN_STEREO),
HBKitLocalizedString(@"Dolby Surround", @"HBAudio -> Mixdown"): @(HB_AMIXDOWN_DOLBY),
HBKitLocalizedString(@"Dolby Pro Logic II", @"HBAudio -> Mixdown"): @(HB_AMIXDOWN_DOLBYPLII),
HBKitLocalizedString(@"5.1 Channels", @"HBAudio -> Mixdown"): @(HB_AMIXDOWN_5POINT1),
HBKitLocalizedString(@"6.1 Channels", @"HBAudio -> Mixdown"): @(HB_AMIXDOWN_6POINT1),
HBKitLocalizedString(@"7.1 Channels", @"HBAudio -> Mixdown"): @(HB_AMIXDOWN_7POINT1),
HBKitLocalizedString(@"7.1 (5F/2R/LFE)", @"HBAudio -> Mixdown"): @(HB_AMIXDOWN_5_2_LFE),
};
}
}
- (id)transformedValue:(id)value
+ (NSString *)localizedNameFromMixdown:(int)mixdown
{
const char *name = hb_mixdown_get_name([value intValue]);
if (name)
switch(mixdown)
{
return @(name);
case HB_AMIXDOWN_NONE:
return HBKitLocalizedString(@"None", @"HBAudio -> Mixdown");
case HB_AMIXDOWN_MONO:
return HBKitLocalizedString(@"Mono", @"HBAudio -> Mixdown");
case HB_AMIXDOWN_LEFT:
return HBKitLocalizedString(@"Mono (Left Only)", @"HBAudio -> Mixdown");
case HB_AMIXDOWN_RIGHT:
return HBKitLocalizedString(@"Mono (Right Only)", @"HBAudio -> Mixdown");
case HB_AMIXDOWN_STEREO:
return HBKitLocalizedString(@"Stereo", @"HBAudio -> Mixdown");
case HB_AMIXDOWN_DOLBY:
return HBKitLocalizedString(@"Dolby Surround", @"HBAudio -> Mixdown");
case HB_AMIXDOWN_DOLBYPLII:
return HBKitLocalizedString(@"Dolby Pro Logic II", @"HBAudio -> Mixdown");
case HB_AMIXDOWN_5POINT1:
return HBKitLocalizedString(@"5.1 Channels", @"HBAudio -> Mixdown");
case HB_AMIXDOWN_6POINT1:
return HBKitLocalizedString(@"6.1 Channels", @"HBAudio -> Mixdown");
case HB_AMIXDOWN_7POINT1:
return HBKitLocalizedString(@"7.1 Channels", @"HBAudio -> Mixdown");
case HB_AMIXDOWN_5_2_LFE:
return HBKitLocalizedString(@"7.1 (5F/2R/LFE)", @"HBAudio -> Mixdown");
default:
{
const char *name = hb_mixdown_get_name(mixdown);
return name ? @(name) : nil;
}
}
else
}
+ (NSNumber *)mixdownFromLocalizedName:(NSString *)name
{
NSNumber *mixdown = localizedReversedMixdownsNames[name];
return mixdown ? mixdown : @(hb_mixdown_get_from_name(name.UTF8String));
}
+ (Class)transformedValueClass
{
return [NSArray class];
}
- (id)transformedValue:(id)value
{
if (value != nil)
{
return nil;
NSMutableArray *localizedArray = [[NSMutableArray alloc] initWithCapacity:[value count]];
for (NSString *text in value)
{
NSString *localizedName = localizedMixdownsNames[text];
if (localizedName)
{
[localizedArray addObject:localizedName];
}
}
return localizedArray;
}
return value;
}
+ (BOOL)allowsReverseTransformation
{
return NO;
}
@end
@implementation HBMixdownTransformer
+ (Class)transformedValueClass
{
return [NSString class];
}
- (id)transformedValue:(id)value
{
return [HBMixdownsTransformer localizedNameFromMixdown:[value intValue]];
}
+ (BOOL)allowsReverseTransformation
......@@ -146,7 +248,7 @@
- (id)reverseTransformedValue:(id)value
{
return @(hb_mixdown_get_from_name([value UTF8String]));
return [HBMixdownsTransformer mixdownFromLocalizedName:value];
}
@end
......
......@@ -187,7 +187,7 @@ typedef void (^HBCoreCleanupHandler)(void);
NSAssert(url, @"[HBCore canScan:] called with nil url.");
#ifdef __SANDBOX_ENABLED__
HBSecurityAccessToken *token = [HBSecurityAccessToken tokenWithObject:url];
__unused HBSecurityAccessToken *token = [HBSecurityAccessToken tokenWithObject:url];
#endif
if (![[NSFileManager defaultManager] fileExistsAtPath:url.path]) {
......
......@@ -107,7 +107,7 @@
*/
- (IBAction)removeSelectedQueueItem:(id)sender
{
NSMutableIndexSet *targetedRows = [[self.tableView targetedRowIndexes] mutableCopy];
NSIndexSet *targetedRows = self.tableView.targetedRowIndexes;
[self.delegate tableViewRemoveItemsAtIndexes:targetedRows];
}
......@@ -116,7 +116,7 @@
*/
- (IBAction)revealSelectedQueueItems:(id)sender
{
NSIndexSet *targetedRows = [self.tableView targetedRowIndexes];
NSIndexSet *targetedRows = self.tableView.targetedRowIndexes;
NSMutableArray<NSURL *> *urls = [[NSMutableArray alloc] init];
NSUInteger currentIndex = [targetedRows firstIndex];
......
......@@ -89,6 +89,18 @@
/* Title description */
"2 Video Passes First Turbo" = "2 passaggi video primo in turbo";
/* HBAudio -> Mixdown */
"5.1 Channels" = "5.1 Canali";
/* HBAudio -> Mixdown */
"6.1 Channels" = "6.1 Canali";
/* HBAudio -> Mixdown */
"7.1 (5F/2R/LFE)" = "7.1 (5F/2R/LFE)";
/* HBAudio -> Mixdown */
"7.1 Channels" = "7.1 Canali";
/* Audio description */
"Audio:" = "Audio:";
......@@ -159,6 +171,15 @@
/* Dimensions description */
"Dimensions:" = "Dimensioni:";
/* HBAudio -> Mixdown */
"Dolby Pro Logic II" = "Dolby Pro Logic II";
/* HBAudio -> Mixdown */
"Dolby Surround" = "Dolby Surround";
/* Audio description */
"DRC: %.2f" = "DRC: %.2f";
/* Video description */
"Encoder: %@, " = "Codificatore: %@, ";
......@@ -244,6 +265,15 @@
/* HBJob -> Format display name */
"MKV File" = "MKV File";
/* HBAudio -> Mixdown */
"Mono" = "Mono";
/* HBAudio -> Mixdown */
"Mono (Left Only)" = "Mono (Solo sinistro)";
/* HBAudio -> Mixdown */
"Mono (Right Only)" = "Mono (Solo destro)";
/* HBJob -> Format display name */
"MP4 File" = "MP4 File";
......@@ -259,7 +289,8 @@
/* HBVideo -> tune */
"none" = "nessuna";
/* HBAudio -> none track name
/* HBAudio -> Mixdown
HBAudio -> none track name
HBJob -> filters short description
HBSubtitles -> none track name */
"None" = "Nessuno";
......@@ -277,6 +308,9 @@
/* HBStateFormatter -> work pass number format */
"Pass %d of %d, %.2f %%" = "Passaggio %1$d di %2$d, %3$.2f %%";
/* HBStateFormatter -> work first pass number format */
"Pass 1" = "Passaggio 1";
/* HBStateFormatter -> pass display name */
"Paused" = "In pausa";
......@@ -334,6 +368,9 @@
/* HBPicture -> short info */
"Source: %dx%d, " = "Sorgente: %1$dx%2$d, ";
/* HBAudio -> Mixdown */
"Stereo" = "Stereo";
/* Subtitles description */
"Subtitles:" = "Sottotitoli:";
......
......@@ -47,7 +47,7 @@
dispatch_semaphore_t sem = dispatch_semaphore_create(0);
self.core = [[HBCore alloc] initWithLogLevel:1 queue:self.queue];
[self.core scanURL:sampleURL titleIndex:0 previews:1 minDuration:0 progressHandler:^(HBState state, HBProgress progress, NSString * _Nonnull info) {
[self.core scanURL:sampleURL titleIndex:0 previews:1 minDuration:0 keepPreviews:NO progressHandler:^(HBState state, HBProgress progress, NSString * _Nonnull info) {
} completionHandler:^(HBCoreResult result) {
dispatch_semaphore_signal(sem);
......
......@@ -109,6 +109,7 @@ for TARGET in "${@}"; do
done
echo " Signing XPC Services"
sign "${TARGET}"/Contents/XPCServices/HandBrakeXPCService.xpc fr.handbrake.HandBrake
sign "${TARGET}"/Contents/XPCServices/org.sparkle-project.Downloader.xpc org.sparkle-project.Downloader
sign "${TARGET}"/Contents/XPCServices/org.sparkle-project.InstallerConnection.xpc org.sparkle-project.InstallerConnection
sign "${TARGET}"/Contents/XPCServices/org.sparkle-project.InstallerLauncher.xpc org.sparkle-project.InstallerLauncher
......@@ -127,6 +128,7 @@ for TARGET in "${@}"; do
codesign --verify -vv "${TARGET}"/Contents/Frameworks/Sparkle.framework/Versions/Current/Resources/Updater.app >>"${LOG}" 2>&1 || exit_with_error 1 "Validation failed. More info may be available in ${NAME}.log"
echo " Validating XPC Services"
codesign --verify -vv "${TARGET}"/Contents/XPCServices/HandBrakeXPCService.xpc >>"${LOG}" 2>&1 || exit_with_error 1 "Validation failed. More info may be available in ${NAME}.log"
codesign --verify -vv "${TARGET}"/Contents/XPCServices/org.sparkle-project.Downloader.xpc >>"${LOG}" 2>&1 || exit_with_error 1 "Validation failed. More info may be available in ${NAME}.log"
codesign --verify -vv "${TARGET}"/Contents/XPCServices/org.sparkle-project.InstallerConnection.xpc >>"${LOG}" 2>&1 || exit_with_error 1 "Validation failed. More info may be available in ${NAME}.log"
codesign --verify -vv "${TARGET}"/Contents/XPCServices/org.sparkle-project.InstallerLauncher.xpc >>"${LOG}" 2>&1 || exit_with_error 1 "Validation failed. More info may be available in ${NAME}.log"
......
......@@ -11,7 +11,7 @@
"GaR-qk-UW7.title" = "Sommario";
/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "hgl-N3-x4S"; */
"hgl-N3-x4S.title" = "Reset";
"hgl-N3-x4S.title" = "Ripristina";
/* Class = "NSTextFieldCell"; title = "Statistics"; ObjectID = "S15-bh-qKU"; */
"S15-bh-qKU.title" = "Statistiche";
......
......@@ -123,10 +123,17 @@
/* Touch bar */
"Done" = "Fine";
/* HBQueueItemView -> Encode state accessibility label */
"Encode canceled" = "Conversione annullata";
/* Queue status */
"Encode Canceled." = "Conversione annullata.";
/* Queue done notification failed message */
/* HBQueueItemView -> Encode state accessibility label */
"Encode complete" = "Conversione completata";
/* HBQueueItemView -> Encode state accessibility label
Queue done notification failed message */
"Encode failed" = "Conversione fallita";
/* Queue status */
......@@ -135,6 +142,12 @@
/* Queue status */
"Encode Finished." = "Conversione completata.";
/* HBQueueItemView -> Encode state accessibility label */
"Encode ready" = "Conversione pronta";
/* HBQueueItemView -> Encode state accessibility label */
"Encode working" = "Conversione in corso";
/* No comment provided by engineer. */
"Encoding %@\n%@" = "Converto %1$@\n%2$@";
......@@ -279,6 +292,9 @@
/* Touch bar */
"Remaining Time" = "Tempo rimanente";
/* HBQueueItemView -> Remove button accessibility label */
"Remove job" = "Rimuovi lavoro";
/* Queue undo action name */
"Remove Job From Queue" = "rimuovi lavoro dalla coda";
......@@ -292,6 +308,9 @@
Toolbar Pause Item */
"Resume Encoding" = "Riprendi conversione";
/* HBQueueItemView -> Reveal button accessibility label */
"Reveal destination in Finder" = "Mostra destinazione nel Finder";
/* Job statistics */
"Run time:" = "Tempo di conversione:";
......
......@@ -21,7 +21,11 @@ BUILD.out += $(MACOSX.osl.filelist)
MACOSX.project = -project $(MACOSX.src/)HandBrake.xcodeproj
## configuration: must be one of { release, debug }
MACOSX.configuration = -configuration $(MACOSX.map.g.$(MACOSX.GCC.g))
ifeq (1,$(SECURITY.sandbox))
MACOSX.configuration = -configuration $(MACOSX.map.g.$(MACOSX.GCC.g))-sandbox
else
MACOSX.configuration = -configuration $(MACOSX.map.g.$(MACOSX.GCC.g))
endif
## mapping from symbolic debug value to xcode configuration
MACOSX.map.g.none = release
......
......@@ -1300,9 +1300,15 @@ def createCLI( cross = None ):
grp.add_argument( '--df-deny-url', default=[], action='append', metavar='SPEC', help='deny URLs matching regex pattern' )
cli.add_argument_group( grp )
## add install options
## add tool locations
grp = cli.add_argument_group( 'Tool Basenames and Locations' )
for tool in ToolProbe.tools:
tool.cli_add_argument( grp )
cli.add_argument_group( grp )
## add directory options
grp = cli.add_argument_group( 'Directory Locations' )
h = 'specify sysroot of SDK for Xcode builds' if (build_tuple.match('*-*-darwin*') and cross is None) else argparse.SUPPRESS
h = 'specify Xcode SDK sysroot (macOS only)' if (build_tuple.match('*-*-darwin*') and cross is None) else argparse.SUPPRESS
grp.add_argument( '--sysroot', default=None, action='store', metavar='DIR',
help=h )
grp.add_argument( '--src', default=cfg.src_dir, action='store', metavar='DIR',
......@@ -1313,6 +1319,43 @@ def createCLI( cross = None ):
help='specify install dir for products [%s]' % (cfg.prefix_dir) )
cli.add_argument_group( grp )
## add build options
grp = cli.add_argument_group( 'Build Options' )
grp.add_argument( '--snapshot', default=False, action='store_true', help='Force a snapshot build' )
h = IfHost( 'Build extra contribs for flatpak packaging', '*-*-linux*', '*-*-freebsd*', none=argparse.SUPPRESS ).value
grp.add_argument( '--flatpak', default=False, action='store_true', help=h )
cli.add_argument_group( grp )
## add compiler options
grp = cli.add_argument_group( 'Compiler Options' )
debugMode.cli_add_argument( grp, '--debug' )
optimizeMode.cli_add_argument( grp, '--optimize' )
arch.mode.cli_add_argument( grp, '--arch' )
grp.add_argument( '--cross', default=None, action='store', metavar='SPEC',
help='specify GCC cross-compilation spec' )
cli.add_argument_group( grp )
## add security options
grp = cli.add_argument_group( 'Security Options' )
grp.add_argument( '--harden', dest="enable_harden", default=False, action='store_true', help='harden app to protect against buffer overflows' )
h = IfHost( 'sandbox app to limit host system access (macOS only)', '*-*-darwin*', none=argparse.SUPPRESS).value
grp.add_argument( '--sandbox', dest="enable_sandbox", default=False, action='store_true', help=(( '%s' %h ) if h != argparse.SUPPRESS else h) )
cli.add_argument_group( grp )
## add Xcode options
if (build_tuple.match('*-*-darwin*') and cross is None):
grp = cli.add_argument_group( 'Xcode Options (macOS only)' )
grp.add_argument( '--disable-xcode', default=False, action='store_true',
help='disable Xcode' )
grp.add_argument( '--xcode-prefix', default=cfg.xcode_prefix_dir, action='store', metavar='DIR',
help='specify install dir for Xcode products [%s]' % (cfg.xcode_prefix_dir) )
grp.add_argument( '--xcode-symroot', default='xroot', action='store', metavar='DIR',
help='specify root of the directory hierarchy that contains product files and intermediate build files' )
xcconfigMode.cli_add_argument( grp, '--xcode-config' )
grp.add_argument( '--minver', default=None, action='store', metavar='VER',
help='specify deployment target for Xcode builds' )
cli.add_argument_group( grp )
## add feature options
grp = cli.add_argument_group( 'Feature Options' )
......@@ -1362,7 +1405,6 @@ def createCLI( cross = None ):
grp.add_argument( '--enable-vce', dest="enable_vce", default=IfHost(True, '*-*-mingw*', none=False).value, action='store_true', help=(( 'enable %s' %h ) if h != argparse.SUPPRESS else h) )
grp.add_argument( '--disable-vce', dest="enable_vce", action='store_false', help=(( 'disable %s' %h ) if h != argparse.SUPPRESS else h) )
cli.add_argument_group( grp )
## add launch options
......@@ -1377,47 +1419,6 @@ def createCLI( cross = None ):
help='do not echo build output while waiting' )
cli.add_argument_group( grp )
## add compile options
grp = cli.add_argument_group( 'Compiler Options' )
debugMode.cli_add_argument( grp, '--debug' )
optimizeMode.cli_add_argument( grp, '--optimize' )
arch.mode.cli_add_argument( grp, '--arch' )
grp.add_argument( '--cross', default=None, action='store', metavar='SPEC',
help='specify GCC cross-compilation spec' )
grp.add_argument( '--enable-hardening', dest="enable_host_harden", default=False, action='store_true',
help='enable buffer overflow protection' )
cli.add_argument_group( grp )
## add Xcode options
if (build_tuple.match('*-*-darwin*') and cross is None):
grp = cli.add_argument_group( 'Xcode Options' )
grp.add_argument( '--disable-xcode', default=False, action='store_true',
help='disable Xcode' )
grp.add_argument( '--xcode-prefix', default=cfg.xcode_prefix_dir, action='store', metavar='DIR',
help='specify install dir for Xcode products [%s]' % (cfg.xcode_prefix_dir) )
grp.add_argument( '--xcode-symroot', default='xroot', action='store', metavar='DIR',
help='specify root of the directory hierarchy that contains product files and intermediate build files' )
xcconfigMode.cli_add_argument( grp, '--xcode-config' )
grp.add_argument( '--minver', default=None, action='store', metavar='VER',
help='specify deployment target for Xcode builds' )
cli.add_argument_group( grp )
## add tool locations
grp = cli.add_argument_group( 'Tool Basenames and Locations' )
for tool in ToolProbe.tools:
tool.cli_add_argument( grp )
cli.add_argument_group( grp )
## add build options
grp = cli.add_argument_group( 'Build Options' )
grp.add_argument( '--snapshot', default=False, action='store_true',
help='Force a snapshot build' )
h = IfHost( 'Build extra contribs for flatpak packaging', '*-*-linux*', '*-*-freebsd*', none=argparse.SUPPRESS ).value
grp.add_argument( '--flatpak', default=False, action='store_true', help=h )
cli.add_argument_group( grp )
return cli
###############################################################################
......@@ -1647,6 +1648,9 @@ try:
action.run()
## Sanitize options
# Sandboxing is currently only implemented on macOS
options.enable_sandbox = IfHost(options.enable_sandbox, '*-*-darwin*',
none=False).value
# Require FFmpeg AAC on Linux and Windows
options.enable_ffmpeg_aac = IfHost(options.enable_ffmpeg_aac, '*-*-darwin*',
none=True).value
......@@ -1667,6 +1671,7 @@ try:
options.enable_vce = IfHost(options.enable_vce, '*-*-mingw*',
none=False).value
#########################################
## OSX specific library and tool checks
#########################################
......@@ -1936,7 +1941,6 @@ int main()
doc.add( 'HOST.cross.prefix', '' )
doc.add( 'HOST.arch', arch.mode.mode )
doc.add( 'HOST.harden', int( options.enable_host_harden) )
doc.addBlank()
doc.add( 'SRC', cfg.src_final )
......@@ -1962,6 +1966,10 @@ int main()
doc.add( 'FEATURE.x265', int( options.enable_x265 ))
doc.add( 'FEATURE.numa', int( options.enable_numa ))