Add two methods two return the supported UTIs

This commit is contained in:
Damiano Galassi committed 2026-09-22 18:50:05 +02:00
1 parent 86dce73880
commit 57236970a3
19 files changed
+127 -16

No files matched your search

+13 -2
View File
@@ -130,12 +130,23 @@ MP42_OBJC_DIRECT_MEMBERS
CGSize trackSize = CGSizeMake(track.trackWidth, track.trackHeight);
MP42SubLine *sl = [_ss getSerializedPacket];
MP42SampleBuffer *sample;
BOOL top = NO;
if ([sl->line isEqualToString:@"\n"]) {
NSString *text;
if ([sl->line containsString:@"{\\an8}"]) {
text = [sl->line stringByReplacingOccurrencesOfString:@"{\\an8}" withString:@""];
top = YES;
}
else {
text = sl->line;
}
if ([text isEqualToString:@"\n"]) {
sample = copyEmptySubtitleSample(_trackID, sl->end_time - sl->begin_time, NO);
}
else {
sample = copySubtitleSample(_trackID, sl->line, sl->end_time - sl->begin_time, sl->forced, NO, YES, trackSize, 0);
sample = copySubtitleSample(_trackID, text, sl->end_time - sl->begin_time, sl->forced, NO, YES, trackSize, top);
}
return sample;