Open and edit Matroska files in place, including track removal

.mkv/.mka/.mks now open directly into a tags-only document instead of
forcing the convert-import sheet:

- Metadata, cover art, and the four per-track fields Matroska stores
  (name, language, enabled, subtitle forced) save back into the same
  file via MP42MkvTagWriter; MP4-only properties stay read-only.
- Real tracks can be deleted and Save-As is enabled; both go through
  MP42MkvRemuxer's stream-copy rebuild (Document keeps an importer-order
  track snapshot and pairs TrackEntry elements by object identity).
  Destinations must stay .mkv/.mka/.mks.
- Info.plist: the Matroska document type becomes Editor so NSDocument
  offers .mkv Save-As instead of defaulting to the MP4 type.
- Delete on MKV docs skips organizeAlternateGroups/
  inferMediaCharacteristics because they reorder the model, which the
  TrackEntry pairing depends on; chapter rows stay undeletable.

Bumps MP42Foundation for the Matroska tagging/remux support.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Scott GarrettandClaude Code committed 2026-11-25 19:48:34 -05:00
1 parent 0c3d7de364
commit eb386a52c3
14 files changed
+540 -32

No files matched your search

+4 -1
View File
@@ -40,7 +40,10 @@ final class DocumentController : NSDocumentController {
override func openDocument(withContentsOf url: URL, display displayDocument: Bool, completionHandler: @escaping (NSDocument?, Bool, Error?) -> Void) {
let ext = url.pathExtension.lowercased()
if ["mkv", "mka", "mks", "mov", "264", "h264"].contains(ext) {
// Matroska files open directly as tags-only documents (see
// Document.read); the remaining formats below can only be converted
// to MP4, so offer the import sheet on a fresh untitled document.
if ["mov", "264", "h264"].contains(ext) {
do {
let doc = try self.openUntitledDocumentAndDisplay(displayDocument)
completionHandler(doc, false, nil)