werift 0.22.1 → 0.22.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/lib/common/src/binary.d.ts +8 -7
  2. package/lib/common/src/binary.js +5 -2
  3. package/lib/common/src/binary.js.map +1 -1
  4. package/lib/common/src/event.d.ts +1 -0
  5. package/lib/common/src/event.js +5 -0
  6. package/lib/common/src/event.js.map +1 -1
  7. package/lib/common/src/log.d.ts +1 -2
  8. package/lib/common/src/transport.d.ts +4 -1
  9. package/lib/common/src/transport.js +35 -14
  10. package/lib/common/src/transport.js.map +1 -1
  11. package/lib/dtls/src/cipher/create.d.ts +2 -1
  12. package/lib/dtls/src/cipher/create.js.map +1 -1
  13. package/lib/dtls/src/cipher/prf.d.ts +12 -12
  14. package/lib/dtls/src/cipher/suites/abstract.d.ts +2 -1
  15. package/lib/dtls/src/cipher/suites/abstract.js.map +1 -1
  16. package/lib/dtls/src/cipher/suites/aead.d.ts +3 -2
  17. package/lib/dtls/src/cipher/suites/aead.js +34 -41
  18. package/lib/dtls/src/cipher/suites/aead.js.map +1 -1
  19. package/lib/dtls/src/context/cipher.d.ts +4 -4
  20. package/lib/dtls/src/context/cipher.js +25 -15
  21. package/lib/dtls/src/context/cipher.js.map +1 -1
  22. package/lib/dtls/src/context/srtp.d.ts +3 -3
  23. package/lib/dtls/src/context/srtp.js.map +1 -1
  24. package/lib/dtls/src/flight/client/flight5.js.map +1 -1
  25. package/lib/dtls/src/flight/server/flight2.js.map +1 -1
  26. package/lib/dtls/src/handshake/extensions/ellipticCurves.d.ts +1 -1
  27. package/lib/dtls/src/handshake/extensions/renegotiationIndication.d.ts +2 -2
  28. package/lib/dtls/src/handshake/extensions/signature.d.ts +2 -2
  29. package/lib/dtls/src/handshake/extensions/useSrtp.d.ts +1 -1
  30. package/lib/dtls/src/handshake/extensions/useSrtp.js +4 -7
  31. package/lib/dtls/src/handshake/extensions/useSrtp.js.map +1 -1
  32. package/lib/dtls/src/handshake/message/alert.d.ts +1 -1
  33. package/lib/dtls/src/handshake/message/certificate.d.ts +1 -1
  34. package/lib/dtls/src/handshake/message/changeCipherSpec.d.ts +1 -1
  35. package/lib/dtls/src/handshake/message/client/certificateVerify.d.ts +1 -1
  36. package/lib/dtls/src/handshake/message/client/hello.d.ts +1 -1
  37. package/lib/dtls/src/handshake/message/client/keyExchange.d.ts +1 -1
  38. package/lib/dtls/src/handshake/message/finished.d.ts +1 -1
  39. package/lib/dtls/src/handshake/message/server/certificateRequest.d.ts +1 -1
  40. package/lib/dtls/src/handshake/message/server/hello.d.ts +1 -1
  41. package/lib/dtls/src/handshake/message/server/helloDone.d.ts +1 -1
  42. package/lib/dtls/src/handshake/message/server/helloVerifyRequest.d.ts +1 -1
  43. package/lib/dtls/src/handshake/message/server/keyExchange.d.ts +1 -1
  44. package/lib/dtls/src/handshake/random.d.ts +3 -3
  45. package/lib/dtls/src/record/message/fragment.d.ts +1 -1
  46. package/lib/dtls/src/record/message/header.d.ts +2 -19
  47. package/lib/dtls/src/record/message/header.js +1 -60
  48. package/lib/dtls/src/record/message/header.js.map +1 -1
  49. package/lib/dtls/src/record/message/plaintext.d.ts +6 -27
  50. package/lib/dtls/src/record/message/plaintext.js +34 -16
  51. package/lib/dtls/src/record/message/plaintext.js.map +1 -1
  52. package/lib/dtls/src/socket.d.ts +4 -4
  53. package/lib/dtls/src/socket.js.map +1 -1
  54. package/lib/dtls/src/util/binary.d.ts +1 -1
  55. package/lib/ice/src/candidate.js +1 -5
  56. package/lib/ice/src/candidate.js.map +1 -1
  57. package/lib/ice/src/helper.d.ts +1 -1
  58. package/lib/ice/src/ice.d.ts +4 -3
  59. package/lib/ice/src/ice.js +93 -72
  60. package/lib/ice/src/ice.js.map +1 -1
  61. package/lib/ice/src/iceBase.d.ts +21 -2
  62. package/lib/ice/src/iceBase.js +47 -1
  63. package/lib/ice/src/iceBase.js.map +1 -1
  64. package/lib/ice/src/stun/attributes.d.ts +2 -2
  65. package/lib/ice/src/stun/attributes.js +48 -29
  66. package/lib/ice/src/stun/attributes.js.map +1 -1
  67. package/lib/ice/src/stun/message.d.ts +2 -2
  68. package/lib/ice/src/stun/message.js +22 -23
  69. package/lib/ice/src/stun/message.js.map +1 -1
  70. package/lib/ice/src/stun/protocol.d.ts +2 -2
  71. package/lib/ice/src/stun/protocol.js +6 -0
  72. package/lib/ice/src/stun/protocol.js.map +1 -1
  73. package/lib/ice/src/turn/protocol.d.ts +2 -2
  74. package/lib/ice/src/turn/protocol.js +3 -0
  75. package/lib/ice/src/turn/protocol.js.map +1 -1
  76. package/lib/index.mjs +2707 -1883
  77. package/lib/nonstandard/index.mjs +737 -698
  78. package/lib/rtp/src/codec/av1.d.ts +2 -2
  79. package/lib/rtp/src/codec/opus.d.ts +1 -1
  80. package/lib/rtp/src/extra/container/mp4/container.js +18 -8
  81. package/lib/rtp/src/extra/container/mp4/container.js.map +1 -1
  82. package/lib/rtp/src/extra/container/mp4/h264.d.ts +2 -2
  83. package/lib/rtp/src/extra/container/mp4/sps-parser.d.ts +1 -1
  84. package/lib/rtp/src/extra/container/ogg/parser.d.ts +1 -1
  85. package/lib/rtp/src/extra/container/webm/container.d.ts +9 -9
  86. package/lib/rtp/src/extra/container/webm/container.js +24 -12
  87. package/lib/rtp/src/extra/container/webm/container.js.map +1 -1
  88. package/lib/rtp/src/extra/container/webm/ebml/ebml.d.ts +35 -1
  89. package/lib/rtp/src/extra/container/webm/ebml/ebml.js +75 -1
  90. package/lib/rtp/src/extra/container/webm/ebml/ebml.js.map +1 -1
  91. package/lib/rtp/src/extra/container/webm/ebml/id.d.ts +222 -222
  92. package/lib/rtp/src/extra/container/webm/index.d.ts +1 -0
  93. package/lib/rtp/src/extra/container/webm/index.js +1 -0
  94. package/lib/rtp/src/extra/container/webm/index.js.map +1 -1
  95. package/lib/rtp/src/extra/container/webm/util.d.ts +8 -0
  96. package/lib/rtp/src/extra/container/webm/util.js +100 -0
  97. package/lib/rtp/src/extra/container/webm/util.js.map +1 -0
  98. package/lib/rtp/src/extra/processor/depacketizerCallback.d.ts +1 -1
  99. package/lib/rtp/src/extra/processor/depacketizerTransformer.d.ts +6 -1
  100. package/lib/rtp/src/extra/processor/dtx.d.ts +1 -1
  101. package/lib/rtp/src/extra/processor/dtx.js +1 -1
  102. package/lib/rtp/src/extra/processor/dtx.js.map +1 -1
  103. package/lib/rtp/src/extra/processor/dtxCallback.d.ts +1 -1
  104. package/lib/rtp/src/extra/processor/interface.d.ts +1 -1
  105. package/lib/rtp/src/extra/processor/jitterBufferCallback.d.ts +1 -1
  106. package/lib/rtp/src/extra/processor/lipsync.js +1 -1
  107. package/lib/rtp/src/extra/processor/lipsync.js.map +1 -1
  108. package/lib/rtp/src/extra/processor/mp4.js +3 -0
  109. package/lib/rtp/src/extra/processor/mp4.js.map +1 -1
  110. package/lib/rtp/src/extra/processor/mute.d.ts +1 -1
  111. package/lib/rtp/src/extra/processor/mute.js +1 -1
  112. package/lib/rtp/src/extra/processor/mute.js.map +1 -1
  113. package/lib/rtp/src/extra/processor/nackHandlerCallback.d.ts +1 -1
  114. package/lib/rtp/src/extra/processor/ntpTime.d.ts +1 -1
  115. package/lib/rtp/src/extra/processor/ntpTime.js +1 -1
  116. package/lib/rtp/src/extra/processor/ntpTime.js.map +1 -1
  117. package/lib/rtp/src/extra/processor/ntpTimeCallback.d.ts +1 -1
  118. package/lib/rtp/src/extra/processor/rtpTimeCallback.d.ts +1 -1
  119. package/lib/rtp/src/extra/processor/webm.d.ts +3 -3
  120. package/lib/rtp/src/extra/processor/webm.js.map +1 -1
  121. package/lib/rtp/src/extra/processor/webmStream.d.ts +2 -2
  122. package/lib/rtp/src/extra/processor/webmStream.js.map +1 -1
  123. package/lib/rtp/src/helper.d.ts +1 -1
  124. package/lib/rtp/src/rtcp/header.d.ts +2 -1
  125. package/lib/rtp/src/rtcp/header.js +10 -0
  126. package/lib/rtp/src/rtcp/header.js.map +1 -1
  127. package/lib/rtp/src/rtcp/psfb/fullIntraRequest.d.ts +1 -1
  128. package/lib/rtp/src/rtcp/psfb/index.d.ts +2 -2
  129. package/lib/rtp/src/rtcp/psfb/index.js +2 -2
  130. package/lib/rtp/src/rtcp/psfb/index.js.map +1 -1
  131. package/lib/rtp/src/rtcp/psfb/pictureLossIndication.d.ts +1 -1
  132. package/lib/rtp/src/rtcp/psfb/remb.d.ts +1 -1
  133. package/lib/rtp/src/rtcp/rr.d.ts +2 -2
  134. package/lib/rtp/src/rtcp/rr.js +2 -2
  135. package/lib/rtp/src/rtcp/rr.js.map +1 -1
  136. package/lib/rtp/src/rtcp/rtcp.d.ts +0 -1
  137. package/lib/rtp/src/rtcp/rtcp.js +0 -10
  138. package/lib/rtp/src/rtcp/rtcp.js.map +1 -1
  139. package/lib/rtp/src/rtcp/rtpfb/const.d.ts +1 -0
  140. package/lib/rtp/src/rtcp/rtpfb/const.js +5 -0
  141. package/lib/rtp/src/rtcp/rtpfb/const.js.map +1 -0
  142. package/lib/rtp/src/rtcp/rtpfb/index.d.ts +1 -1
  143. package/lib/rtp/src/rtcp/rtpfb/index.js +2 -1
  144. package/lib/rtp/src/rtcp/rtpfb/index.js.map +1 -1
  145. package/lib/rtp/src/rtcp/rtpfb/nack.d.ts +1 -1
  146. package/lib/rtp/src/rtcp/rtpfb/nack.js +2 -2
  147. package/lib/rtp/src/rtcp/rtpfb/nack.js.map +1 -1
  148. package/lib/rtp/src/rtcp/rtpfb/twcc.d.ts +4 -4
  149. package/lib/rtp/src/rtcp/sdes.d.ts +4 -4
  150. package/lib/rtp/src/rtcp/sdes.js +2 -2
  151. package/lib/rtp/src/rtcp/sdes.js.map +1 -1
  152. package/lib/rtp/src/rtcp/sr.d.ts +2 -2
  153. package/lib/rtp/src/rtcp/sr.js +2 -2
  154. package/lib/rtp/src/rtcp/sr.js.map +1 -1
  155. package/lib/rtp/src/rtp/headerExtension.d.ts +6 -6
  156. package/lib/rtp/src/rtp/red/packet.d.ts +2 -2
  157. package/lib/rtp/src/rtp/rtp.d.ts +2 -2
  158. package/lib/rtp/src/srtp/cipher/ctr.d.ts +4 -4
  159. package/lib/rtp/src/srtp/cipher/gcm.d.ts +4 -4
  160. package/lib/rtp/src/srtp/const.d.ts +3 -3
  161. package/lib/rtp/src/srtp/const.js.map +1 -1
  162. package/lib/rtp/src/srtp/context/context.d.ts +10 -10
  163. package/lib/rtp/src/srtp/context/context.js +10 -4
  164. package/lib/rtp/src/srtp/context/context.js.map +1 -1
  165. package/lib/rtp/src/srtp/context/srtcp.d.ts +3 -3
  166. package/lib/rtp/src/srtp/context/srtcp.js.map +1 -1
  167. package/lib/rtp/src/srtp/context/srtp.d.ts +3 -3
  168. package/lib/rtp/src/srtp/context/srtp.js.map +1 -1
  169. package/lib/rtp/src/srtp/srtcp.d.ts +2 -2
  170. package/lib/rtp/src/srtp/srtp.d.ts +2 -2
  171. package/lib/sctp/src/chunk.d.ts +12 -12
  172. package/lib/sctp/src/chunk.js +87 -66
  173. package/lib/sctp/src/chunk.js.map +1 -1
  174. package/lib/sctp/src/param.d.ts +3 -3
  175. package/lib/sctp/src/param.js +4 -5
  176. package/lib/sctp/src/param.js.map +1 -1
  177. package/lib/sctp/src/sctp.d.ts +3 -1
  178. package/lib/sctp/src/sctp.js +58 -15
  179. package/lib/sctp/src/sctp.js.map +1 -1
  180. package/lib/webrtc/src/dataChannel.d.ts +15 -4
  181. package/lib/webrtc/src/dataChannel.js +42 -7
  182. package/lib/webrtc/src/dataChannel.js.map +1 -1
  183. package/lib/webrtc/src/index.d.ts +1 -0
  184. package/lib/webrtc/src/index.js +1 -0
  185. package/lib/webrtc/src/index.js.map +1 -1
  186. package/lib/webrtc/src/media/index.d.ts +2 -0
  187. package/lib/webrtc/src/media/index.js +2 -0
  188. package/lib/webrtc/src/media/index.js.map +1 -1
  189. package/lib/webrtc/src/media/parameters.d.ts +2 -2
  190. package/lib/webrtc/src/media/parameters.js.map +1 -1
  191. package/lib/webrtc/src/media/receiver/nack.js +3 -7
  192. package/lib/webrtc/src/media/receiver/nack.js.map +1 -1
  193. package/lib/webrtc/src/media/receiver/receiverTwcc.d.ts +2 -2
  194. package/lib/webrtc/src/media/receiver/receiverTwcc.js +1 -1
  195. package/lib/webrtc/src/media/receiver/receiverTwcc.js.map +1 -1
  196. package/lib/webrtc/src/media/router.js +2 -1
  197. package/lib/webrtc/src/media/router.js.map +1 -1
  198. package/lib/webrtc/src/media/rtpReceiver.d.ts +3 -3
  199. package/lib/webrtc/src/media/rtpReceiver.js +53 -4
  200. package/lib/webrtc/src/media/rtpReceiver.js.map +1 -1
  201. package/lib/webrtc/src/media/rtpSender.d.ts +6 -0
  202. package/lib/webrtc/src/media/rtpSender.js +64 -26
  203. package/lib/webrtc/src/media/rtpSender.js.map +1 -1
  204. package/lib/webrtc/src/media/rtpTransceiver.d.ts +12 -9
  205. package/lib/webrtc/src/media/rtpTransceiver.js +30 -26
  206. package/lib/webrtc/src/media/rtpTransceiver.js.map +1 -1
  207. package/lib/webrtc/src/media/stats.d.ts +279 -0
  208. package/lib/webrtc/src/media/stats.js +35 -1
  209. package/lib/webrtc/src/media/stats.js.map +1 -1
  210. package/lib/webrtc/src/media/track.js +3 -3
  211. package/lib/webrtc/src/media/track.js.map +1 -1
  212. package/lib/webrtc/src/nonstandard/recorder/writer/webm.js.map +1 -1
  213. package/lib/webrtc/src/nonstandard/userMedia.js +2 -2
  214. package/lib/webrtc/src/nonstandard/userMedia.js.map +1 -1
  215. package/lib/webrtc/src/peerConnection.d.ts +35 -64
  216. package/lib/webrtc/src/peerConnection.js +337 -1034
  217. package/lib/webrtc/src/peerConnection.js.map +1 -1
  218. package/lib/webrtc/src/sctpManager.d.ts +27 -0
  219. package/lib/webrtc/src/sctpManager.js +147 -0
  220. package/lib/webrtc/src/sctpManager.js.map +1 -0
  221. package/lib/webrtc/src/sdp.d.ts +3 -2
  222. package/lib/webrtc/src/sdp.js +17 -7
  223. package/lib/webrtc/src/sdp.js.map +1 -1
  224. package/lib/webrtc/src/sdpManager.d.ts +78 -0
  225. package/lib/webrtc/src/sdpManager.js +391 -0
  226. package/lib/webrtc/src/sdpManager.js.map +1 -0
  227. package/lib/webrtc/src/secureTransportManager.d.ts +56 -0
  228. package/lib/webrtc/src/secureTransportManager.js +349 -0
  229. package/lib/webrtc/src/secureTransportManager.js.map +1 -0
  230. package/lib/webrtc/src/transceiverManager.d.ts +40 -0
  231. package/lib/webrtc/src/transceiverManager.js +355 -0
  232. package/lib/webrtc/src/transceiverManager.js.map +1 -0
  233. package/lib/webrtc/src/transport/dtls.d.ts +18 -6
  234. package/lib/webrtc/src/transport/dtls.js +128 -13
  235. package/lib/webrtc/src/transport/dtls.js.map +1 -1
  236. package/lib/webrtc/src/transport/ice.d.ts +24 -0
  237. package/lib/webrtc/src/transport/ice.js +88 -2
  238. package/lib/webrtc/src/transport/ice.js.map +1 -1
  239. package/lib/webrtc/src/transport/sctp.js +13 -26
  240. package/lib/webrtc/src/transport/sctp.js.map +1 -1
  241. package/lib/webrtc/src/utils.d.ts +9 -4
  242. package/lib/webrtc/src/utils.js +34 -13
  243. package/lib/webrtc/src/utils.js.map +1 -1
  244. package/package.json +12 -26
