mirror of
https://github.com/HaishinKit/HaishinKit.swift.git
synced 2026-05-07 20:12:28 +00:00
20 lines
396 B
Swift
20 lines
396 B
Swift
import CoreMedia
|
|
import Foundation
|
|
|
|
extension CMFormatDescription {
|
|
var streamType: ESStreamType {
|
|
switch mediaSubType {
|
|
case .hevc:
|
|
return .h265
|
|
case .h264:
|
|
return .h264
|
|
case .mpeg4AAC_LD:
|
|
return .adtsAac
|
|
case .mpeg4AAC:
|
|
return .adtsAac
|
|
default:
|
|
return .unspecific
|
|
}
|
|
}
|
|
}
|