Skip to content

Commit

Permalink
Support for audio channels, bugfix tracks menu, experimental support …
Browse files Browse the repository at this point in the history
…for macOS 10.14.
  • Loading branch information
sbarex committed Jun 1, 2021
1 parent 2c124ac commit 75dc9ab
Show file tree
Hide file tree
Showing 24 changed files with 263 additions and 58 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
@@ -1,6 +1,11 @@
Changelog
=======

### 1.5.4
- Add info about number of audio channels.
- Bugfix tracks (audio, video, subtitle) menu.
- Experimental support for macOS 10.14.

### 1.5.3
- Bugfix for chapters.

Expand All @@ -24,9 +29,9 @@ Changelog
### 1.0.0

- Universal binary support (_but `ffmpeg` for arm64 is compiled on intel platform without assembly optimizations_).
- Support for automatic Sparke update.
- Support for automatic Sparkle update.
- New app icon.
- Removed App Group capability to handle the settings (App Group _require_ codesign). Settings are now handled with an XPC service.
- Removed App Group capability to handle the settings (App Group _require_ code sign). Settings are now handled with an XPC service.

### 1.0.b11

Expand Down
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "speaker_mono.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Binary file not shown.
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "speaker_stereo.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Binary file not shown.
Expand Up @@ -7,8 +7,6 @@
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.temporary-exception.files.home-relative-path.read-only</key>
<array>
<string>/</string>
</array>
<array/>
</dict>
</plist>
5 changes: 5 additions & 0 deletions MediaInfo Finder Extension/it.lproj/LocalizableExt.strings
Expand Up @@ -95,3 +95,8 @@
"last saved by %@" = "ultimo salvataggio di %@";
"last saved on %@" = "ultimo salvataggio il %@";
"on %@" = "il %@";

