@yume-chan/scrcpy 0.0.19 → 0.0.21

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 (278) hide show
  1. package/CHANGELOG.json +30 -0
  2. package/CHANGELOG.md +17 -1
  3. package/README.md +76 -266
  4. package/esm/codec/av1.js +2 -2
  5. package/esm/codec/av1.js.map +1 -1
  6. package/esm/codec/h264.d.ts +1 -21
  7. package/esm/codec/h264.d.ts.map +1 -1
  8. package/esm/codec/h264.js +15 -236
  9. package/esm/codec/h264.js.map +1 -1
  10. package/esm/codec/h265.d.ts +454 -0
  11. package/esm/codec/h265.d.ts.map +1 -1
  12. package/esm/codec/h265.js +1062 -2
  13. package/esm/codec/h265.js.map +1 -1
  14. package/esm/codec/index.d.ts +1 -0
  15. package/esm/codec/index.d.ts.map +1 -1
  16. package/esm/codec/index.js +1 -0
  17. package/esm/codec/index.js.map +1 -1
  18. package/esm/codec/nalu.d.ts +37 -0
  19. package/esm/codec/nalu.d.ts.map +1 -0
  20. package/esm/codec/nalu.js +323 -0
  21. package/esm/codec/nalu.js.map +1 -0
  22. package/esm/control/back-or-screen-on.d.ts +1 -1
  23. package/esm/control/back-or-screen-on.d.ts.map +1 -1
  24. package/esm/control/hover-helper.d.ts +1 -1
  25. package/esm/control/hover-helper.d.ts.map +1 -1
  26. package/esm/control/hover-helper.js +8 -9
  27. package/esm/control/hover-helper.js.map +1 -1
  28. package/esm/control/index.d.ts +2 -0
  29. package/esm/control/index.d.ts.map +1 -1
  30. package/esm/control/index.js +2 -0
  31. package/esm/control/index.js.map +1 -1
  32. package/esm/control/inject-keycode.d.ts +1 -2
  33. package/esm/control/inject-keycode.d.ts.map +1 -1
  34. package/esm/control/inject-keycode.js +4 -5
  35. package/esm/control/inject-keycode.js.map +1 -1
  36. package/esm/control/inject-text.d.ts +1 -2
  37. package/esm/control/inject-text.d.ts.map +1 -1
  38. package/esm/control/inject-text.js +1 -2
  39. package/esm/control/inject-text.js.map +1 -1
  40. package/esm/control/inject-touch.d.ts +15 -20
  41. package/esm/control/inject-touch.d.ts.map +1 -1
  42. package/esm/control/inject-touch.js +16 -43
  43. package/esm/control/inject-touch.js.map +1 -1
  44. package/esm/control/rotate-device.d.ts +2 -4
  45. package/esm/control/rotate-device.d.ts.map +1 -1
  46. package/esm/control/rotate-device.js +2 -3
  47. package/esm/control/rotate-device.js.map +1 -1
  48. package/esm/control/serializer.d.ts +11 -23
  49. package/esm/control/serializer.d.ts.map +1 -1
  50. package/esm/control/serializer.js +23 -52
  51. package/esm/control/serializer.js.map +1 -1
  52. package/esm/control/set-screen-power-mode.d.ts +1 -2
  53. package/esm/control/set-screen-power-mode.d.ts.map +1 -1
  54. package/esm/control/set-screen-power-mode.js +2 -3
  55. package/esm/control/set-screen-power-mode.js.map +1 -1
  56. package/esm/control/type.d.ts +14 -0
  57. package/esm/control/type.d.ts.map +1 -1
  58. package/esm/control/type.js +23 -1
  59. package/esm/control/type.js.map +1 -1
  60. package/esm/control/writer.d.ts +26 -0
  61. package/esm/control/writer.d.ts.map +1 -0
  62. package/esm/control/writer.js +53 -0
  63. package/esm/control/writer.js.map +1 -0
  64. package/esm/device-message/stream.d.ts.map +1 -1
  65. package/esm/device-message/stream.js +23 -8
  66. package/esm/device-message/stream.js.map +1 -1
  67. package/esm/device-message/type.js +1 -1
  68. package/esm/device-message/type.js.map +1 -1
  69. package/esm/index.d.ts +1 -2
  70. package/esm/index.d.ts.map +1 -1
  71. package/esm/index.js +1 -2
  72. package/esm/index.js.map +1 -1
  73. package/esm/options/1_16/codec-options.d.ts +2 -3
  74. package/esm/options/1_16/codec-options.d.ts.map +1 -1
  75. package/esm/options/1_16/codec-options.js.map +1 -1
  76. package/esm/options/1_16/index.d.ts +3 -1
  77. package/esm/options/1_16/index.d.ts.map +1 -1
  78. package/esm/options/1_16/index.js +3 -1
  79. package/esm/options/1_16/index.js.map +1 -1
  80. package/esm/options/1_16/init.js +2 -2
  81. package/esm/options/1_16/init.js.map +1 -1
  82. package/esm/options/1_16/options.d.ts +42 -96
  83. package/esm/options/1_16/options.d.ts.map +1 -1
  84. package/esm/options/1_16/options.js +104 -142
  85. package/esm/options/1_16/options.js.map +1 -1
  86. package/esm/options/1_16/scroll.d.ts +2 -4
  87. package/esm/options/1_16/scroll.d.ts.map +1 -1
  88. package/esm/options/1_16/scroll.js +13 -14
  89. package/esm/options/1_16/scroll.js.map +1 -1
  90. package/esm/options/1_17.d.ts +1 -0
  91. package/esm/options/1_17.d.ts.map +1 -1
  92. package/esm/options/1_17.js +8 -3
  93. package/esm/options/1_17.js.map +1 -1
  94. package/esm/options/1_18.d.ts +49 -11
  95. package/esm/options/1_18.d.ts.map +1 -1
  96. package/esm/options/1_18.js +64 -32
  97. package/esm/options/1_18.js.map +1 -1
  98. package/esm/options/1_21.d.ts +26 -7
  99. package/esm/options/1_21.d.ts.map +1 -1
  100. package/esm/options/1_21.js +34 -20
  101. package/esm/options/1_21.js.map +1 -1
  102. package/esm/options/1_22/index.d.ts +1 -0
  103. package/esm/options/1_22/index.d.ts.map +1 -1
  104. package/esm/options/1_22/index.js +1 -0
  105. package/esm/options/1_22/index.js.map +1 -1
  106. package/esm/options/1_22/options.d.ts +32 -26
  107. package/esm/options/1_22/options.d.ts.map +1 -1
  108. package/esm/options/1_22/options.js +26 -16
  109. package/esm/options/1_22/options.js.map +1 -1
  110. package/esm/options/1_22/scroll.d.ts +1 -1
  111. package/esm/options/1_22/scroll.d.ts.map +1 -1
  112. package/esm/options/1_22/scroll.js +1 -1
  113. package/esm/options/1_22/scroll.js.map +1 -1
  114. package/esm/options/1_23.d.ts +32 -8
  115. package/esm/options/1_23.d.ts.map +1 -1
  116. package/esm/options/1_23.js +23 -14
  117. package/esm/options/1_23.js.map +1 -1
  118. package/esm/options/1_24.d.ts +29 -4
  119. package/esm/options/1_24.d.ts.map +1 -1
  120. package/esm/options/1_24.js +16 -7
  121. package/esm/options/1_24.js.map +1 -1
  122. package/esm/options/1_25/options.d.ts +6 -2
  123. package/esm/options/1_25/options.d.ts.map +1 -1
  124. package/esm/options/1_25/options.js +16 -2
  125. package/esm/options/1_25/options.js.map +1 -1
  126. package/esm/options/1_25/scroll.d.ts.map +1 -1
  127. package/esm/options/1_25/scroll.js +2 -1
  128. package/esm/options/1_25/scroll.js.map +1 -1
  129. package/esm/options/2_0.d.ts +12 -8
  130. package/esm/options/2_0.d.ts.map +1 -1
  131. package/esm/options/2_0.js +82 -15
  132. package/esm/options/2_0.js.map +1 -1
  133. package/esm/options/2_1.d.ts +48 -0
  134. package/esm/options/2_1.d.ts.map +1 -0
  135. package/esm/options/2_1.js +23 -0
  136. package/esm/options/2_1.js.map +1 -0
  137. package/esm/options/codec.d.ts +4 -4
  138. package/esm/options/codec.d.ts.map +1 -1
  139. package/esm/options/codec.js +5 -6
  140. package/esm/options/codec.js.map +1 -1
  141. package/esm/options/index.d.ts +5 -0
  142. package/esm/options/index.d.ts.map +1 -1
  143. package/esm/options/index.js +5 -0
  144. package/esm/options/index.js.map +1 -1
  145. package/esm/options/latest.d.ts +4 -5
  146. package/esm/options/latest.d.ts.map +1 -1
  147. package/esm/options/latest.js +2 -3
  148. package/esm/options/latest.js.map +1 -1
  149. package/esm/options/types.d.ts +74 -33
  150. package/esm/options/types.d.ts.map +1 -1
  151. package/esm/options/types.js +62 -0
  152. package/esm/options/types.js.map +1 -1
  153. package/package.json +9 -19
  154. package/src/codec/av1.ts +33 -0
  155. package/src/codec/h264.ts +317 -0
  156. package/src/codec/h265.ts +1375 -0
  157. package/src/codec/index.ts +4 -0
  158. package/src/codec/nalu.ts +391 -0
  159. package/src/control/back-or-screen-on.ts +1 -1
  160. package/{esm/control/simple.js → src/control/basic.ts} +3 -3
  161. package/src/control/hover-helper.ts +10 -11
  162. package/src/control/index.ts +2 -0
  163. package/src/control/inject-keycode.ts +1 -3
  164. package/src/control/inject-text.ts +1 -3
  165. package/src/control/inject-touch.ts +16 -55
  166. package/src/control/rotate-device.ts +2 -7
  167. package/src/control/serializer.ts +50 -113
  168. package/src/control/set-screen-power-mode.ts +1 -3
  169. package/src/control/type.ts +32 -0
  170. package/src/control/writer.ts +85 -0
  171. package/src/device-message/stream.ts +32 -12
  172. package/src/index.ts +1 -2
  173. package/src/options/1_16/codec-options.ts +6 -7
  174. package/src/options/1_16/float-to-uint16.ts +33 -0
  175. package/src/options/1_16/index.ts +3 -1
  176. package/src/options/1_16/init.ts +80 -0
  177. package/src/options/1_16/message.ts +55 -0
  178. package/src/options/1_16/options.ts +147 -260
  179. package/src/options/1_16/scroll.ts +17 -18
  180. package/src/options/1_17.ts +66 -0
  181. package/src/options/1_18.ts +103 -39
  182. package/src/options/1_21.ts +49 -27
  183. package/src/options/1_22/index.ts +1 -0
  184. package/src/options/1_22/init.ts +19 -0
  185. package/src/options/1_22/options.ts +38 -45
  186. package/src/options/1_22/scroll.ts +3 -3
  187. package/src/options/1_23.ts +34 -22
  188. package/src/options/1_24.ts +23 -11
  189. package/src/options/1_25/options.ts +22 -4
  190. package/src/options/1_25/scroll.ts +4 -3
  191. package/src/options/2_0.ts +342 -0
  192. package/src/options/2_1.ts +35 -0
  193. package/src/options/codec.ts +98 -0
  194. package/src/options/index.ts +5 -0
  195. package/src/options/latest.ts +12 -0
  196. package/src/options/types.ts +164 -43
  197. package/tsconfig.build.json +9 -1
  198. package/tsconfig.build.tsbuildinfo +1 -1
  199. package/bin/scrcpy-server +0 -0
  200. package/bin/version.d.ts +0 -1
  201. package/bin/version.js +0 -1
  202. package/esm/adb/client.d.ts +0 -41
  203. package/esm/adb/client.d.ts.map +0 -1
  204. package/esm/adb/client.js +0 -224
  205. package/esm/adb/client.js.map +0 -1
  206. package/esm/adb/connection.d.ts +0 -49
  207. package/esm/adb/connection.d.ts.map +0 -1
  208. package/esm/adb/connection.js +0 -122
  209. package/esm/adb/connection.js.map +0 -1
  210. package/esm/adb/index.d.ts +0 -4
  211. package/esm/adb/index.d.ts.map +0 -1
  212. package/esm/adb/index.js +0 -4
  213. package/esm/adb/index.js.map +0 -1
  214. package/esm/adb/options/1_16.d.ts +0 -8
  215. package/esm/adb/options/1_16.d.ts.map +0 -1
  216. package/esm/adb/options/1_16.js +0 -20
  217. package/esm/adb/options/1_16.js.map +0 -1
  218. package/esm/adb/options/1_22.d.ts +0 -8
  219. package/esm/adb/options/1_22.d.ts.map +0 -1
  220. package/esm/adb/options/1_22.js +0 -17
  221. package/esm/adb/options/1_22.js.map +0 -1
  222. package/esm/adb/options/1_26.d.ts +0 -9
  223. package/esm/adb/options/1_26.d.ts.map +0 -1
  224. package/esm/adb/options/1_26.js +0 -11
  225. package/esm/adb/options/1_26.js.map +0 -1
  226. package/esm/adb/options/2_0.d.ts +0 -8
  227. package/esm/adb/options/2_0.d.ts.map +0 -1
  228. package/esm/adb/options/2_0.js +0 -13
  229. package/esm/adb/options/2_0.js.map +0 -1
  230. package/esm/adb/options/index.d.ts +0 -4
  231. package/esm/adb/options/index.d.ts.map +0 -1
  232. package/esm/adb/options/index.js +0 -4
  233. package/esm/adb/options/index.js.map +0 -1
  234. package/esm/adb/options/types.d.ts +0 -24
  235. package/esm/adb/options/types.d.ts.map +0 -1
  236. package/esm/adb/options/types.js +0 -37
  237. package/esm/adb/options/types.js.map +0 -1
  238. package/esm/codec.d.ts +0 -34
  239. package/esm/codec.d.ts.map +0 -1
  240. package/esm/codec.js +0 -37
  241. package/esm/codec.js.map +0 -1
  242. package/esm/control/simple.d.ts +0 -5
  243. package/esm/control/simple.d.ts.map +0 -1
  244. package/esm/control/simple.js.map +0 -1
  245. package/esm/decoder.d.ts +0 -2
  246. package/esm/decoder.d.ts.map +0 -1
  247. package/esm/decoder.js +0 -2
  248. package/esm/decoder.js.map +0 -1
  249. package/esm/options/1.17.d.ts +0 -3
  250. package/esm/options/1.17.d.ts.map +0 -1
  251. package/esm/options/1.17.js +0 -2
  252. package/esm/options/1.17.js.map +0 -1
  253. package/esm/options/1_16/h264-configuration.d.ts +0 -49
  254. package/esm/options/1_16/h264-configuration.d.ts.map +0 -1
  255. package/esm/options/1_16/h264-configuration.js +0 -414
  256. package/esm/options/1_16/h264-configuration.js.map +0 -1
  257. package/esm/options/1_16/sps.d.ts +0 -22
  258. package/esm/options/1_16/sps.d.ts.map +0 -1
  259. package/esm/options/1_16/sps.js +0 -263
  260. package/esm/options/1_16/sps.js.map +0 -1
  261. package/esm/options/1_26.d.ts +0 -57
  262. package/esm/options/1_26.d.ts.map +0 -1
  263. package/esm/options/1_26.js +0 -67
  264. package/esm/options/1_26.js.map +0 -1
  265. package/esm/options/2.d.ts +0 -57
  266. package/esm/options/2.d.ts.map +0 -1
  267. package/esm/options/2.js +0 -67
  268. package/esm/options/2.js.map +0 -1
  269. package/scripts/fetch-server.cjs +0 -38
  270. package/src/adb/client.ts +0 -329
  271. package/src/adb/connection.ts +0 -209
  272. package/src/adb/index.ts +0 -3
  273. package/src/adb/options/1_16.ts +0 -32
  274. package/src/adb/options/1_22.ts +0 -26
  275. package/src/adb/options/index.ts +0 -3
  276. package/src/adb/options/types.ts +0 -75
  277. package/src/codec.ts +0 -35
  278. package/src/options/1_16/h264-configuration.ts +0 -485
