Preliminary HEVC support.
This commit is contained in:
1 parent
d4ff9c6fa7
commit
71ea7afd67
3 files changed
+12
-1
No files matched your search
@@ -640,6 +640,9 @@
|
||||
if (code == kCMVideoCodecType_H264) {
|
||||
magicCookie = CFDictionaryGetValue(atoms, @"avcC");
|
||||
}
|
||||
else if (code == kCMVideoCodecType_HEVC || code == 'hev1') {
|
||||
magicCookie = CFDictionaryGetValue(atoms, @"hvcC");
|
||||
}
|
||||
else if (code == kCMVideoCodecType_MPEG4Video) {
|
||||
magicCookie = CFDictionaryGetValue(atoms, @"esds");
|
||||
}
|
||||
|
||||
@@ -229,6 +229,14 @@
|
||||
|
||||
return [magicCookie autorelease];
|
||||
}
|
||||
else if (!strcmp(media_data_name, "hev1")) {
|
||||
uint8_t *ppValue;
|
||||
uint32_t pValueSize;
|
||||
MP4GetTrackBytesProperty(_fileHandle, srcTrackId, "mdia.minf.stbl.stsd.hev1.hvcC.content", &ppValue, &pValueSize);
|
||||
magicCookie = [NSData dataWithBytes:ppValue length:pValueSize];
|
||||
free(ppValue);
|
||||
return magicCookie;
|
||||
}
|
||||
else if (!strcmp(media_data_name, "mp4v")) {
|
||||
uint8_t *ppConfig; uint32_t pConfigSize;
|
||||
MP4GetTrackESConfiguration(_fileHandle, srcTrackId, &ppConfig, &pConfigSize);
|
||||
|
||||
@@ -38,7 +38,7 @@ MP42Duration TimeFromString(NSString *time_string, MP42Duration timeScale)
|
||||
|
||||
BOOL isTrackMuxable(NSString *formatName)
|
||||
{
|
||||
NSArray *supportedFormats = @[MP42VideoFormatH264, MP42VideoFormatMPEG4Visual, MP42AudioFormatAAC, MP42AudioFormatHEAAC, MP42AudioFormatALAC,
|
||||
NSArray *supportedFormats = @[MP42VideoFormatH265, MP42VideoFormatH264, MP42VideoFormatMPEG4Visual, MP42AudioFormatAAC, MP42AudioFormatHEAAC, MP42AudioFormatALAC,
|
||||
MP42AudioFormatAC3, MP42AudioFormatEAC3, MP42AudioFormatDTS, MP42SubtitleFormatTx3g, MP42SubtitleFormatText,
|
||||
MP42ClosedCaptionFormatCEA608, MP42VideoFormatJPEG, MP42SubtitleFormatVobSub, MP42SubtitleFormatWebVTT];
|
||||
|
||||
|
||||
Reference in new issue
Block a user