"mono" = "mono";
"stereo" = "stereo";
"1 channel" = "1 canale";
"%d channels" = "%d canali";
40 changes: 24 additions & 16 deletions MediaInfo.xcodeproj/project.pbxproj
Expand Up @@ -11264,7 +11264,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 16;
CURRENT_PROJECT_VERSION = 17;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -11281,7 +11281,8 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.5.3;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 1.5.4;
OTHER_CODE_SIGN_FLAGS = "--timestamp";
PRODUCT_BUNDLE_IDENTIFIER = org.sbarex.MediaInfo;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -11299,7 +11300,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 16;
CURRENT_PROJECT_VERSION = 17;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -11316,7 +11317,8 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.5.3;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 1.5.4;
OTHER_CODE_SIGN_FLAGS = "--timestamp";
PRODUCT_BUNDLE_IDENTIFIER = org.sbarex.MediaInfo;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -11332,7 +11334,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 16;
CURRENT_PROJECT_VERSION = 17;
DEVELOPMENT_ASSET_PATHS = "MediaInfo\\ Finder\\ Extension/Assets_menu.xcassets";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -11347,7 +11349,8 @@
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
MARKETING_VERSION = 1.5.3;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 1.5.4;
OTHER_CODE_SIGN_FLAGS = "--timestamp";
PRODUCT_BUNDLE_IDENTIFIER = "org.sbarex.MediaInfo.Finder-Extension";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -11364,7 +11367,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 16;
CURRENT_PROJECT_VERSION = 17;
DEVELOPMENT_ASSET_PATHS = "MediaInfo\\ Finder\\ Extension/Assets_menu.xcassets";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -11379,7 +11382,8 @@
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
MARKETING_VERSION = 1.5.3;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 1.5.4;
OTHER_CODE_SIGN_FLAGS = "--timestamp";
PRODUCT_BUNDLE_IDENTIFIER = "org.sbarex.MediaInfo.Finder-Extension";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -11439,7 +11443,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 16;
CURRENT_PROJECT_VERSION = 17;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
HEADER_SEARCH_PATHS = (
Expand All @@ -11459,7 +11463,8 @@
"$(BUILT_PRODUCTS_DIR)/libwebp",
"$(inherited)",
);
MARKETING_VERSION = 1.5.3;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 1.5.4;
PRODUCT_BUNDLE_IDENTIFIER = org.sbarex.MediaInfoHelperXPC;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -11477,7 +11482,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 16;
CURRENT_PROJECT_VERSION = 17;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
HEADER_SEARCH_PATHS = (
Expand All @@ -11497,7 +11502,8 @@
"$(BUILT_PRODUCTS_DIR)/libwebp",
"$(inherited)",
);
MARKETING_VERSION = 1.5.3;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 1.5.4;
OTHER_CODE_SIGN_FLAGS = "--timestamp";
PRODUCT_BUNDLE_IDENTIFIER = org.sbarex.MediaInfoHelperXPC;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -11514,7 +11520,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 16;
CURRENT_PROJECT_VERSION = 17;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
HEADER_SEARCH_PATHS = (
Expand All @@ -11534,7 +11540,8 @@
"$(BUILT_PRODUCTS_DIR)/libwebp",
"$(inherited)",
);
MARKETING_VERSION = 1.5.3;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 1.5.4;
PRODUCT_BUNDLE_IDENTIFIER = org.sbarex.MediaInfoSettingsXPC;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -11550,7 +11557,7 @@
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 16;
CURRENT_PROJECT_VERSION = 17;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
HEADER_SEARCH_PATHS = (
Expand All @@ -11570,7 +11577,8 @@
"$(BUILT_PRODUCTS_DIR)/libwebp",
"$(inherited)",
);
MARKETING_VERSION = 1.5.3;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 1.5.4;
OTHER_CODE_SIGN_FLAGS = "--timestamp";
PRODUCT_BUNDLE_IDENTIFIER = org.sbarex.MediaInfoSettingsXPC;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
16 changes: 16 additions & 0 deletions MediaInfo/Assets.xcassets/speaker.imageset/Contents.json
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "speaker_mono.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Binary file not shown.
3 changes: 3 additions & 0 deletions MediaInfo/MenuItemEditor.swift
Expand Up @@ -56,6 +56,9 @@ class MenuItemEditor: NSViewController {
Image(name: "size", title: NSLocalizedString("File size", comment: "")),
Image(name: "print", title: NSLocalizedString("Printer", comment: "")),
Image(name: "person", title: NSLocalizedString("Person", comment: "")),
Image(name: "speaker", title: NSLocalizedString("Speaker (mono or stereo)", comment: "")),
Image(name: "speaker_mono", title: NSLocalizedString("Speaker", comment: "")),
Image(name: "speaker_stereo", title: NSLocalizedString("Speakers", comment: "")),

Image.separator(),
Image(name: "color", title: NSLocalizedString("Color", comment: "")),
Expand Down
2 changes: 1 addition & 1 deletion MediaInfo/Settings.swift
Expand Up @@ -107,7 +107,7 @@ class Settings {
MenuItem(image: "size", template: "[[filesize]]"),
]
settings.audioMenuItems = [
MenuItem(image: "audio", template: "[[duration]] ([[seconds]]) [[language-flag]]"),
MenuItem(image: "audio", template: "[[duration]] ([[seconds]]) [[channels-name]] [[language-flag]]"),
MenuItem(image: "audio", template: "[[bitrate]], [[codec]]"),
MenuItem(image: "tag", template: "[[title]]"),
MenuItem(image: "", template: "([[engine]])"),
Expand Down
11 changes: 10 additions & 1 deletion MediaInfo/Tokens/TokenVideoMetadata.swift
Expand Up @@ -138,6 +138,8 @@ class TokenAudioMetadata: Token {
case encoder
case chapters
case chaptersCount
case channels
case channels_name

static var pasteboardType: NSPasteboard.PasteboardType {
return .MITokenAudioMetadata
Expand All @@ -149,6 +151,8 @@ class TokenAudioMetadata: Token {
case .encoder: return "encoder"
case .chaptersCount: return String(format: NSLocalizedString("%d Chapters", tableName: "LocalizableExt", comment: ""), 2)
case .chapters: return NSLocalizedString("Chapters list", comment: "")
case .channels: return NSLocalizedString("1 channel", tableName: "LocalizableExt", comment: "")
case .channels_name: return NSLocalizedString("mono", tableName: "LocalizableExt", comment: "")
}
}

Expand All @@ -158,6 +162,8 @@ class TokenAudioMetadata: Token {
case .encoder: return "[[encoder]]"
case .chaptersCount: return "[[chapters-count]]"
case .chapters: return "[[chapters]]"
case .channels: return "[[channels]]"
case .channels_name: return "[[channels-name]]"
}
}

Expand All @@ -167,6 +173,8 @@ class TokenAudioMetadata: Token {
case .encoder: return NSLocalizedString("Encoder.", comment: "")
case .chapters: return NSLocalizedString("List of chapters.", comment: "")
case .chaptersCount: return NSLocalizedString("Number of chapters.", comment: "")
case .channels: return NSLocalizedString("Number of channels.", comment: "")
case .channels_name: return NSLocalizedString("Mono, Stereo, or number of channels.", comment: "")
}
}

Expand All @@ -176,7 +184,8 @@ class TokenAudioMetadata: Token {
case "[[encoder]]": self = .encoder
case "[[chapters]]": self = .chapters
case "[[chapters-count]]": self = .chaptersCount

case "[[channels]]": self = .channels
case "[[channels-name]]": self = .channels_name
default: return nil
}
}
Expand Down
3 changes: 2 additions & 1 deletion MediaInfo/ViewController.swift
Expand Up @@ -235,7 +235,7 @@ class ViewController: NSViewController {
isLossless: false,
chapters: [Chapter(title: "title1", start: 0, end: 200), Chapter(title: "title2", start: 201, end: 600)],
video: [], audio: [
AudioTrackInfo(duration: 3600, start_time: 0, codec_short_name: "mp3", codec_long_name: "MP3 (MPEG audio layer 3)", lang: "EN", bitRate: 512*1025, title: "Audio title", encoder: "Encoder", isLossless: false)
AudioTrackInfo(duration: 3600, start_time: 0, codec_short_name: "mp3", codec_long_name: "MP3 (MPEG audio layer 3)", lang: "EN", bitRate: 512*1025, title: "Audio title", encoder: "Encoder", isLossless: false, channels: 2)
], subtitles: [
SubtitleTrackInfo(title: "English subtitle", lang: "EN"),
SubtitleTrackInfo(title: "Sottitoli in italiano", lang: "IT"),
Expand Down Expand Up @@ -265,6 +265,7 @@ class ViewController: NSViewController {
title: "Audio title", encoder: "Encoder",
isLossless: false,
chapters: [],
channels: 2,
engine: .coremedia)
}

Expand Down
5 changes: 5 additions & 0 deletions MediaInfo/it.lproj/Localizable.strings
Expand Up @@ -127,6 +127,8 @@
"sheets" = "fogli";
"Page size (for document files)." = "Dimensioni sulla pagina (per documenti di testo).";
"Page format or page size (for document files)." = "Formato pagina o sue dimensioni (per documenti di testo).";
"Number of channels." = "Numero di canali";
"Mono, Stereo, or number of channels." = "Mono, Stereo, o numbero di canali.";

// MARK: -
"Number of audio tracks." = "Numero di tracce audio.";
Expand Down Expand Up @@ -177,6 +179,9 @@
"PDF" = "PDF";
"Printer" = "Stampante";
"Person" = "Persona";
"Speaker (mono or stereo)" = "Altoparlante (mono o stereo)";
"Speaker" = "Altoparlante";
"Speakers" = "Altoparlanti";
"Color" = "Colore";
"Black and White" = "Bianco e nero";
"Gray scale" = "Scala di grigio";
Expand Down

0 comments on commit 75dc9ab

Please sign in to comment.