39 Commits
Author SHA1 Message Date
Scott GarrettandClaude Code e02f60b5f6 Import BLU-RAY PGS .sup files via vendored sup2vob
MP42VobSubImporter now claims "sup" alongside "idx": the file is converted up-front to a temp .idx/.sub pair, so the existing VobSub machinery (muxable subp passthrough, tx3g conversion, frame size from the idx size: line) carries everything downstream. The pair lives in a private temp directory until the importer's dealloc; tracks retain the importer through export, so demux can always reopen it.

The converter is sup2vob (https://git.technomancer.com/Scott-Files/sup2vob) vendored under MP42/Sup2Vob, kept identical to upstream apart from provenance headers; the CLI-only globals and main.swift are adapted in Convert.swift, and MP42SupConverter is the new @objc facade the importer calls over the MP42-Shared-Swift.h shim. Vendored output was verified byte-for-byte identical to the upstream CLI, and saved MP4s play back as dvd_subtitle tracks.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-28 18:18:16 -05:00
Scott GarrettandClaude Code e7c7b80e8f Mux VobSub subpic tracks at the frame size declared by the idx
LoadVobSubSubtitles parsed the global `size:` line into locals and threw
it away, and the muxer hardcoded MP4AddSubpicTrack(640, 480), so the
saved display size always read back as 640x480 regardless of what the
subtitle declared. Store the declared size on SBVobSubTrack, carry it
into the model's width/height, and let the muxer pick the subpic display
size with a precedence chain: user-edited trackWidth/trackHeight first,
then the size declared by the subtitle file, then the old 640x480
default. The chosen size is mirrored back into the model, like the
3GText branch does, so the GUI matches what was muxed.

trackWidth/trackHeight are intentionally not set at import time: the
tx3g conversion path reads trackHeight as the default text box height
and then offsets the track by 0.85x, which would push full-frame values
off screen.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-27 02:40:58 -05:00
Damiano Galassi 57236970a3 Add two methods two return the supported UTIs 2026-09-22 18:50:05 +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 f63e23f878 Adopt objc direct attributes where possible. 2020-07-01 19:48:11 +02:00
Damiano Galassi 9d7645ab3d Set the timescale in the samples. 2020-03-10 15:55:09 +01:00
Damiano Galassi ce4ee8e0f1 Reorganize headers. 2020-02-08 13:53:32 +01:00
Damiano Galassi f0f7a0704b Add __autoreleasing to NSError 2017-10-09 12:34:55 +02:00
Damiano Galassi 8d8aaa0be6 Rename SBSubSerializer to MP42SubSerializer, remove some casts, fix SSA timestamp parsing. 2017-10-03 08:52:48 +02:00
Damiano Galassi 7a8cae556e Fix headers. 2017-09-29 22:10:09 +02:00
Damiano Galassi ea5fc13f87 Move some files to ARC. 2017-09-29 14:00:38 +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 393a9ea957 Fix a address sanitizer warning. 2017-06-22 19:02:05 +02:00
Damiano Galassi ad673993f5 Make Thread Sanitizer happy. 2017-06-20 16:17:17 +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 384d30d00c Show localized track names in the document window. 2016-11-23 11:40:21 +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 815119bccb OCD. 2016-09-13 14:05:37 +02:00
Damiano Galassi 1d100a1db0 Clean up MP42Track a bit. 2016-09-13 12:05:40 +02:00
Damiano Galassi 1c562a65ea Switch to FourCC instead of NSStrings for media type and formats. 2016-08-10 18:51:53 +02:00
Damiano Galassi 7b1c7d0384 Clean up headers and MP42SampleBuffer. 2016-07-27 17:37:27 +02:00
Damiano Galassi 4c2323a0c7 Remove deprecated api. 2016-07-26 20:33:51 +02:00
Damiano Galassi 3b941b8c9e Remove 32bit only files (QuickTime) and update headers. 2016-07-25 17:19:22 +02:00
Damiano Galassi 506b145480 Remove the big if structure in MP42FileImporter init. 2015-09-18 09:10:41 +02:00
Damiano Galassi 24d215fda9 Rename MP42Track Id to trackId 2015-09-14 11:23:14 +02:00
Damiano Galassi 2d00a04689 clean up the importers and remove the MP42File delegate 2015-09-07 11:44:51 +02:00
Damiano Galassi 034431894d Cosmetics 2015-09-05 13:12:06 +02:00
galad87 f6b23874f6 More cosmetics 2015-08-27 18:28:54 +02:00
Damiano Galassi f2ccd9e1d6 Fixed a number of incorrect memory accesses 2015-08-20 14:24:44 +02:00
Damiano Galassi 73309f670e Fixed a type mismatch. 2014-10-27 08:07:44 +01:00
Damiano Galassi 85eb58a521 Cosmetics. 2014-01-06 09:47:10 +01:00
Damiano Galassi 53c3bb45f8 Fix an out of bounds array crash. 2014-01-06 09:41:06 +01:00
Damiano Galassi 08e32323ce Renamed MP42Utilites to MP42PrivateUtilities, a public header will be committed soon. 2013-11-16 13:23:01 +01:00
Damiano Galassi 30564b6469 Made some more header files public to let Subler compiles. 2013-11-16 12:57:17 +01:00
Damiano Galassi f832acb2b6 Renamed and warnings fixed. 2013-11-05 11:21:31 +01:00
Damiano Galassi 05cf06cfa9 Argh. 2013-11-03 17:10:49 +01:00
Damiano Galassi 796e9691ce First import. 2013-11-01 10:20:09 +01:00