package/CHANGELOG.json CHANGED
@@ -1,6 +1,36 @@
1
1
  {
2
2
  "name": "@yume-chan/scrcpy",
3
3
  "entries": [
4
+ {
5
+ "version": "0.0.21",
6
+ "tag": "@yume-chan/scrcpy_v0.0.21",
7
+ "date": "Fri, 25 Aug 2023 14:05:18 GMT",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "comment": "Add support for Scrcpy server version 2.1 and 2.1.1"
12
+ },
13
+ {
14
+ "comment": "Move the fetching server binary script to `@yume-chan/scrcpy-fetch-server` package"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "version": "0.0.20",
21
+ "tag": "@yume-chan/scrcpy_v0.0.20",
22
+ "date": "Mon, 05 Jun 2023 02:51:41 GMT",
23
+ "comments": {
24
+ "none": [
25
+ {
26
+ "comment": "Add support for Scrcpy 2.0. New features including audio forwarding (supports PCM, AAC and OPUS encoding) and other video codecs (supports H.264 and H.265, AV1 not supported). Read the PR for new options and breaking changes. ([#495](https://github.com/yume-chan/ya-webadb/pull/495))"
27
+ },
28
+ {
29
+ "comment": "Move ADB related code to `@yume-chan/adb-scrcpy` package. This package now only implements the Scrcpy protocol."
30
+ }
31
+ ]
32
+ }
33
+ },
4
34
  {
5
35
  "version": "0.0.19",
6
36
  "tag": "@yume-chan/scrcpy_v0.0.19",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,22 @@
1
1
  # Change Log - @yume-chan/scrcpy
2
2
 
3
- This log was last generated on Sun, 09 Apr 2023 05:55:33 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 25 Aug 2023 14:05:18 GMT and should not be manually modified.
4
+
5
+ ## 0.0.21
6
+ Fri, 25 Aug 2023 14:05:18 GMT
7
+
8
+ ### Updates
9
+
10
+ - Add support for Scrcpy server version 2.1 and 2.1.1
11
+ - Move the fetching server binary script to `@yume-chan/scrcpy-fetch-server` package
12
+
13
+ ## 0.0.20
14
+ Mon, 05 Jun 2023 02:51:41 GMT
15
+
16
+ ### Updates
17
+
18
+ - Add support for Scrcpy 2.0. New features including audio forwarding (supports PCM, AAC and OPUS encoding) and other video codecs (supports H.264 and H.265, AV1 not supported). Read the PR for new options and breaking changes. ([#495](https://github.com/yume-chan/ya-webadb/pull/495))
19
+ - Move ADB related code to `@yume-chan/adb-scrcpy` package. This package now only implements the Scrcpy protocol.
4
20
 
5
21
  ## 0.0.19
6
22
  Sun, 09 Apr 2023 05:55:33 GMT
package/README.md CHANGED
@@ -1,281 +1,97 @@
1
1
  # @yume-chan/scrcpy
2
2
 
3
- TypeScript implementation of [Scrcpy](https://github.com/Genymobile/scrcpy) client.
3
+ TypeScript library to communicate with [Scrcpy](https://github.com/Genymobile/scrcpy) server.
4
4
 
5
5
  It's compatible with the official Scrcpy server binaries.
6
6
 
7
- **WARNING:** The public API is UNSTABLE. If you have any questions, please open an issue.
7
+ **WARNING:** The public API is UNSTABLE. Open a GitHub discussion if you have any questions.
8
8
 
9
- - [Basic information](#basic-information)
10
- - [Prepare server binary](#prepare-server-binary)
11
- - [`fetch-scrcpy-server`](#fetch-scrcpy-server)
12
- - [Use the server binary](#use-the-server-binary)
13
- - [Node.js CommonJS](#nodejs-commonjs)
14
- - [Node.js ES module](#nodejs-es-module)
15
- - [Webpack 4](#webpack-4)
16
- - [Webpack 5](#webpack-5)
17
- - [Read the server version](#read-the-server-version)
18
- - [Server versions](#server-versions)
19
- - [Use with `@yume-chan/adb`](#use-with-yume-chanadb)
20
- - [Push server binary](#push-server-binary)
21
- - [Start server on device](#start-server-on-device)
22
- - [Using other transportation](#using-other-transportation)
23
- - [Parsing video packets](#parsing-video-packets)
24
- - [Sending control messages](#sending-control-messages)
25
- - [Reading device messages](#reading-device-messages)
26
- - [Always read the streams](#always-read-the-streams)
27
- - [Video stream](#video-stream)
28
- - [Decode video stream](#decode-video-stream)
9
+ - [How does Scrcpy work](#how-does-scrcpy-work)
10
+ - [What does this package do](#what-does-this-package-do)
11
+ - [Prepare server binary](#prepare-server-binary)
12
+ - [Server versions](#server-versions)
13
+ - [Reading and writing packets](#reading-and-writing-packets)
14
+ - [Reading video/audio packets](#reading-videoaudio-packets)
15
+ - [Sending control messages](#sending-control-messages)
16
+ - [Reading device messages](#reading-device-messages)
17
+ - [Always read all streams](#always-read-all-streams)
18
+ - [Video/audio stream](#videoaudio-stream)
19
+ - [Decode video stream](#decode-video-stream)
29
20
 
30
- ## Basic information
21
+ ## How does Scrcpy work
31
22
 
32
- Although Scrcpy doesn't install any App on the device, it does have a server binary executable to be run on the device.
23
+ Scrcpy has two parts: a client and a server.
33
24
 
34
- With the official Scrcpy client and server, the client uses ADB to transfer the server binary file to the device, run it, and communicate with it via ADB tunnel (the bootstrap process).
25
+ The server is a Java application (but not an Android app) that runs on the device to capture the video and audio, and send them to the client.
35
26
 
36
- This package provides types that can serialize and deserialize Scrcpy protocol messages, but it generally requires you to do the bootstrapping and provide the data stream to the server.
27
+ The client receives captured video and audio data, and renders them on computer.
37
28
 
38
- If you are also using `@yume-chan/adb`, this package has a helper class that can complete the bootstrap process using it, doing what the official client does.
29
+ The official Scrcpy client also spawns Google ADB executable to set up the reverse tunnel, push the server binary to the device, and start the server.
39
30
 
40
- **NOTE:** `@yume-chan/adb` is a peer dependency, you need to install it yourself. Only those types whose names begin with `Adb` requires `@yume-chan/adb`.
31
+ ## What does this package do
41
32
 
42
- ## Prepare server binary
43
-
44
- This package doesn't include the server binary. It's compatible with many versions of the official server binary, but may not work with future versions due to protocol changes.
45
-
46
- You can download the server binary from official releases (https://github.com/Genymobile/scrcpy/releases), or use the built-in `fetch-scrcpy-server` script to automate the process.
47
-
48
- The server binary is subject to [Apache License 2.0](https://github.com/Genymobile/scrcpy/blob/master/LICENSE).
49
-
50
- ### `fetch-scrcpy-server`
51
-
52
- This package includes a script that downloads the server binary from official releases for you.
53
-
54
- The `gh-release-fetch@3` package is a peer dependency for this script, thus requires separated installation.
55
-
56
- Usage:
57
-
58
- ```
59
- $ npx fetch-scrcpy-server <version>
60
- ```
61
-
62
- For example:
63
-
64
- ```
65
- $ npx fetch-scrcpy-server 1.25
66
- ```
67
-
68
- It can also be added to the `postinstall` script in `package.json`, so running `npm install` will automatically invoke the script:
69
-
70
- ```json
71
- "scripts": {
72
- "postinstall": "fetch-scrcpy-server 1.25",
73
- },
74
- ```
75
-
76
- The server binary will be named `bin/scrcpy-server` in this package's installation directory (usually in `node_modules`).
77
-
78
- ### Use the server binary
79
-
80
- The server binary file needs to be embedded into your application, the exact method depends on the bundler and runtime.
81
-
82
- To name a few:
83
-
84
- #### Node.js CommonJS
85
-
86
- ```ts
87
- const fs = require("fs");
88
- const path: string = require.resolve("@yume-chan/scrcpy/bin/scrcpy-server"); // Or your own server binary path
89
- const buffer: Buffer = fs.readFileSync(path);
90
- ```
91
-
92
- #### Node.js ES module
93
-
94
- ```ts
95
- import fs from "node:fs/promises";
96
- import { createRequire } from "node:module";
97
-
98
- const path: string = createRequire(import.meta.url).resolve(
99
- "@yume-chan/scrcpy/bin/scrcpy-server"
100
- ); // Or your own server binary path
101
- const buffer: Buffer = await fs.readFile(path);
102
- ```
103
-
104
- Currently, ES Module doesn't have a `resolve` function like `require.resolve` in CommonJS, so `createRequire` is used to create a CommonJS resolver.
105
-
106
- Or with the `--experimental-import-meta-resolve` command line flag, you can use `import.meta.resolve`:
107
-
108
- ```ts
109
- import fs from "node:fs/promises";
110
-
111
- const path: string = await import.meta.resolve(
112
- "@yume-chan/scrcpy/bin/scrcpy-server"
113
- );
114
- const buffer: Buffer = await fs.readFile(path);
115
- ```
116
-
117
- #### Webpack 4
118
-
119
- Requires installing and configuring file-loader (https://v4.webpack.js.org/loaders/file-loader/)
120
-
121
- ```ts
122
- import SCRCPY_SERVER_URL from "@yume-chan/scrcpy/bin/scrcpy-server"; // Or your own server binary path
123
- const buffer: ArrayBuffer = await fetch(SCRCPY_SERVER_URL).then((response) =>
124
- response.arrayBuffer()
125
- );
126
- ```
127
-
128
- #### Webpack 5
33
+ This package can't push nor start the server, nor render the video and audio. It only provides APIs to communicate with the server.
129
34
 
130
- Requires configuring Asset Modules (https://webpack.js.org/guides/asset-modules/)
35
+ `@yume-chan/adb-scrcpy` package is a wrapper of this package, provides integration with `@yume-chan/adb` package, and can push, start, and stop the server.
131
36
 
132
- ```ts
133
- const SCRCPY_SERVER_URL = new URL(
134
- "@yume-chan/scrcpy/bin/scrcpy-server",
135
- import.meta.url
136
- ); // Or your own server binary path
137
- const buffer: ArrayBuffer = await fetch(SCRCPY_SERVER_URL).then((response) =>
138
- response.arrayBuffer()
139
- );
140
- ```
141
-
142
- ### Read the server version
37
+ ## Prepare server binary
143
38
 
144
- The correct version number is required to launch the server, so `fetch-scrcpy-server` also writes the version number to `bin/version.js`.
39
+ This package is compatible with many versions of the official server binary, but it doesn't include the server binary itself.
145
40
 
146
- ```js
147
- import SCRCPY_SERVER_VERSION from "@yume-chan/scrcpy/bin/version.js";
41
+ You can download the server binary from official releases (https://github.com/Genymobile/scrcpy/releases), or use the `@yume-chan/fetch-scrcpy-server` package to automate the process.
148
42
 
149
- console.log(SCRCPY_SERVER_VERSION); // "1.25"
150
- ```
43
+ The server binary is subject to [Apache License 2.0](https://github.com/Genymobile/scrcpy/blob/master/LICENSE).
151
44
 
152
45
  ## Server versions
153
46
 
154
- Scrcpy protocol change over time, and are usually not backwards compatible. This package supports multiple server versions (or ranges), and uses different option types to choose different behaviors. Using incorrect option version usually results in errors.
47
+ Scrcpy protocol changes over time, and are usually not backwards compatible. This package supports multiple server versions (ranges), and uses different option types to choose different behaviors. Using incorrect option version usually results in errors.
155
48
 
156
49
  The latest one may continue to work for future server versions, but there is no guarantee.
157
50
 
158
51
  | Version | Type |
159
52
  | --------- | ------------------- |
160
- | 1.16~1.17 | `ScrcpyOptions1_16` |
53
+ | 1.16 | `ScrcpyOptions1_16` |
54
+ | 1.17 | `ScrcpyOptions1_17` |
161
55
  | 1.18~1.20 | `ScrcpyOptions1_18` |
162
56
  | 1.21 | `ScrcpyOptions1_21` |
163
57
  | 1.22 | `ScrcpyOptions1_22` |
164
58
  | 1.23 | `ScrcpyOptions1_23` |
165
59
  | 1.24 | `ScrcpyOptions1_24` |
166
60
  | 1.25 | `ScrcpyOptions1_25` |
61
+ | 2.0 | `ScrcpyOptions2_0` |
62
+ | 2.1 | `ScrcpyOptions2_1` |
167
63
 
168
- When using `AdbScrcpyClient`, there are `AdbScrcpyOptions` containing `@yume-chan/adb` specific options:
169
-
170
- | Version | Type |
171
- | --------- | ---------------------- |
172
- | 1.16~1.21 | `AdbScrcpyOptions1_16` |
173
- | 1.22~1.25 | `AdbScrcpyOptions1_22` |
174
-
175
- ## Use with `@yume-chan/adb`
64
+ ## Reading and writing packets
176
65
 
177
- `@yume-chan/adb` is a TypeScript ADB implementation that can run on Web browser. It can be used to bootstrap the server on a device.
66
+ This packets operates on Web Streams API streams.
178
67
 
179
- ### Push server binary
68
+ **NOTE:** Web Streams API streams usually can't pipe between different implementations. This package by default uses the native implementation on `globalThis`, and `web-streams-polyfill` otherwise. If you are using another implementation, or simply not sure, wrap your streams using the `WrapReadableStream` and `WrapWritableStream` types from `@yume-chan/stream-extra` package.
180
69
 
181
- The `AdbSync#write()` method can be used to push files to the device. Read more at `@yume-chan/adb`'s documentation (https://github.com/yume-chan/ya-webadb/tree/main/libraries/adb#readme).
70
+ ### Reading video/audio packets
182
71
 
183
- This package also provides the `AdbScrcpyClient.pushServer()` static method as a shortcut, plus it will automatically close the `AdbSync` object on completion.
184
-
185
- Example using a `ReadableStream`:
72
+ Requires a `ReadableStream<Uint8Array>` that reads from the video socket.
186
73
 
187
74
  ```ts
188
- import { WrapReadableStream } from "@yume-chan/adb";
189
- import { AdbScrcpyClient } from "@yume-chan/scrcpy";
190
-
191
- await AdbScrcpyClient.pushServer(
192
- adb,
193
- await fetch(SCRCPY_SERVER_URL).then(
194
- // `WrapReadableStream` is required because native `ReadableStream` (from `fetch`)
195
- // doesn't support `pipeTo()` non-native `WritableStream`s
196
- // (`@yume-chan/adb` is using `web-streams-polyfill`)
197
- (response) => new WrapReadableStream(response.body)
198
- )
199
- );
200
- ```
201
-
202
- Example using an `ArrayBuffer`:
203
-
204
- ```ts
205
- import { AdbScrcpyClient } from "@yume-chan/scrcpy";
206
-
207
- await AdbScrcpyClient.pushServer(
208
- adb,
209
- new ReadableStream({
210
- start(controller) {
211
- controller.enqueue(new Uint8Array(buffer));
212
- controller.end();
213
- },
214
- })
215
- );
216
- ```
217
-
218
- ### Start server on device
219
-
220
- To start the server, use the `AdbScrcpyClient.start()` method. It automatically sets up port forwarding, launches the server, and connects to it.
221
-
222
- ```js
223
- import {
224
- AdbScrcpyClient,
225
- AdbScrcpyOptions1_22,
226
- DEFAULT_SERVER_PATH,
227
- ScrcpyOptions1_24,
228
- } from "@yume-chan/scrcpy";
229
- import SCRCPY_SERVER_VERSION from "@yume-chan/scrcpy/bin/version.js";
230
-
231
- const client: AdbScrcpyClient = await AdbScrcpyClient.start(
232
- adb,
233
- DEFAULT_SERVER_PATH,
234
- // If server binary was downloaded manually, must provide the correct version
235
- SCRCPY_SERVER_VERSION,
236
- new AdbScrcpyOptions1_22(
237
- ScrcpyOptions1_24({
238
- // options
239
- })
240
- )
241
- );
242
-
243
- const stdout: ReadableStream<string> = client.stdout;
244
- const videoPacketStream: ReadableStream<ScrcpyVideoStreamPacket> =
245
- client.videoStream;
246
- const controlMessageSerializer: ScrcpyControlMessageSerializer | undefined =
247
- client.controlMessageSerializer;
248
- const deviceMessageStream: ReadableStream<ScrcpyDeviceMessage> | undefined =
249
- client.deviceMessageStream;
250
-
251
- // to stop the server
252
- client.close();
253
- ```
75
+ import { ScrcpyOptions2_1, ScrcpyVideoStreamPacket } from "@yume-chan/scrcpy";
254
76
 
255
- ## Using other transportation
256
-
257
- If you push, start and connect to the server yourself, you can still use this package to serialize/deserialize packets.
258
-
259
- ### Parsing video packets
260
-
261
- Requires a `ReadableStream<Uint8Array>` that reads from the video socket, preserving packet boundaries.
262
-
263
- **NOTE:** Because this package uses `web-streams-polyfill` NPM package's Web Streams API implementation, the provided `ReadableStream` must also be from `web-streams-polyfill` (or another polyfill that doesn't check object prototype when piping).
264
-
265
- ```ts
266
- import { ScrcpyOptions1_24, ScrcpyVideoStreamPacket } from "@yume-chan/scrcpy";
77
+ const options = new ScrcpyOptions2_1({
78
+ // use the same version and options when starting the server
79
+ });
267
80
 
268
81
  const videoStream: ReadableStream<Uint8Array>; // get the stream yourself
269
82
 
270
- const options = new ScrcpyOptions1_24({
271
- // use the same version and options
272
- });
83
+ // Parse video socket metadata
84
+ // Use `videoStream2` instead of `videoStream` from now on
85
+ const { metadata, stream: videoStream2 } =
86
+ await options.parseVideoStreamMetadata(videoStream);
273
87
 
274
- const videoPacketStream: ReadableStream<ScrcpyVideoStreamPacket> =
275
- videoStream.pipeThrough(options.createVideoStreamTransformer());
88
+ const videoPacketStream: ReadableStream<ScrcpyMediaStreamPacket> =
89
+ videoStream2.pipeThrough(options.createMediaStreamTransformer());
276
90
  // Read from `videoPacketStream`
277
91
  ```
278
92
 
93
+ Read audio stream is similar, but uses `parseVideoStreamMetadata` instead.
94
+
279
95
  ### Sending control messages
280
96
 
281
97
  Requires a `WritableStream<Uint8Array>` that writes to the control socket.
@@ -284,37 +100,33 @@ Control socket is optional if control is not enabled. Video socket and control s
284
100
 
285
101
  ```ts
286
102
  import {
287
- ScrcpyControlMessageSerializer,
288
- ScrcpyOptions1_24,
103
+ ScrcpyControlMessageWriter,
104
+ ScrcpyOptions2_1,
289
105
  } from "@yume-chan/scrcpy";
290
106
 
291
- const controlStream: ReadableWritablePair<Uint8Array, Uint8Array> | undefined; // get the stream yourself
292
-
293
- const options = new ScrcpyOptions1_24({
294
- // use the same version and options
107
+ const options = new ScrcpyOptions2_1({
108
+ // use the same version and options when starting the server
295
109
  });
296
110
 
297
- const controlMessageSerializer = new ScrcpyControlMessageSerializer(
298
- controlStream.writable,
111
+ const controlStream: ReadableWritablePair<Uint8Array, Uint8Array>; // get the stream yourself
112
+
113
+ const controlMessageWriter = new ScrcpyControlMessageWriter(
114
+ controlStream.writable.getWriter(),
299
115
  options
300
116
  );
301
- // Call methods on `controlMessageSerializer`
302
- controlMessageSerializer.injectText("Hello World!");
117
+
118
+ // Call methods on `controlMessageWriter`
119
+ controlMessageWriter.injectText("Hello World!");
303
120
  ```
304
121
 
305
122
  ### Reading device messages
306
123
 
307
124
  Requires a `ReadableStream<Uint8Array>` that reads from the control socket.
308
125
 
309
- **NOTE:** Because this package uses `web-streams-polyfill` NPM package's Web Streams API implementation, the provided `ReadableStream` must also be from `web-streams-polyfill` (or another polyfill that doesn't check object prototype when piping).
310
-
311
126
  ```ts
312
- import {
313
- ScrcpyDeviceMessageDeserializeStream,
314
- ScrcpyOptions1_24,
315
- } from "@yume-chan/scrcpy";
127
+ import { ScrcpyDeviceMessageDeserializeStream } from "@yume-chan/scrcpy";
316
128
 
317
- const controlStream: ReadableWritablePair<Uint8Array, Uint8Array> | undefined; // get the stream yourself
129
+ const controlStream: ReadableWritablePair<Uint8Array, Uint8Array>; // get the stream yourself
318
130
 
319
131
  const deviceMessageStream: ReadableStream<ScrcpyDeviceMessage> =
320
132
  controlStream.readable.pipeThrough(
@@ -322,14 +134,12 @@ const deviceMessageStream: ReadableStream<ScrcpyDeviceMessage> =
322
134
  );
323
135
  ```
324
136
 
325
- ## Always read the streams
137
+ ## Always read all streams
326
138
 
327
- In Web Streams API, `ReadableStream` will block its upstream when too many chunks are kept not read. If multiple streams are from the same upstream source, block one stream means blocking all of them.
328
-
329
- For Scrcpy, usually all streams are originated from the same ADB connection (either USB or TCP), so it's important to always read from all streams, even if you don't care about their data.
139
+ In Web Streams API, pipes will block its upstream when downstream's queue is full (back-pressure mechanism). If multiple streams are separated from the same source (for example, all Scrcpy streams are from the same USB or TCP connection), blocking one stream means blocking all of them, so it's important to always read from all streams, even if you don't care about their data.
330
140
 
331
141
  ```ts
332
- // when using `AdbScrcpyClient`
142
+ // if using `AdbScrcpyClient`
333
143
  stdout
334
144
  .pipeTo(
335
145
  new WritableStream<string>({
@@ -364,31 +174,31 @@ deviceMessageStream
364
174
  .catch(() => {});
365
175
  ```
366
176
 
367
- ## Video stream
177
+ ## Video/audio stream
368
178
 
369
- The data from `videoPacketStream` has two types: `configuration` and `frame`. Some fields may not be populated depending on the server version and options.
179
+ The data from `createMediaStreamTransformer()` has two types: `configuration` and `data`.
370
180
 
371
181
  ```ts
372
- export interface ScrcpyVideoStreamConfigurationPacket {
182
+ export interface ScrcpyMediaStreamConfigurationPacket {
373
183
  type: "configuration";
374
- data: H264Configuration;
184
+ data: Uint8Array;
375
185
  }
376
186
 
377
- export interface ScrcpyVideoStreamFramePacket {
378
- type: "frame";
379
- keyframe?: boolean | undefined;
380
- pts?: bigint | undefined;
187
+ export interface ScrcpyMediaStreamDataPacket {
188
+ type: "data";
189
+ keyframe?: boolean;
190
+ pts?: bigint;
381
191
  data: Uint8Array;
382
192
  }
383
193
  ```
384
194
 
385
- When `sendFrameMeta: false` is set, `videoPacketStream` only contains `frame` packets, and only the `data` field in it is available. It's commonly used when feeding into decoders like FFmpeg that can parse the H.264 stream itself, or saving to disk directly.
195
+ When `sendFrameMeta: false` is set, there will be no `configuration` packets, and no `keyframe` and `pts` fields in `data` packets. It's commonly used with decoders that can parse the media stream itself like FFmpeg, or saved unprocessed.
386
196
 
387
- Otherwise, both `configuration` and `frame` packets are available.
197
+ Otherwise, both `configuration` and `data` packets are available.
388
198
 
389
- - `configuration` packets contain the parsed SPS data, and can be used to initialize a video decoder.
390
- - `pts` (and `keyframe` field from server version 1.23) fields in `frame` packets are available to help decode the video.
199
+ - `configuration` packet will be the first packet, and contains codec information. It will occasionally be sent again if the stream configuration changes.
200
+ - `pts` (and `keyframe` field from server version 1.23) fields in `data` packets are available to help decode the stream.
391
201
 
392
202
  ## Decode video stream
393
203
 
394
- `@yume-chan/scrcpy-decoder-tinyh264` and `@yume-chan/scrcpy-decoder-webcodecs` can be used to decode and render the video stream in Browser environments. Refer to their README files for compatibility and usage information.
204
+ `@yume-chan/scrcpy-decoder-tinyh264` and `@yume-chan/scrcpy-decoder-webcodecs` can be used to decode and render the video stream in browsers. Refer to their README files for compatibility and usage information.
package/esm/codec/av1.js CHANGED
@@ -4,7 +4,7 @@ export var AndroidAv1Profile;
4
4
  AndroidAv1Profile[AndroidAv1Profile["Main10"] = 2] = "Main10";
5
5
  AndroidAv1Profile[AndroidAv1Profile["Main10Hdr10"] = 4096] = "Main10Hdr10";
6
6
  AndroidAv1Profile[AndroidAv1Profile["Main10Hdr10Plus"] = 8192] = "Main10Hdr10Plus";
7
- })(AndroidAv1Profile = AndroidAv1Profile || (AndroidAv1Profile = {}));
7
+ })(AndroidAv1Profile || (AndroidAv1Profile = {}));
8
8
  export var AndroidAv1Level;
9
9
  (function (AndroidAv1Level) {
10
10
  AndroidAv1Level[AndroidAv1Level["Level2"] = 1] = "Level2";
@@ -31,5 +31,5 @@ export var AndroidAv1Level;
31
31
  AndroidAv1Level[AndroidAv1Level["Level71"] = 2097152] = "Level71";
32
32
  AndroidAv1Level[AndroidAv1Level["Level72"] = 4194304] = "Level72";
33
33
  AndroidAv1Level[AndroidAv1Level["Level73"] = 8388608] = "Level73";
34
- })(AndroidAv1Level = AndroidAv1Level || (AndroidAv1Level = {}));
34
+ })(AndroidAv1Level || (AndroidAv1Level = {}));
35
35
  //# sourceMappingURL=av1.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"av1.js","sourceRoot":"","sources":["../../src/codec/av1.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,2DAAc,CAAA;IACd,6DAAe,CAAA;IACf,0EAAqB,CAAA;IACrB,kFAAyB,CAAA;AAC7B,CAAC,EALW,iBAAiB,GAAjB,iBAAiB,KAAjB,iBAAiB,QAK5B;AAED,MAAM,CAAN,IAAY,eAyBX;AAzBD,WAAY,eAAe;IACvB,yDAAe,CAAA;IACf,2DAAgB,CAAA;IAChB,2DAAgB,CAAA;IAChB,2DAAgB,CAAA;IAChB,0DAAe,CAAA;IACf,4DAAgB,CAAA;IAChB,4DAAgB,CAAA;IAChB,6DAAgB,CAAA;IAChB,2DAAe,CAAA;IACf,6DAAgB,CAAA;IAChB,8DAAiB,CAAA;IACjB,8DAAiB,CAAA;IACjB,4DAAgB,CAAA;IAChB,8DAAiB,CAAA;IACjB,+DAAiB,CAAA;IACjB,+DAAiB,CAAA;IACjB,6DAAgB,CAAA;IAChB,gEAAiB,CAAA;IACjB,gEAAiB,CAAA;IACjB,gEAAiB,CAAA;IACjB,+DAAgB,CAAA;IAChB,iEAAiB,CAAA;IACjB,iEAAiB,CAAA;IACjB,iEAAiB,CAAA;AACrB,CAAC,EAzBW,eAAe,GAAf,eAAe,KAAf,eAAe,QAyB1B"}
1
+ {"version":3,"file":"av1.js","sourceRoot":"","sources":["../../src/codec/av1.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,2DAAc,CAAA;IACd,6DAAe,CAAA;IACf,0EAAqB,CAAA;IACrB,kFAAyB,CAAA;AAC7B,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAED,MAAM,CAAN,IAAY,eAyBX;AAzBD,WAAY,eAAe;IACvB,yDAAe,CAAA;IACf,2DAAgB,CAAA;IAChB,2DAAgB,CAAA;IAChB,2DAAgB,CAAA;IAChB,0DAAe,CAAA;IACf,4DAAgB,CAAA;IAChB,4DAAgB,CAAA;IAChB,6DAAgB,CAAA;IAChB,2DAAe,CAAA;IACf,6DAAgB,CAAA;IAChB,8DAAiB,CAAA;IACjB,8DAAiB,CAAA;IACjB,4DAAgB,CAAA;IAChB,8DAAiB,CAAA;IACjB,+DAAiB,CAAA;IACjB,+DAAiB,CAAA;IACjB,6DAAgB,CAAA;IAChB,gEAAiB,CAAA;IACjB,gEAAiB,CAAA;IACjB,gEAAiB,CAAA;IACjB,+DAAgB,CAAA;IAChB,iEAAiB,CAAA;IACjB,iEAAiB,CAAA;IACjB,iEAAiB,CAAA;AACrB,CAAC,EAzBW,eAAe,KAAf,eAAe,QAyB1B"}
@@ -31,27 +31,7 @@ export declare enum AndroidAvcLevel {
31
31
  Level61 = 262144,
32
32
  Level62 = 524288
33
33
  }
34
- /**
35
- * Split NAL units from a H.264/H.265 Annex B stream.
36
- *
37
- * The input is not modified.
38
- * The returned NAL units are views of the input (no memory allocation nor copy),
39
- * and still contains emulation prevention bytes.
40
- *
41
- * This methods returns a generator, so it can be stopped immediately
42
- * after the interested NAL unit is found.
43
- */
44
- export declare function naluSplit(buffer: Uint8Array): Generator<Uint8Array>;
45
- /**
46
- * Remove emulation prevention bytes from a H.264/H.265 NAL Unit.
47
- *
48
- * The input is not modified.
49
- * If the input doesn't contain any emulation prevention bytes,
50
- * the input is returned as-is.
51
- * Otherwise, a new `Uint8Array` is created and returned.
52
- */
53
- export declare function naluRemoveEmulation(buffer: Uint8Array): Uint8Array;
54
- export declare function h264ParseSequenceParameterSet(buffer: Uint8Array): {
34
+ export declare function h264ParseSequenceParameterSet(nalu: Uint8Array): {
55
35
  profile_idc: number;
56
36
  constraint_set: number;
57
37
  constraint_set0_flag: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"h264.d.ts","sourceRoot":"","sources":["../../src/codec/h264.ts"],"names":[],"mappings":"AAKA,oBAAY,iBAAiB;IACzB,QAAQ,IAAS;IACjB,IAAI,IAAS;IACb,QAAQ,IAAS;IACjB,IAAI,IAAS;IACb,MAAM,KAAS;IACf,OAAO,KAAS;IAChB,OAAO,KAAS;IAChB,mBAAmB,QAAU;IAC7B,eAAe,SAAU;CAC5B;AAED,oBAAY,eAAe;IACvB,MAAM,IAAS;IACf,OAAO,IAAS;IAChB,OAAO,IAAS;IAChB,OAAO,IAAS;IAChB,OAAO,KAAS;IAChB,MAAM,KAAS;IACf,OAAO,KAAS;IAChB,OAAO,MAAS;IAChB,MAAM,MAAS;IACf,OAAO,MAAS;IAChB,OAAO,OAAU;IACjB,MAAM,OAAU;IAChB,OAAO,OAAU;IACjB,OAAO,OAAU;IACjB,MAAM,QAAU;IAChB,OAAO,QAAU;IACjB,OAAO,QAAU;IACjB,MAAM,SAAU;IAChB,OAAO,SAAU;IACjB,OAAO,SAAU;CACpB;AAmDD;;;;;;;;;GASG;AACH,wBAAiB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC,CAiFpE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,cA0HrD;AAID,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;EAsK/D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,UAAU;;;EAgCzD;AAED,MAAM,WAAW,iBAAiB;IAC9B,mBAAmB,EAAE,UAAU,CAAC;IAChC,oBAAoB,EAAE,UAAU,CAAC;IAEjC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IAEnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IAEtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAElB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IAEnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,iBAAiB,CA6C1E"}
1
+ {"version":3,"file":"h264.d.ts","sourceRoot":"","sources":["../../src/codec/h264.ts"],"names":[],"mappings":"AAOA,oBAAY,iBAAiB;IACzB,QAAQ,IAAS;IACjB,IAAI,IAAS;IACb,QAAQ,IAAS;IACjB,IAAI,IAAS;IACb,MAAM,KAAS;IACf,OAAO,KAAS;IAChB,OAAO,KAAS;IAChB,mBAAmB,QAAU;IAC7B,eAAe,SAAU;CAC5B;AAED,oBAAY,eAAe;IACvB,MAAM,IAAS;IACf,OAAO,IAAS;IAChB,OAAO,IAAS;IAChB,OAAO,IAAS;IAChB,OAAO,KAAS;IAChB,MAAM,KAAS;IACf,OAAO,KAAS;IAChB,OAAO,MAAS;IAChB,MAAM,MAAS;IACf,OAAO,MAAS;IAChB,OAAO,OAAU;IACjB,MAAM,OAAU;IAChB,OAAO,OAAU;IACjB,OAAO,OAAU;IACjB,MAAM,QAAU;IAChB,OAAO,QAAU;IACjB,OAAO,QAAU;IACjB,MAAM,SAAU;IAChB,OAAO,SAAU;IACjB,OAAO,SAAU;CACpB;AAWD,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,UAAU;;;;;;;;;;;;;;;;;;;EAmK7D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,UAAU;;;EAgCzD;AAED,MAAM,WAAW,iBAAiB;IAC9B,mBAAmB,EAAE,UAAU,CAAC;IAChC,oBAAoB,EAAE,UAAU,CAAC;IAEjC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IAEnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IAEtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,iBAAiB,CA2C1E"}