Scott Garrett and Claude Code
30dd96ff79
Recognize subtitle language and type tokens in filenames
...
getFilenameLanguage now tokenizes the name and scans right-to-left the way mkvmerge's own heuristics do, so a language code survives behind a trailing flag token ("...eng.hearing_impaired.srt" was read as "und"). Three-char tokens try ISO 639-2/T and the library's B codes; the dash stays out of the separator set so region subtags ("pt-BR") are not split into a bogus ISO 639-1 hit.
getFilenameSubtitlesTrackName maps community type tokens (sdh / hearing_impaired / deaf, cc / closed caption, forced, commentary, lyrics) to a bare conventional track name ("SDH"); the language rides its own element. MP4 has no SDH flag and the name-keyword pass in MP42File organizeMediaCharacteristicsForMediaType: turns these names into the real QuickTime tags (public.subtitles.forced-only, public.accessibility.*).
Co-Authored-By: Claude Code <noreply@anthropic.com >
2026-11-28 18:17:53 -05:00
Damiano Galassi
57236970a3
Add two methods two return the supported UTIs
2026-09-22 18:50:05 +02:00
Damiano Galassi
027cb1f6ae
Update copyright year.
2022-01-02 09:31:49 +01:00
Damiano Galassi
799fdcc642
Update copyright year.
2021-02-02 10:55:04 +01: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
f63e23f878
Adopt objc direct attributes where possible.
2020-07-01 19:48:11 +02: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
c88f0494e7
MP42SrtImporter can open .smi too.
2017-10-03 08:02:18 +02:00
Damiano Galassi
cfbf9bbf91
Refactor NSLinguisticTagger code.
2017-10-02 19:20:17 +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
d9b2763f83
Remove some unused code.
2017-07-28 15:05:12 +02:00
Damiano Galassi
ad673993f5
Make Thread Sanitizer happy.
2017-06-20 16:17:17 +02:00
Damiano Galassi
3e05d0b4f6
Check if NSOrthography is nil before adding it to a set.
2017-06-11 08:38:27 +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
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
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
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
Damiano Galassi
0367be9e3f
Disable NSLinguisticTagger on 10.9 and previous because it's too crashy
2015-09-04 20:48:19 +02:00
galad87
f6b23874f6
More cosmetics
2015-08-27 18:28:54 +02:00
Damiano Galassi
3bf6d614b6
Don't set the language to nil if the linguistic tagger is not able to find a language.
2014-12-11 16:28:01 +01:00
Damiano Galassi
dc227c8fbc
Check if the NSLinguisticTagger class is available before using it (it was added in 10.7).
2014-07-24 15:07:50 +02:00
Damiano Galassi
6eaa5a11b3
Use NSLinguisticTagger to deduce the language of the srt file. Patch by Aymeric Bard.
2014-03-16 09:36:32 +01:00
Damiano Galassi
2e559043eb
Add a simple pre-processing to vobsub samples and disable styles creation for vobsub.
2014-02-09 14:58:57 +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
05cf06cfa9
Argh.
2013-11-03 17:10:49 +01:00
Damiano Galassi
796e9691ce
First import.
2013-11-01 10:20:09 +01:00