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

@@ -20,6 +20,24 @@ final class VideoViewController: PropertyView {
private let mediaTagsController: MediaTagsController
override var isReadOnly: Bool {
didSet {
mediaTagsController.isReadOnly = isReadOnly
// Matroska tags-only: FlagForced is writable (Never/All — the
// per-sample "Any samples" option has no Matroska equivalent).
if isReadOnly, allowsTrackEditing, isViewLoaded, track is MP42SubtitleTrack {
let anySamplesIndex = forcedSubs.indexOfItem(withTag: 1)
if anySamplesIndex >= 0 {
forcedSubs.removeItem(at: anySamplesIndex)
}
if forcedSubs.indexOfSelectedItem == -1 {
forcedSubs.selectItem(withTag: 0)
}
forcedSubs.isEnabled = true
}
}
}
override var nibName: NSNib.Name? {
return "VideoView"
}