build: update to standard 14 (#24479)

This commit is contained in:
Samuel Attard 2020-07-09 10:18:49 -07:00 committed by GitHub
parent 9bd0fc5348
commit eb6616e4e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 495 additions and 665 deletions

View file

@ -38,106 +38,106 @@ function ToWebM (frames, outputAsArray) {
const EBML = [
{
'id': 0x1a45dfa3, // EBML
'data': [
id: 0x1a45dfa3, // EBML
data: [
{
'data': 1,
'id': 0x4286 // EBMLVersion
data: 1,
id: 0x4286 // EBMLVersion
},
{
'data': 1,
'id': 0x42f7 // EBMLReadVersion
data: 1,
id: 0x42f7 // EBMLReadVersion
},
{
'data': 4,
'id': 0x42f2 // EBMLMaxIDLength
data: 4,
id: 0x42f2 // EBMLMaxIDLength
},
{
'data': 8,
'id': 0x42f3 // EBMLMaxSizeLength
data: 8,
id: 0x42f3 // EBMLMaxSizeLength
},
{
'data': 'webm',
'id': 0x4282 // DocType
data: 'webm',
id: 0x4282 // DocType
},
{
'data': 2,
'id': 0x4287 // DocTypeVersion
data: 2,
id: 0x4287 // DocTypeVersion
},
{
'data': 2,
'id': 0x4285 // DocTypeReadVersion
data: 2,
id: 0x4285 // DocTypeReadVersion
}
]
},
{
'id': 0x18538067, // Segment
'data': [
id: 0x18538067, // Segment
data: [
{
'id': 0x1549a966, // Info
'data': [
id: 0x1549a966, // Info
data: [
{
'data': 1e6, // do things in millisecs (num of nanosecs for duration scale)
'id': 0x2ad7b1 // TimecodeScale
data: 1e6, // do things in millisecs (num of nanosecs for duration scale)
id: 0x2ad7b1 // TimecodeScale
},
{
'data': 'whammy',
'id': 0x4d80 // MuxingApp
data: 'whammy',
id: 0x4d80 // MuxingApp
},
{
'data': 'whammy',
'id': 0x5741 // WritingApp
data: 'whammy',
id: 0x5741 // WritingApp
},
{
'data': doubleToString(info.duration),
'id': 0x4489 // Duration
data: doubleToString(info.duration),
id: 0x4489 // Duration
}
]
},
{
'id': 0x1654ae6b, // Tracks
'data': [
id: 0x1654ae6b, // Tracks
data: [
{
'id': 0xae, // TrackEntry
'data': [
id: 0xae, // TrackEntry
data: [
{
'data': 1,
'id': 0xd7 // TrackNumber
data: 1,
id: 0xd7 // TrackNumber
},
{
'data': 1,
'id': 0x73c5 // TrackUID
data: 1,
id: 0x73c5 // TrackUID
},
{
'data': 0,
'id': 0x9c // FlagLacing
data: 0,
id: 0x9c // FlagLacing
},
{
'data': 'und',
'id': 0x22b59c // Language
data: 'und',
id: 0x22b59c // Language
},
{
'data': 'V_VP8',
'id': 0x86 // CodecID
data: 'V_VP8',
id: 0x86 // CodecID
},
{
'data': 'VP8',
'id': 0x258688 // CodecName
data: 'VP8',
id: 0x258688 // CodecName
},
{
'data': 1,
'id': 0x83 // TrackType
data: 1,
id: 0x83 // TrackType
},
{
'id': 0xe0, // Video
'data': [
id: 0xe0, // Video
data: [
{
'data': info.width,
'id': 0xb0 // PixelWidth
data: info.width,
id: 0xb0 // PixelWidth
},
{
'data': info.height,
'id': 0xba // PixelHeight
data: info.height,
id: 0xba // PixelHeight
}
]
}
@ -146,8 +146,8 @@ function ToWebM (frames, outputAsArray) {
]
},
{
'id': 0x1c53bb6b, // Cues
'data': [
id: 0x1c53bb6b, // Cues
data: [
// cue insertion point
]
}
@ -165,23 +165,23 @@ function ToWebM (frames, outputAsArray) {
let clusterTimecode = 0;
while (frameNumber < frames.length) {
const cuePoint = {
'id': 0xbb, // CuePoint
'data': [
id: 0xbb, // CuePoint
data: [
{
'data': Math.round(clusterTimecode),
'id': 0xb3 // CueTime
data: Math.round(clusterTimecode),
id: 0xb3 // CueTime
},
{
'id': 0xb7, // CueTrackPositions
'data': [
id: 0xb7, // CueTrackPositions
data: [
{
'data': 1,
'id': 0xf7 // CueTrack
data: 1,
id: 0xf7 // CueTrack
},
{
'data': 0, // to be filled in when we know it
'size': 8,
'id': 0xf1 // CueClusterPosition
data: 0, // to be filled in when we know it
size: 8,
id: 0xf1 // CueClusterPosition
}
]
}
@ -200,11 +200,11 @@ function ToWebM (frames, outputAsArray) {
let clusterCounter = 0;
const cluster = {
'id': 0x1f43b675, // Cluster
'data': [
id: 0x1f43b675, // Cluster
data: [
{
'data': Math.round(clusterTimecode),
'id': 0xe7 // Timecode
data: Math.round(clusterTimecode),
id: 0xe7 // Timecode
}
].concat(clusterFrames.map(function (webp) {
const block = makeSimpleBlock({