Commit Graph
71 Commits
Author SHA1 Message Date
Scott GarrettandClaude Code 1040f47542 Add Matroska tagging and track-removal support
- MP42Ebml: EBML vint/ID primitives, flat Segment scanner, block track
  number decoding, and element builders shared by all Matroska writers.
- MP42MkvImporter / MP42FileImporter: tagsOnly mode that mirrors the
  file's own track flags instead of the MP4 conversion heuristics.
- MP42MatroskaTagMapping: read/write SimpleTag maps shared by importer
  and writer, including community names for MP4-only movie fields.
- MP42MkvTagWriter: mkvpropedit-style in-place rewrite of Tags, cover
  art, and per-track name/language/enabled/forced fields with a
  size+mtime staleness guard; an untouched save is a byte-for-byte
  no-op.
- MP42MkvRemuxer: stream-copy rebuild that drops the blocks of removed
  tracks (TrackNumbers keep their gaps; block bytes are never
  rewritten), regenerates SeekHead and Cues, carries metadata edits in
  the same pass, and writes via temp file + atomic rename.
- MP42MkvTagWriter+Internal.h exposes the tag writer's scanning and
  payload builders so the remuxer reuses them unchanged.

Verified with the external matrix harness: 241 assertions green across
layout fixtures (ffmpeg/mkvmerge/streamed), removal scenarios, cue
parity, and idempotency.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-25 19:48:09 -05:00
Brett Pynn 0a3c902ce7 Updated saving mp4 where mismatched of language on tracks.
Specifically when either mdhd or elng is undefined and the other is set.
2026-09-30 11:14:23 +02:00
Damiano Galassi cf35350ad3 Additional undo/redo changes 2026-09-29 19:55:05 +02:00
Damiano Galassi 841a7d083e Some undo groundwork 2025-11-14 15:20:29 +01:00
Damiano Galassi 027cb1f6ae Update copyright year. 2022-01-02 09:31:49 +01:00
Damiano Galassi 33c5d84f51 Some preliminary changes to support multiple sample descriptions. 2021-12-18 14:03:54 +01:00
Damiano Galassi 45552f45c0 Make MP4GetTrackMediaDataName aware of multiple sample descriptions. Only the first one is ready at the moment. 2021-12-09 12:03:28 +01:00
Damiano Galassi 799fdcc642 Update copyright year. 2021-02-02 10:55:04 +01:00
Damiano Galassi 3f63706eae Cosmetics. 2020-09-22 12:19:05 +02:00
Damiano Galassi b2394c7c3e Update copyright. 2020-09-22 11:38:15 +02:00
Damiano Galassi 86de20e308 Remove some superfluos MP42FileImporter methods. 2020-09-21 19:27:11 +02:00
Damiano Galassi 0e421a6eef Enable and fixes more warnings. 2020-09-19 14:39:02 +02:00
Damiano Galassi ce4ee8e0f1 Reorganize headers. 2020-02-08 13:53:32 +01:00
Damiano Galassi bf0417c97d Refactor MP42Track private methods, removed NSUserDefaults usage. 2020-02-08 13:45:56 +01:00
Damiano Galassi 0c14b18efc Improve reopening file under sandbox. 2019-03-11 09:57:34 +01:00
Damiano Galassi 2321192a5b Adda property to check if a track can be exported. 2018-10-22 11:25:35 +02:00
Damiano Galassi 1cabbd5bc1 Fix some sandbox issues. 2018-06-25 11:30:02 +02:00
Damiano Galassi 60bf0f9844 Remove a ivar declaration. 2018-06-11 16:17:52 +02:00
Damiano Galassi 32b347c638 Refactor the document window controller and the prefs controller. Some regression still in there. 2018-02-08 17:50:44 +01:00
Damiano Galassi 06b31b8ecd URL property of MP42Track can be nil. 2017-10-09 17:05:11 +02:00
Damiano Galassi f0f7a0704b Add __autoreleasing to NSError 2017-10-09 12:34:55 +02:00
Damiano Galassi 1f65513c84 Init the FIFOs only when needed. 2017-10-01 16:35:39 +02:00
Damiano Galassi 972ead6f0b Convert MP42FileImporter to ARC, and clean up some imports. 2017-09-30 11:11:31 +02:00
Damiano Galassi ea5fc13f87 Move some files to ARC. 2017-09-29 14:00:38 +02:00
Damiano Galassi 44a8f8d14e Fix some memory leaks. 2017-09-29 13:03:22 +02:00
Damiano Galassi 3a7eb08c8b Update track format version. 2017-09-01 15:05:05 +02:00
Damiano Galassi 7f0ca454ba OCD. 2017-09-01 14:16:28 +02:00
Damiano Galassi fc6b9d8a4c Use NSTimeInterval to store a track start offset, rename alternate_group to alternateGroup. 2017-09-01 07:36:57 +02:00
Damiano Galassi f34b3d4b65 Show the real track duration instead of the media duration. 2017-08-31 21:46:54 +02:00
Damiano Galassi 5c6f1a7ea8 Always use extended language tags when possible. 2016-11-26 13:14:14 +01:00
Damiano Galassi 6f31037011 Made the error message localisable. 2016-11-23 12:09:15 +01:00
Damiano Galassi d847082696 Use the iso639_2 to store the language in MP42Track. 2016-11-04 09:57:25 +01:00
Damiano Galassi f47dbdb62e Fix setAutoFallback: 2016-09-27 10:02:43 +02:00
Damiano Galassi 69cb3ea22c Guess a layout for PCM tracks if none is set. 2016-09-18 10:33:08 +02:00
Damiano Galassi acf14c20f5 Rename isEdited to edited. 2016-09-13 15:53:13 +02:00
Damiano Galassi 82dd46773d Fix warnings. 2016-09-13 15:22:49 +02:00
Damiano Galassi 523399be1b Fix the formatSummary after the conversion settings changes. 2016-09-13 15:15:03 +02:00
Damiano Galassi 815119bccb OCD. 2016-09-13 14:05:37 +02:00
Damiano Galassi f0b3466eba Remove more protected ivars from MP42Track. 2016-09-13 13:21:27 +02:00
Damiano Galassi e323a76b30 Add a DRC setting to the preferences. 2016-09-13 12:52:01 +02:00
Damiano Galassi e5c14727c9 Switch MP42Track to arc. 2016-09-13 12:31:57 +02:00
Damiano Galassi 1d100a1db0 Clean up MP42Track a bit. 2016-09-13 12:05:40 +02:00
Damiano Galassi 5be581793d Rework the way conversion settings are stored. 2016-09-13 08:50:39 +02:00
Damiano Galassi dbb759bbd8 Fix a crash in copySubtitleSample. 2016-08-31 15:02:45 +02:00
Damiano Galassi 0f2057c64d More secure coding work. 2016-08-31 12:20:49 +02:00
Damiano Galassi 8a2b4460ed Fix some more display names. 2016-08-19 09:34:52 +02:00
Damiano Galassi 285e6e9667 Add back "Chapter Track" name to chapters track. 2016-08-16 10:36:35 +02:00
Damiano Galassi 6d7c418b09 Made more MP42Track ivars private. 2016-08-13 13:49:48 +02:00
Damiano Galassi 1310202592 Implements the localised media names. 2016-08-13 13:40:09 +02:00
Damiano Galassi 1c562a65ea Switch to FourCC instead of NSStrings for media type and formats. 2016-08-10 18:51:53 +02:00