@@ -2,226 +2,226 @@
2
2
  * @see https://www.matroska.org/technical/specs/index.html
3
3
  */
4
4
  export declare const ID: {
5
- EBML: Uint8Array;
6
- EBMLVersion: Uint8Array;
7
- EBMLReadVersion: Uint8Array;
8
- EBMLMaxIDLength: Uint8Array;
9
- EBMLMaxSizeLength: Uint8Array;
10
- DocType: Uint8Array;
11
- DocTypeVersion: Uint8Array;
12
- DocTypeReadVersion: Uint8Array;
13
- Void: Uint8Array;
14
- CRC32: Uint8Array;
15
- Segment: Uint8Array;
16
- SeekHead: Uint8Array;
17
- Seek: Uint8Array;
18
- SeekID: Uint8Array;
19
- SeekPosition: Uint8Array;
20
- Info: Uint8Array;
21
- SegmentUID: Uint8Array;
22
- SegmentFilename: Uint8Array;
23
- PrevUID: Uint8Array;
24
- PrevFilename: Uint8Array;
25
- NextUID: Uint8Array;
26
- NextFilename: Uint8Array;
27
- SegmentFamily: Uint8Array;
28
- ChapterTranslate: Uint8Array;
29
- ChapterTranslateEditionUID: Uint8Array;
30
- ChapterTranslateCodec: Uint8Array;
31
- ChapterTranslateID: Uint8Array;
32
- TimecodeScale: Uint8Array;
33
- Duration: Uint8Array;
34
- DateUTC: Uint8Array;
35
- Title: Uint8Array;
36
- MuxingApp: Uint8Array;
37
- WritingApp: Uint8Array;
38
- Cluster: Uint8Array;
39
- Timecode: Uint8Array;
40
- SilentTracks: Uint8Array;
41
- SilentTrackNumber: Uint8Array;
42
- Position: Uint8Array;
43
- PrevSize: Uint8Array;
44
- SimpleBlock: Uint8Array;
45
- BlockGroup: Uint8Array;
46
- Block: Uint8Array;
47
- BlockAdditions: Uint8Array;
48
- BlockMore: Uint8Array;
49
- BlockAddID: Uint8Array;
50
- BlockAdditional: Uint8Array;
51
- BlockDuration: Uint8Array;
52
- ReferencePriority: Uint8Array;
53
- ReferenceBlock: Uint8Array;
54
- CodecState: Uint8Array;
55
- DiscardPadding: Uint8Array;
56
- Slices: Uint8Array;
57
- TimeSlice: Uint8Array;
58
- LaceNumber: Uint8Array;
59
- Tracks: Uint8Array;
60
- TrackEntry: Uint8Array;
61
- TrackNumber: Uint8Array;
62
- TrackUID: Uint8Array;
63
- TrackType: Uint8Array;
64
- FlagEnabled: Uint8Array;
65
- FlagDefault: Uint8Array;
66
- FlagForced: Uint8Array;
67
- FlagLacing: Uint8Array;
68
- MinCache: Uint8Array;
69
- MaxCache: Uint8Array;
70
- DefaultDuration: Uint8Array;
71
- DefaultDecodedFieldDuration: Uint8Array;
72
- MaxBlockAdditionID: Uint8Array;
73
- Name: Uint8Array;
74
- Language: Uint8Array;
75
- CodecID: Uint8Array;
76
- CodecPrivate: Uint8Array;
77
- CodecName: Uint8Array;
78
- AttachmentLink: Uint8Array;
79
- CodecDecodeAll: Uint8Array;
80
- TrackOverlay: Uint8Array;
81
- CodecDelay: Uint8Array;
82
- SeekPreRoll: Uint8Array;
83
- TrackTranslate: Uint8Array;
84
- TrackTranslateEditionUID: Uint8Array;
85
- TrackTranslateCodec: Uint8Array;
86
- TrackTranslateTrackID: Uint8Array;
87
- Video: Uint8Array;
88
- FlagInterlaced: Uint8Array;
89
- FieldOrder: Uint8Array;
90
- StereoMode: Uint8Array;
91
- AlphaMode: Uint8Array;
92
- PixelWidth: Uint8Array;
93
- PixelHeight: Uint8Array;
94
- PixelCropBottom: Uint8Array;
95
- PixelCropTop: Uint8Array;
96
- PixelCropLeft: Uint8Array;
97
- PixelCropRight: Uint8Array;
98
- DisplayWidth: Uint8Array;
99
- DisplayHeight: Uint8Array;
100
- DisplayUnit: Uint8Array;
101
- AspectRatioType: Uint8Array;
102
- ColourSpace: Uint8Array;
103
- Colour: Uint8Array;
104
- MatrixCoefficients: Uint8Array;
105
- BitsPerChannel: Uint8Array;
106
- ChromaSubsamplingHorz: Uint8Array;
107
- ChromaSubsamplingVert: Uint8Array;
108
- CbSubsamplingHorz: Uint8Array;
109
- CbSubsamplingVert: Uint8Array;
110
- ChromaSitingHorz: Uint8Array;
111
- ChromaSitingVert: Uint8Array;
112
- Range: Uint8Array;
113
- TransferCharacteristics: Uint8Array;
114
- Primaries: Uint8Array;
115
- MaxCLL: Uint8Array;
116
- MaxFALL: Uint8Array;
117
- MasteringMetadata: Uint8Array;
118
- PrimaryRChromaticityX: Uint8Array;
119
- PrimaryRChromaticityY: Uint8Array;
120
- PrimaryGChromaticityX: Uint8Array;
121
- PrimaryGChromaticityY: Uint8Array;
122
- PrimaryBChromaticityX: Uint8Array;
123
- PrimaryBChromaticityY: Uint8Array;
124
- WhitePointChromaticityX: Uint8Array;
125
- WhitePointChromaticityY: Uint8Array;
126
- LuminanceMax: Uint8Array;
127
- LuminanceMin: Uint8Array;
128
- Audio: Uint8Array;
129
- SamplingFrequency: Uint8Array;
130
- OutputSamplingFrequency: Uint8Array;
131
- Channels: Uint8Array;
132
- BitDepth: Uint8Array;
133
- TrackOperation: Uint8Array;
134
- TrackCombinePlanes: Uint8Array;
135
- TrackPlane: Uint8Array;
136
- TrackPlaneUID: Uint8Array;
137
- TrackPlaneType: Uint8Array;
138
- TrackJoinBlocks: Uint8Array;
139
- TrackJoinUID: Uint8Array;
140
- ContentEncodings: Uint8Array;
141
- ContentEncoding: Uint8Array;
142
- ContentEncodingOrder: Uint8Array;
143
- ContentEncodingScope: Uint8Array;
144
- ContentEncodingType: Uint8Array;
145
- ContentCompression: Uint8Array;
146
- ContentCompAlgo: Uint8Array;
147
- ContentCompSettings: Uint8Array;
148
- ContentEncryption: Uint8Array;
149
- ContentEncAlgo: Uint8Array;
150
- ContentEncKeyID: Uint8Array;
151
- ContentSignature: Uint8Array;
152
- ContentSigKeyID: Uint8Array;
153
- ContentSigAlgo: Uint8Array;
154
- ContentSigHashAlgo: Uint8Array;
155
- Cues: Uint8Array;
156
- CuePoint: Uint8Array;
157
- CueTime: Uint8Array;
158
- CueTrackPositions: Uint8Array;
159
- CueTrack: Uint8Array;
160
- CueClusterPosition: Uint8Array;
161
- CueRelativePosition: Uint8Array;
162
- CueDuration: Uint8Array;
163
- CueBlockNumber: Uint8Array;
164
- CueCodecState: Uint8Array;
165
- CueReference: Uint8Array;
166
- CueRefTime: Uint8Array;
167
- Attachments: Uint8Array;
168
- AttachedFile: Uint8Array;
169
- FileDescription: Uint8Array;
170
- FileName: Uint8Array;
171
- FileMimeType: Uint8Array;
172
- FileData: Uint8Array;
173
- FileUID: Uint8Array;
174
- Chapters: Uint8Array;
175
- EditionEntry: Uint8Array;
176
- EditionUID: Uint8Array;
177
- EditionFlagHidden: Uint8Array;
178
- EditionFlagDefault: Uint8Array;
179
- EditionFlagOrdered: Uint8Array;
180
- EncryptionAlgorithm: Uint8Array;
181
- EncryptionKeyID: Uint8Array;
182
- ContentEncAESSettings: Uint8Array;
183
- AESSettingsCipherMode: Uint8Array;
184
- ChapterAtom: Uint8Array;
185
- ChapterUID: Uint8Array;
186
- ChapterStringUID: Uint8Array;
187
- ChapterTimeStart: Uint8Array;
188
- ChapterTimeEnd: Uint8Array;
189
- ChapterFlagHidden: Uint8Array;
190
- ChapterFlagEnabled: Uint8Array;
191
- ChapterSegmentUID: Uint8Array;
192
- ChapterSegmentEditionUID: Uint8Array;
193
- ChapterPhysicalEquiv: Uint8Array;
194
- ChapterTrack: Uint8Array;
195
- ChapterTrackNumber: Uint8Array;
196
- ChapterDisplay: Uint8Array;
197
- ChapString: Uint8Array;
198
- ChapLanguage: Uint8Array;
199
- ChapCountry: Uint8Array;
200
- ChapProcess: Uint8Array;
201
- ChapProcessCodecID: Uint8Array;
202
- ChapProcessPrivate: Uint8Array;
203
- ChapProcessCommand: Uint8Array;
204
- ChapProcessTime: Uint8Array;
205
- ChapProcessData: Uint8Array;
206
- Tags: Uint8Array;
207
- Tag: Uint8Array;
208
- Targets: Uint8Array;
209
- TargetTypeValue: Uint8Array;
210
- TargetType: Uint8Array;
211
- TagTrackUID: Uint8Array;
212
- TagEditionUID: Uint8Array;
213
- TagChapterUID: Uint8Array;
214
- TagAttachmentUID: Uint8Array;
215
- SimpleTag: Uint8Array;
216
- TagName: Uint8Array;
217
- TagLanguage: Uint8Array;
218
- TagDefault: Uint8Array;
219
- TagString: Uint8Array;
220
- TagBinary: Uint8Array;
221
- Projection: Uint8Array;
222
- ProjectionType: Uint8Array;
223
- ProjectionPrivate: Uint8Array;
224
- ProjectionPoseYaw: Uint8Array;
225
- ProjectionPosePitch: Uint8Array;
226
- ProjectionPoseRoll: Uint8Array;
5
+ EBML: Uint8Array<ArrayBuffer>;
6
+ EBMLVersion: Uint8Array<ArrayBuffer>;
7
+ EBMLReadVersion: Uint8Array<ArrayBuffer>;
8
+ EBMLMaxIDLength: Uint8Array<ArrayBuffer>;
9
+ EBMLMaxSizeLength: Uint8Array<ArrayBuffer>;
10
+ DocType: Uint8Array<ArrayBuffer>;
11
+ DocTypeVersion: Uint8Array<ArrayBuffer>;
12
+ DocTypeReadVersion: Uint8Array<ArrayBuffer>;
13
+ Void: Uint8Array<ArrayBuffer>;
14
+ CRC32: Uint8Array<ArrayBuffer>;
15
+ Segment: Uint8Array<ArrayBuffer>;
16
+ SeekHead: Uint8Array<ArrayBuffer>;
17
+ Seek: Uint8Array<ArrayBuffer>;
18
+ SeekID: Uint8Array<ArrayBuffer>;
19
+ SeekPosition: Uint8Array<ArrayBuffer>;
20
+ Info: Uint8Array<ArrayBuffer>;
21
+ SegmentUID: Uint8Array<ArrayBuffer>;
22
+ SegmentFilename: Uint8Array<ArrayBuffer>;
23
+ PrevUID: Uint8Array<ArrayBuffer>;
24
+ PrevFilename: Uint8Array<ArrayBuffer>;
25
+ NextUID: Uint8Array<ArrayBuffer>;
26
+ NextFilename: Uint8Array<ArrayBuffer>;
27
+ SegmentFamily: Uint8Array<ArrayBuffer>;
28
+ ChapterTranslate: Uint8Array<ArrayBuffer>;
29
+ ChapterTranslateEditionUID: Uint8Array<ArrayBuffer>;
30
+ ChapterTranslateCodec: Uint8Array<ArrayBuffer>;
31
+ ChapterTranslateID: Uint8Array<ArrayBuffer>;
32
+ TimecodeScale: Uint8Array<ArrayBuffer>;
33
+ Duration: Uint8Array<ArrayBuffer>;
34
+ DateUTC: Uint8Array<ArrayBuffer>;
35
+ Title: Uint8Array<ArrayBuffer>;
36
+ MuxingApp: Uint8Array<ArrayBuffer>;
37
+ WritingApp: Uint8Array<ArrayBuffer>;
38
+ Cluster: Uint8Array<ArrayBuffer>;
39
+ Timecode: Uint8Array<ArrayBuffer>;
40
+ SilentTracks: Uint8Array<ArrayBuffer>;
41
+ SilentTrackNumber: Uint8Array<ArrayBuffer>;
42
+ Position: Uint8Array<ArrayBuffer>;
43
+ PrevSize: Uint8Array<ArrayBuffer>;
44
+ SimpleBlock: Uint8Array<ArrayBuffer>;
45
+ BlockGroup: Uint8Array<ArrayBuffer>;
46
+ Block: Uint8Array<ArrayBuffer>;
47
+ BlockAdditions: Uint8Array<ArrayBuffer>;
48
+ BlockMore: Uint8Array<ArrayBuffer>;
49
+ BlockAddID: Uint8Array<ArrayBuffer>;
50
+ BlockAdditional: Uint8Array<ArrayBuffer>;
51
+ BlockDuration: Uint8Array<ArrayBuffer>;
52
+ ReferencePriority: Uint8Array<ArrayBuffer>;
53
+ ReferenceBlock: Uint8Array<ArrayBuffer>;
54
+ CodecState: Uint8Array<ArrayBuffer>;
55
+ DiscardPadding: Uint8Array<ArrayBuffer>;
56
+ Slices: Uint8Array<ArrayBuffer>;
57
+ TimeSlice: Uint8Array<ArrayBuffer>;
58
+ LaceNumber: Uint8Array<ArrayBuffer>;
59
+ Tracks: Uint8Array<ArrayBuffer>;
60
+ TrackEntry: Uint8Array<ArrayBuffer>;
61
+ TrackNumber: Uint8Array<ArrayBuffer>;
62
+ TrackUID: Uint8Array<ArrayBuffer>;
63
+ TrackType: Uint8Array<ArrayBuffer>;
64
+ FlagEnabled: Uint8Array<ArrayBuffer>;
65
+ FlagDefault: Uint8Array<ArrayBuffer>;
66
+ FlagForced: Uint8Array<ArrayBuffer>;
67
+ FlagLacing: Uint8Array<ArrayBuffer>;
68
+ MinCache: Uint8Array<ArrayBuffer>;
69
+ MaxCache: Uint8Array<ArrayBuffer>;
70
+ DefaultDuration: Uint8Array<ArrayBuffer>;
71
+ DefaultDecodedFieldDuration: Uint8Array<ArrayBuffer>;
72
+ MaxBlockAdditionID: Uint8Array<ArrayBuffer>;
73
+ Name: Uint8Array<ArrayBuffer>;
74
+ Language: Uint8Array<ArrayBuffer>;
75
+ CodecID: Uint8Array<ArrayBuffer>;
76
+ CodecPrivate: Uint8Array<ArrayBuffer>;
77
+ CodecName: Uint8Array<ArrayBuffer>;
78
+ AttachmentLink: Uint8Array<ArrayBuffer>;
79
+ CodecDecodeAll: Uint8Array<ArrayBuffer>;
80
+ TrackOverlay: Uint8Array<ArrayBuffer>;
81
+ CodecDelay: Uint8Array<ArrayBuffer>;
82
+ SeekPreRoll: Uint8Array<ArrayBuffer>;
83
+ TrackTranslate: Uint8Array<ArrayBuffer>;
84
+ TrackTranslateEditionUID: Uint8Array<ArrayBuffer>;
85
+ TrackTranslateCodec: Uint8Array<ArrayBuffer>;
86
+ TrackTranslateTrackID: Uint8Array<ArrayBuffer>;
87
+ Video: Uint8Array<ArrayBuffer>;
88
+ FlagInterlaced: Uint8Array<ArrayBuffer>;
89
+ FieldOrder: Uint8Array<ArrayBuffer>;
90
+ StereoMode: Uint8Array<ArrayBuffer>;
91
+ AlphaMode: Uint8Array<ArrayBuffer>;
92
+ PixelWidth: Uint8Array<ArrayBuffer>;
93
+ PixelHeight: Uint8Array<ArrayBuffer>;
94
+ PixelCropBottom: Uint8Array<ArrayBuffer>;
95
+ PixelCropTop: Uint8Array<ArrayBuffer>;
96
+ PixelCropLeft: Uint8Array<ArrayBuffer>;
97
+ PixelCropRight: Uint8Array<ArrayBuffer>;
98
+ DisplayWidth: Uint8Array<ArrayBuffer>;
99
+ DisplayHeight: Uint8Array<ArrayBuffer>;
100
+ DisplayUnit: Uint8Array<ArrayBuffer>;
101
+ AspectRatioType: Uint8Array<ArrayBuffer>;
102
+ ColourSpace: Uint8Array<ArrayBuffer>;
103
+ Colour: Uint8Array<ArrayBuffer>;
104
+ MatrixCoefficients: Uint8Array<ArrayBuffer>;
105
+ BitsPerChannel: Uint8Array<ArrayBuffer>;
106
+ ChromaSubsamplingHorz: Uint8Array<ArrayBuffer>;
107
+ ChromaSubsamplingVert: Uint8Array<ArrayBuffer>;
108
+ CbSubsamplingHorz: Uint8Array<ArrayBuffer>;
109
+ CbSubsamplingVert: Uint8Array<ArrayBuffer>;
110
+ ChromaSitingHorz: Uint8Array<ArrayBuffer>;
111
+ ChromaSitingVert: Uint8Array<ArrayBuffer>;
112
+ Range: Uint8Array<ArrayBuffer>;
113
+ TransferCharacteristics: Uint8Array<ArrayBuffer>;
114
+ Primaries: Uint8Array<ArrayBuffer>;
115
+ MaxCLL: Uint8Array<ArrayBuffer>;
116
+ MaxFALL: Uint8Array<ArrayBuffer>;
117
+ MasteringMetadata: Uint8Array<ArrayBuffer>;
118
+ PrimaryRChromaticityX: Uint8Array<ArrayBuffer>;
119
+ PrimaryRChromaticityY: Uint8Array<ArrayBuffer>;
120
+ PrimaryGChromaticityX: Uint8Array<ArrayBuffer>;
121
+ PrimaryGChromaticityY: Uint8Array<ArrayBuffer>;
122
+ PrimaryBChromaticityX: Uint8Array<ArrayBuffer>;
123
+ PrimaryBChromaticityY: Uint8Array<ArrayBuffer>;
124
+ WhitePointChromaticityX: Uint8Array<ArrayBuffer>;
125
+ WhitePointChromaticityY: Uint8Array<ArrayBuffer>;
126
+ LuminanceMax: Uint8Array<ArrayBuffer>;
127
+ LuminanceMin: Uint8Array<ArrayBuffer>;
128
+ Audio: Uint8Array<ArrayBuffer>;
129
+ SamplingFrequency: Uint8Array<ArrayBuffer>;
130
+ OutputSamplingFrequency: Uint8Array<ArrayBuffer>;
131
+ Channels: Uint8Array<ArrayBuffer>;
132
+ BitDepth: Uint8Array<ArrayBuffer>;
133
+ TrackOperation: Uint8Array<ArrayBuffer>;
134
+ TrackCombinePlanes: Uint8Array<ArrayBuffer>;
135
+ TrackPlane: Uint8Array<ArrayBuffer>;
136
+ TrackPlaneUID: Uint8Array<ArrayBuffer>;
137
+ TrackPlaneType: Uint8Array<ArrayBuffer>;
138
+ TrackJoinBlocks: Uint8Array<ArrayBuffer>;
139
+ TrackJoinUID: Uint8Array<ArrayBuffer>;
140
+ ContentEncodings: Uint8Array<ArrayBuffer>;
141
+ ContentEncoding: Uint8Array<ArrayBuffer>;
142
+ ContentEncodingOrder: Uint8Array<ArrayBuffer>;
143
+ ContentEncodingScope: Uint8Array<ArrayBuffer>;
144
+ ContentEncodingType: Uint8Array<ArrayBuffer>;
145
+ ContentCompression: Uint8Array<ArrayBuffer>;
146
+ ContentCompAlgo: Uint8Array<ArrayBuffer>;
147
+ ContentCompSettings: Uint8Array<ArrayBuffer>;
148
+ ContentEncryption: Uint8Array<ArrayBuffer>;
149
+ ContentEncAlgo: Uint8Array<ArrayBuffer>;
150
+ ContentEncKeyID: Uint8Array<ArrayBuffer>;
151
+ ContentSignature: Uint8Array<ArrayBuffer>;
152
+ ContentSigKeyID: Uint8Array<ArrayBuffer>;
153
+ ContentSigAlgo: Uint8Array<ArrayBuffer>;
154
+ ContentSigHashAlgo: Uint8Array<ArrayBuffer>;
155
+ Cues: Uint8Array<ArrayBuffer>;
156
+ CuePoint: Uint8Array<ArrayBuffer>;
157
+ CueTime: Uint8Array<ArrayBuffer>;
158
+ CueTrackPositions: Uint8Array<ArrayBuffer>;
159
+ CueTrack: Uint8Array<ArrayBuffer>;
160
+ CueClusterPosition: Uint8Array<ArrayBuffer>;
161
+ CueRelativePosition: Uint8Array<ArrayBuffer>;
162
+ CueDuration: Uint8Array<ArrayBuffer>;
163
+ CueBlockNumber: Uint8Array<ArrayBuffer>;
164
+ CueCodecState: Uint8Array<ArrayBuffer>;
165
+ CueReference: Uint8Array<ArrayBuffer>;
166
+ CueRefTime: Uint8Array<ArrayBuffer>;
167
+ Attachments: Uint8Array<ArrayBuffer>;
168
+ AttachedFile: Uint8Array<ArrayBuffer>;
169
+ FileDescription: Uint8Array<ArrayBuffer>;
170
+ FileName: Uint8Array<ArrayBuffer>;
171
+ FileMimeType: Uint8Array<ArrayBuffer>;
172
+ FileData: Uint8Array<ArrayBuffer>;
173
+ FileUID: Uint8Array<ArrayBuffer>;
174
+ Chapters: Uint8Array<ArrayBuffer>;
175
+ EditionEntry: Uint8Array<ArrayBuffer>;
176
+ EditionUID: Uint8Array<ArrayBuffer>;
177
+ EditionFlagHidden: Uint8Array<ArrayBuffer>;
178
+ EditionFlagDefault: Uint8Array<ArrayBuffer>;
179
+ EditionFlagOrdered: Uint8Array<ArrayBuffer>;
180
+ EncryptionAlgorithm: Uint8Array<ArrayBuffer>;
181
+ EncryptionKeyID: Uint8Array<ArrayBuffer>;
182
+ ContentEncAESSettings: Uint8Array<ArrayBuffer>;
183
+ AESSettingsCipherMode: Uint8Array<ArrayBuffer>;
184
+ ChapterAtom: Uint8Array<ArrayBuffer>;
185
+ ChapterUID: Uint8Array<ArrayBuffer>;
186
+ ChapterStringUID: Uint8Array<ArrayBuffer>;
187
+ ChapterTimeStart: Uint8Array<ArrayBuffer>;
188
+ ChapterTimeEnd: Uint8Array<ArrayBuffer>;
189
+ ChapterFlagHidden: Uint8Array<ArrayBuffer>;
190
+ ChapterFlagEnabled: Uint8Array<ArrayBuffer>;
191
+ ChapterSegmentUID: Uint8Array<ArrayBuffer>;
192
+ ChapterSegmentEditionUID: Uint8Array<ArrayBuffer>;
193
+ ChapterPhysicalEquiv: Uint8Array<ArrayBuffer>;
194
+ ChapterTrack: Uint8Array<ArrayBuffer>;
195
+ ChapterTrackNumber: Uint8Array<ArrayBuffer>;
196
+ ChapterDisplay: Uint8Array<ArrayBuffer>;
197
+ ChapString: Uint8Array<ArrayBuffer>;
198
+ ChapLanguage: Uint8Array<ArrayBuffer>;
199
+ ChapCountry: Uint8Array<ArrayBuffer>;
200
+ ChapProcess: Uint8Array<ArrayBuffer>;
201
+ ChapProcessCodecID: Uint8Array<ArrayBuffer>;
202
+ ChapProcessPrivate: Uint8Array<ArrayBuffer>;
203
+ ChapProcessCommand: Uint8Array<ArrayBuffer>;
204
+ ChapProcessTime: Uint8Array<ArrayBuffer>;
205
+ ChapProcessData: Uint8Array<ArrayBuffer>;
206
+ Tags: Uint8Array<ArrayBuffer>;
207
+ Tag: Uint8Array<ArrayBuffer>;
208
+ Targets: Uint8Array<ArrayBuffer>;
209
+ TargetTypeValue: Uint8Array<ArrayBuffer>;
210
+ TargetType: Uint8Array<ArrayBuffer>;
211
+ TagTrackUID: Uint8Array<ArrayBuffer>;
212
+ TagEditionUID: Uint8Array<ArrayBuffer>;
213
+ TagChapterUID: Uint8Array<ArrayBuffer>;
214
+ TagAttachmentUID: Uint8Array<ArrayBuffer>;
215
+ SimpleTag: Uint8Array<ArrayBuffer>;
216
+ TagName: Uint8Array<ArrayBuffer>;
217
+ TagLanguage: Uint8Array<ArrayBuffer>;
218
+ TagDefault: Uint8Array<ArrayBuffer>;
219
+ TagString: Uint8Array<ArrayBuffer>;
220
+ TagBinary: Uint8Array<ArrayBuffer>;
221
+ Projection: Uint8Array<ArrayBuffer>;
222
+ ProjectionType: Uint8Array<ArrayBuffer>;
223
+ ProjectionPrivate: Uint8Array<ArrayBuffer>;
224
+ ProjectionPoseYaw: Uint8Array<ArrayBuffer>;
225
+ ProjectionPosePitch: Uint8Array<ArrayBuffer>;
226
+ ProjectionPoseRoll: Uint8Array<ArrayBuffer>;
227
227
  };
@@ -1,2 +1,3 @@
1
1
  export * from "./container";
2
2
  export * from "./ebml";
3
+ export * from "./util";
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./container"), exports);
18
18
  __exportStar(require("./ebml"), exports);
19
+ __exportStar(require("./util"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../rtp/src/extra/container/webm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,yCAAuB","sourcesContent":["export * from \"./container\";\nexport * from \"./ebml\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../rtp/src/extra/container/webm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,yCAAuB;AACvB,yCAAuB","sourcesContent":["export * from \"./container\";\nexport * from \"./ebml\";\nexport * from \"./util\";\n"]}
@@ -0,0 +1,8 @@
1
+ export declare function serializeSimpleBlock(frame: Buffer, isKeyframe: boolean, trackNumber: number, relativeTimestamp: number): Buffer<ArrayBuffer>;
2
+ export interface SimpleBlock {
3
+ data: Buffer;
4
+ trackNumber: number;
5
+ isKeyframe: boolean;
6
+ timecode: number;
7
+ }
8
+ export declare function deserializeSimpleBlocks(data: Buffer): SimpleBlock[];
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.serializeSimpleBlock = serializeSimpleBlock;
37
+ exports.deserializeSimpleBlocks = deserializeSimpleBlocks;
38
+ const common_js_1 = require("../../../imports/common.js");
39
+ const EBML = __importStar(require("./ebml/ebml.js"));
40
+ const ebml_js_1 = require("./ebml/ebml.js");
41
+ function serializeSimpleBlock(frame, isKeyframe, trackNumber, relativeTimestamp) {
42
+ const elementId = Buffer.from([0xa3]);
43
+ const contentSize = EBML.vintEncodedNumber(1 + 2 + 1 + frame.length).bytes;
44
+ const keyframe = isKeyframe ? 1 : 0;
45
+ const flags = new common_js_1.BitWriter2(8)
46
+ .set(keyframe)
47
+ .set(0, 3)
48
+ .set(0)
49
+ .set(0, 2)
50
+ .set(0);
51
+ const simpleBlock = Buffer.concat([
52
+ elementId,
53
+ contentSize,
54
+ EBML.vintEncodedNumber(trackNumber).bytes,
55
+ new common_js_1.BufferChain(2).writeInt16BE(relativeTimestamp).buffer,
56
+ new common_js_1.BufferChain(1).writeUInt8(flags.value).buffer,
57
+ frame,
58
+ ]);
59
+ return simpleBlock;
60
+ }
61
+ function deserializeSimpleBlocks(data) {
62
+ const frames = [];
63
+ let position = 0;
64
+ while (position < data.length) {
65
+ // Element ID (SimpleBlock = 0xA3)
66
+ const elementId = data[position];
67
+ if (elementId !== 0xa3) {
68
+ throw new Error(`unexpected element id 0x${elementId.toString(16)}`);
69
+ }
70
+ position += 1;
71
+ // Content size VINT
72
+ const { value: contentSize, length: contentSizeLength } = (0, ebml_js_1.decodeVintEncodedNumber)(data, position);
73
+ position += contentSizeLength;
74
+ // Track number VINT (we don't actually need the value here but must know its length)
75
+ const { value: trackNumber, length: trackNumberLength } = (0, ebml_js_1.decodeVintEncodedNumber)(data, position);
76
+ position += trackNumberLength;
77
+ // Timecode (signed int16)
78
+ const timecode = data.readInt16BE(position);
79
+ position += 2;
80
+ // Flags (1 byte)
81
+ const flags = new common_js_1.BitStream(data.subarray(position, position + 1));
82
+ const isKeyframe = flags.readBits(1) === 1;
83
+ position += 1;
84
+ const metaSize = trackNumberLength + 2 + 1; // track + timecode + flags
85
+ const remaining = Number(contentSize) - metaSize;
86
+ if (remaining < 0) {
87
+ throw new Error("invalid simple block size");
88
+ }
89
+ const frame = data.subarray(position, position + remaining);
90
+ frames.push({
91
+ data: frame,
92
+ trackNumber: Number(trackNumber),
93
+ isKeyframe,
94
+ timecode,
95
+ });
96
+ position += remaining;
97
+ }
98
+ return frames;
99
+ }
100
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../../../rtp/src/extra/container/webm/util.ts"],"names":[],"mappings":"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","sourcesContent":["import { BitStream, BitWriter2, BufferChain } from \"../../../imports/common.js\";\nimport * as EBML from \"./ebml/ebml.js\";\nimport { decodeVintEncodedNumber } from \"./ebml/ebml.js\";\n\nexport function serializeSimpleBlock(\n frame: Buffer,\n isKeyframe: boolean,\n trackNumber: number,\n relativeTimestamp: number,\n) {\n const elementId = Buffer.from([0xa3]);\n\n const contentSize: Uint8Array = EBML.vintEncodedNumber(\n 1 + 2 + 1 + frame.length,\n ).bytes;\n\n const keyframe = isKeyframe ? 1 : 0;\n const flags = new BitWriter2(8)\n .set(keyframe)\n .set(0, 3)\n .set(0)\n .set(0, 2)\n .set(0);\n\n const simpleBlock = Buffer.concat([\n elementId,\n contentSize,\n EBML.vintEncodedNumber(trackNumber).bytes,\n new BufferChain(2).writeInt16BE(relativeTimestamp).buffer,\n new BufferChain(1).writeUInt8(flags.value).buffer,\n frame,\n ]);\n return simpleBlock;\n}\n\nexport interface SimpleBlock {\n data: Buffer;\n trackNumber: number;\n isKeyframe: boolean;\n timecode: number;\n}\n\nexport function deserializeSimpleBlocks(data: Buffer) {\n const frames: SimpleBlock[] = [];\n let position = 0;\n while (position < data.length) {\n // Element ID (SimpleBlock = 0xA3)\n const elementId = data[position];\n if (elementId !== 0xa3) {\n throw new Error(`unexpected element id 0x${elementId.toString(16)}`);\n }\n position += 1;\n\n // Content size VINT\n const { value: contentSize, length: contentSizeLength } =\n decodeVintEncodedNumber(data, position);\n position += contentSizeLength;\n\n // Track number VINT (we don't actually need the value here but must know its length)\n const { value: trackNumber, length: trackNumberLength } =\n decodeVintEncodedNumber(data, position);\n position += trackNumberLength;\n\n // Timecode (signed int16)\n const timecode = data.readInt16BE(position);\n position += 2;\n // Flags (1 byte)\n const flags = new BitStream(data.subarray(position, position + 1));\n const isKeyframe = (flags.readBits(1) as number) === 1;\n\n position += 1;\n\n const metaSize = trackNumberLength + 2 + 1; // track + timecode + flags\n const remaining = Number(contentSize) - metaSize;\n if (remaining < 0) {\n throw new Error(\"invalid simple block size\");\n }\n const frame = data.subarray(position, position + remaining);\n frames.push({\n data: frame,\n trackNumber: Number(trackNumber),\n isKeyframe,\n timecode,\n });\n position += remaining;\n }\n return frames;\n}\n"]}
@@ -3,7 +3,7 @@ declare const DepacketizeCallback_base: {
3
3
  new (...args: any[]): {
4
4
  cb?: ((o: DepacketizerOutput) => void) | undefined;
5
5
  destructor?: (() => void) | undefined;
6
- pipe: (cb: (o: DepacketizerOutput) => void, destructor?: (() => void) | undefined) => any;
6
+ pipe: (cb: (o: DepacketizerOutput) => void, destructor?: (() => void) | undefined) => /*elided*/ any;
7
7
  input: (input: DepacketizerInput) => void;
8
8
  destroy: () => void;
9
9
  processInput: (input: DepacketizerInput) => DepacketizerOutput[];
@@ -1,4 +1,9 @@
1
1
  import { TransformStream } from "stream/web";
2
2
  import type { DepacketizerCodec } from "../../codec";
3
- import { type DepacketizerInput, type DepacketizerOptions, type DepacketizerOutput } from "./depacketizer";
3
+ import { DepacketizeBase, type DepacketizerInput, type DepacketizerOptions, type DepacketizerOutput } from "./depacketizer";
4
4
  export declare const depacketizeTransformer: (codec: DepacketizerCodec, options?: DepacketizerOptions | undefined) => TransformStream<DepacketizerInput, DepacketizerOutput>;
5
+ declare class DepacketizeTransformer extends DepacketizeBase {
6
+ transform: TransformStream<DepacketizerInput, DepacketizerOutput>;
7
+ constructor(codec: DepacketizerCodec, options?: DepacketizerOptions);
8
+ }
9
+ export {};
@@ -5,7 +5,7 @@ export type DtxOutput = DtxInput;
5
5
  export declare class DtxBase implements Processor<DtxInput, DtxOutput> {
6
6
  ptime: number;
7
7
  private dummyPacket;
8
- readonly id: `${string}-${string}-${string}-${string}-${string}`;
8
+ readonly id: string;
9
9
  previousTimestamp?: number;
10
10
  private fillCount;
11
11
  private internalStats;
@@ -20,7 +20,7 @@ class DtxBase {
20
20
  enumerable: true,
21
21
  configurable: true,
22
22
  writable: true,
23
- value: (0, crypto_1.randomUUID)()
23
+ value: (0, crypto_1.randomUUID)().toString()
24
24
  });
25
25
  Object.defineProperty(this, "previousTimestamp", {
26
26
  enumerable: true,