@camera.ui/server 0.0.50-internal.0 → 0.0.50-internal.1

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 (387) hide show
  1. package/dist/interface/index.html +44 -44
  2. package/dist/interface/js/{@primevue.OhxoO3MD.0.0.50-internal.0.js → @primevue.CiB2EGly.0.0.50-internal.1.js} +1 -1
  3. package/dist/interface/js/{@tanstack.D1IL6eOv.0.0.50-internal.0.js → @tanstack.DxMw_rJn.0.0.50-internal.1.js} +1 -1
  4. package/dist/interface/js/{@vee-validate.BGPyWWTh.0.0.50-internal.0.js → @vee-validate.RxZ3hn6V.0.0.50-internal.1.js} +1 -1
  5. package/dist/interface/js/{@vueuse.BsKtqdiG.0.0.50-internal.0.js → @vueuse.C-k73ACm.0.0.50-internal.1.js} +1 -1
  6. package/dist/interface/js/{Adminpanel.D93Kvbwp.0.0.50-internal.0.js → Adminpanel.DumNu6GD.0.0.50-internal.1.js} +1 -1
  7. package/dist/interface/js/{Camera.DF2l3OMA.0.0.50-internal.0.js → Camera.BuosoqFl.0.0.50-internal.1.js} +1 -1
  8. package/dist/interface/js/{Cameras.YzvZccdv.0.0.50-internal.0.js → Cameras.A7NJflGG.0.0.50-internal.1.js} +2 -2
  9. package/dist/interface/js/Cammesh.Dv3C0UiR.0.0.50-internal.1.js +1 -0
  10. package/dist/interface/js/{Camview.CB7_HnoQ.0.0.50-internal.0.js → Camview.GgjJp7JR.0.0.50-internal.1.js} +1 -1
  11. package/dist/interface/js/{Config.BwflsWTm.0.0.50-internal.0.js → Config.BL3L-BFE.0.0.50-internal.1.js} +2 -2
  12. package/dist/interface/js/{Console.DZM8pN8Q.0.0.50-internal.0.js → Console.CxwRmUVF.0.0.50-internal.1.js} +1 -1
  13. package/dist/interface/js/{CuiConsole.BXXU7Gth.0.0.50-internal.0.js → CuiConsole.D16kkT6R.0.0.50-internal.1.js} +1 -1
  14. package/dist/interface/js/{CuiPluginCard.YFOrpbVD.0.0.50-internal.0.js → CuiPluginCard.Bkp__d8n.0.0.50-internal.1.js} +1 -1
  15. package/dist/interface/js/{CuiTimeline.VV5KSJd5.0.0.50-internal.0.js → CuiTimeline.C9HKvo0G.0.0.50-internal.1.js} +1 -1
  16. package/dist/interface/js/{FirstSteps.b-nvymgb.0.0.50-internal.0.js → FirstSteps.QuJjtAtF.0.0.50-internal.1.js} +1 -1
  17. package/dist/interface/js/{Plugin.BOMpVEwM.0.0.50-internal.0.js → Plugin.BLUUbEej.0.0.50-internal.1.js} +1 -1
  18. package/dist/interface/js/{Plugins.DdPwaUDA.0.0.50-internal.0.js → Plugins.DviCIk7w.0.0.50-internal.1.js} +1 -1
  19. package/dist/interface/js/Recordings.Dsp07cHs.0.0.50-internal.1.js +1 -0
  20. package/dist/interface/js/{Settings.D24ttaPu.0.0.50-internal.0.js → Settings.Clx4y9gP.0.0.50-internal.1.js} +1 -1
  21. package/dist/interface/js/{SettingsAccount.ms3aqz4E.0.0.50-internal.0.js → SettingsAccount.cfY4-PYd.0.0.50-internal.1.js} +1 -1
  22. package/dist/interface/js/SettingsAppearance.CBGZAazb.0.0.50-internal.1.js +1 -0
  23. package/dist/interface/js/{SettingsAppearance.vue_vue_type_script_setup_true_lang.CBQ6lL3T.0.0.50-internal.0.js → SettingsAppearance.vue_vue_type_script_setup_true_lang.kxAPXcBy.0.0.50-internal.1.js} +1 -1
  24. package/dist/interface/js/{SettingsBackup.BPEc4Rjg.0.0.50-internal.0.js → SettingsBackup.DOaJA4pp.0.0.50-internal.1.js} +1 -1
  25. package/dist/interface/js/SettingsRecordings.BGcwL6tk.0.0.50-internal.1.js +1 -0
  26. package/dist/interface/js/{SettingsRemote.BL5nXbUT.0.0.50-internal.0.js → SettingsRemote.BVU_w1Jm.0.0.50-internal.1.js} +1 -1
  27. package/dist/interface/js/{SettingsSystem.D7T0AIpm.0.0.50-internal.0.js → SettingsSystem.P0vy90vA.0.0.50-internal.1.js} +1 -1
  28. package/dist/interface/js/{SettingsUsers.1u0vCOVG.0.0.50-internal.0.js → SettingsUsers.DaP5m7eo.0.0.50-internal.1.js} +1 -1
  29. package/dist/interface/js/{VersionsHandler.vue_vue_type_script_setup_true_lang.xDishkkS.0.0.50-internal.0.js → VersionsHandler.vue_vue_type_script_setup_true_lang.MmrWYW3K.0.0.50-internal.1.js} +1 -1
  30. package/dist/interface/js/{ace-builds.D1nmvCwb.0.0.50-internal.0.js → ace-builds.C0aqA_3x.0.0.50-internal.1.js} +2 -2
  31. package/dist/interface/js/{ace.config.G96T2z54.0.0.50-internal.0.js → ace.config.C9wgzklI.0.0.50-internal.1.js} +1 -1
  32. package/dist/interface/js/{backup.B_Gzxtp_.0.0.50-internal.0.js → backup.BeH6lJ5t.0.0.50-internal.1.js} +1 -1
  33. package/dist/interface/js/{chart.js.CP_nMnnf.0.0.50-internal.0.js → chart.js.BQHSWV_g.0.0.50-internal.1.js} +1 -1
  34. package/dist/interface/js/{close-circle.DYLuVIOg.0.0.50-internal.0.js → close-circle.DDKMxauw.0.0.50-internal.1.js} +1 -1
  35. package/dist/interface/js/{dnd-core.T9OeW7mu.0.0.50-internal.0.js → dnd-core.dWz9rJqH.0.0.50-internal.1.js} +1 -1
  36. package/dist/interface/js/{draggabilly.D3zGcBb3.0.0.50-internal.0.js → draggabilly.D-iZIS1n.0.0.50-internal.1.js} +1 -1
  37. package/dist/interface/js/{engine.io-client.kITRnq-g.0.0.50-internal.0.js → engine.io-client.BwxOddB_.0.0.50-internal.1.js} +1 -1
  38. package/dist/interface/js/{fast-deep-equal.Bpc9mIsj.0.0.50-internal.0.js → fast-deep-equal.Dz96RC_N.0.0.50-internal.1.js} +1 -1
  39. package/dist/interface/js/{highlight.js.BlSXU-Wb.0.0.50-internal.0.js → highlight.js.CmcM8OM6.0.0.50-internal.1.js} +1 -1
  40. package/dist/interface/js/{linkify-it.C3N1lWsJ.0.0.50-internal.0.js → linkify-it.BgLcBzlw.0.0.50-internal.1.js} +1 -1
  41. package/dist/interface/js/{main.D0YR3Jat.0.0.50-internal.0.js → main.6bOgRV7D.0.0.50-internal.1.js} +3 -3
  42. package/dist/interface/js/{markdown-it.Dj0dt5s2.0.0.50-internal.0.js → markdown-it.CTgfs-3p.0.0.50-internal.1.js} +1 -1
  43. package/dist/interface/js/{nprogress.BwQWDcGj.0.0.50-internal.0.js → nprogress.CMhnq8jS.0.0.50-internal.1.js} +1 -1
  44. package/dist/interface/js/{pinia.DRh7plEC.0.0.50-internal.0.js → pinia.CuC5ZfNs.0.0.50-internal.1.js} +1 -1
  45. package/dist/interface/js/{primevue.Cl58krXf.0.0.50-internal.0.js → primevue.DmwjJ4xV.0.0.50-internal.1.js} +1 -1
  46. package/dist/interface/js/{qrcode.C1sDj6P8.0.0.50-internal.0.js → qrcode.DGZO3j1c.0.0.50-internal.1.js} +1 -1
  47. package/dist/interface/js/{react-dnd-touch-backend.BA4WhUJo.0.0.50-internal.0.js → react-dnd-touch-backend.CEGHlD-T.0.0.50-internal.1.js} +1 -1
  48. package/dist/interface/js/{refresh-rounded.D_SmhhUf.0.0.50-internal.0.js → refresh-rounded.D0keXzBc.0.0.50-internal.1.js} +1 -1
  49. package/dist/interface/js/{rxjs.C-fTBwEO.0.0.50-internal.0.js → rxjs.CiDbFOB0.0.0.50-internal.1.js} +1 -1
  50. package/dist/interface/js/{socket.io-client.DKrRxgjP.0.0.50-internal.0.js → socket.io-client.BPcXPAHG.0.0.50-internal.1.js} +1 -1
  51. package/dist/interface/js/{socket.io-parser.EXj3YDH2.0.0.50-internal.0.js → socket.io-parser.DSGzrW_l.0.0.50-internal.1.js} +1 -1
  52. package/dist/interface/js/{system.CY8rGd-Q.0.0.50-internal.0.js → system.BKlEObmx.0.0.50-internal.1.js} +1 -1
  53. package/dist/interface/js/{trash-fill.CMnCN3Oy.0.0.50-internal.0.js → trash-fill.BDFILs86.0.0.50-internal.1.js} +1 -1
  54. package/dist/interface/js/{unidragger.D0w6Tqtt.0.0.50-internal.0.js → unidragger.DcxsxHCS.0.0.50-internal.1.js} +1 -1
  55. package/dist/interface/js/{vee-validate.BeiObIH8.0.0.50-internal.0.js → vee-validate.BGRg3oQ8.0.0.50-internal.1.js} +1 -1
  56. package/dist/interface/js/{vue-chartjs.DtdZdiYw.0.0.50-internal.0.js → vue-chartjs.B9yk2de7.0.0.50-internal.1.js} +1 -1
  57. package/dist/interface/js/{vue-i18n.BW2bx_6z.0.0.50-internal.0.js → vue-i18n.DXDZITpf.0.0.50-internal.1.js} +1 -1
  58. package/dist/interface/js/{vue-inline-svg.BJkQGmKz.0.0.50-internal.0.js → vue-inline-svg.BDYaTfbi.0.0.50-internal.1.js} +1 -1
  59. package/dist/interface/js/{vue-router.B2mOXHaC.0.0.50-internal.0.js → vue-router.CFEDA008.0.0.50-internal.1.js} +1 -1
  60. package/dist/interface/js/{vue-zoomable.BKDyCJE7.0.0.50-internal.0.js → vue-zoomable.zqTafMgD.0.0.50-internal.1.js} +1 -1
  61. package/dist/interface/js/{vue3-dnd.DRK24CBp.0.0.50-internal.0.js → vue3-dnd.BxM3dbYs.0.0.50-internal.1.js} +1 -1
  62. package/dist/interface/js/{zoom-out.DxvzgVEo.0.0.50-internal.0.js → zoom-out.B6SY9IIj.0.0.50-internal.1.js} +1 -1
  63. package/dist/interface/sw.js +1 -1
  64. package/dist/server/package.json +1 -1
  65. package/package.json +1 -1
  66. package/.prettierignore +0 -12
  67. package/.prettierrc.json +0 -12
  68. package/artillery.yaml +0 -29
  69. package/bin/cameraui-server.ts +0 -11
  70. package/dist/interface/js/Cammesh.D-6dAROQ.0.0.50-internal.0.js +0 -1
  71. package/dist/interface/js/Recordings.DhxjIW7e.0.0.50-internal.0.js +0 -1
  72. package/dist/interface/js/SettingsAppearance.DsTjKXk1.0.0.50-internal.0.js +0 -1
  73. package/dist/interface/js/SettingsRecordings.DgW7M0jj.0.0.50-internal.0.js +0 -1
  74. package/eslint.config.js +0 -103
  75. package/localdeps.txt +0 -10
  76. package/mypy.ini +0 -30
  77. package/requirements.txt +0 -15
  78. package/ruff.toml +0 -90
  79. package/src/__init__.py +0 -0
  80. package/src/_camera_ui_tools/__init__.py +0 -0
  81. package/src/_camera_ui_tools/__pycache__/__init__.cpython-311.pyc +0 -0
  82. package/src/api/controllers/api.controller.ts +0 -19
  83. package/src/api/controllers/auth.controller.ts +0 -294
  84. package/src/api/controllers/backup.controller.ts +0 -72
  85. package/src/api/controllers/cameras.controller.ts +0 -1029
  86. package/src/api/controllers/config.controller.ts +0 -102
  87. package/src/api/controllers/files.controller.ts +0 -35
  88. package/src/api/controllers/frameWorkers.controller.ts +0 -109
  89. package/src/api/controllers/plugins.controller.ts +0 -1206
  90. package/src/api/controllers/system.controller.ts +0 -273
  91. package/src/api/controllers/users.controller.ts +0 -648
  92. package/src/api/database/checks.ts +0 -268
  93. package/src/api/database/constants.ts +0 -8
  94. package/src/api/database/index.ts +0 -262
  95. package/src/api/database/migration.ts +0 -62
  96. package/src/api/database/selfcheck.ts +0 -492
  97. package/src/api/database/types.ts +0 -104
  98. package/src/api/go2rtc/api/application.ts +0 -48
  99. package/src/api/go2rtc/api/config.ts +0 -61
  100. package/src/api/go2rtc/api/discover.ts +0 -197
  101. package/src/api/go2rtc/api/index.ts +0 -49
  102. package/src/api/go2rtc/api/snapshot.ts +0 -44
  103. package/src/api/go2rtc/api/streams.ts +0 -168
  104. package/src/api/go2rtc/index.ts +0 -43
  105. package/src/api/go2rtc/queue.ts +0 -50
  106. package/src/api/go2rtc/types.ts +0 -174
  107. package/src/api/index.ts +0 -286
  108. package/src/api/middlewares/authPermission.middleware.ts +0 -46
  109. package/src/api/middlewares/authValidation.middleware.ts +0 -160
  110. package/src/api/middlewares/pagination.middleware.ts +0 -67
  111. package/src/api/middlewares/socketAuth.middleware.ts +0 -136
  112. package/src/api/plugins/header.plugin.ts +0 -15
  113. package/src/api/plugins/logger.plugin.ts +0 -44
  114. package/src/api/plugins/proxy.plugin.ts +0 -255
  115. package/src/api/plugins/socket.plugin.ts +0 -28
  116. package/src/api/plugins/system.plugin.ts +0 -48
  117. package/src/api/plugins/useragent.plugin.ts +0 -19
  118. package/src/api/routes/api.routes.ts +0 -10
  119. package/src/api/routes/auth.routes.ts +0 -56
  120. package/src/api/routes/backup.routes.ts +0 -28
  121. package/src/api/routes/cameras.routes.ts +0 -281
  122. package/src/api/routes/config.routes.ts +0 -66
  123. package/src/api/routes/files.routes.ts +0 -15
  124. package/src/api/routes/frameWorkers.routes.ts +0 -39
  125. package/src/api/routes/index.ts +0 -37
  126. package/src/api/routes/plugins.routes.ts +0 -420
  127. package/src/api/routes/system.routes.ts +0 -101
  128. package/src/api/routes/users.routes.ts +0 -167
  129. package/src/api/schemas/backup.schema.ts +0 -112
  130. package/src/api/schemas/cameras.schema.ts +0 -479
  131. package/src/api/schemas/config.schema.ts +0 -38
  132. package/src/api/schemas/go2rtc.schema.ts +0 -189
  133. package/src/api/schemas/plugins.schema.ts +0 -126
  134. package/src/api/schemas/storage.schema.ts +0 -11
  135. package/src/api/schemas/system.schema.ts +0 -45
  136. package/src/api/schemas/users.schema.ts +0 -185
  137. package/src/api/services/auth.service.ts +0 -210
  138. package/src/api/services/backup.service.ts +0 -144
  139. package/src/api/services/cameras.service.ts +0 -671
  140. package/src/api/services/plugins.service.ts +0 -470
  141. package/src/api/services/system.service.ts +0 -85
  142. package/src/api/services/users.service.ts +0 -276
  143. package/src/api/types/index.ts +0 -675
  144. package/src/api/utils/cert.ts +0 -254
  145. package/src/api/utils/constants.ts +0 -17
  146. package/src/api/utils/fetch.ts +0 -21
  147. package/src/api/utils/moveFiles.ts +0 -45
  148. package/src/api/utils/parse.ts +0 -17
  149. package/src/api/websocket/index.ts +0 -110
  150. package/src/api/websocket/nsp/logs.ts +0 -240
  151. package/src/api/websocket/nsp/main.ts +0 -27
  152. package/src/api/websocket/nsp/metrics.ts +0 -301
  153. package/src/api/websocket/nsp/notifications.ts +0 -43
  154. package/src/api/websocket/nsp/plugins.ts +0 -37
  155. package/src/api/websocket/nsp/server.ts +0 -220
  156. package/src/api/websocket/nsp/status.ts +0 -77
  157. package/src/api/websocket/types.ts +0 -55
  158. package/src/api.ts +0 -163
  159. package/src/camera/classes.ts +0 -32
  160. package/src/camera/controller.ts +0 -579
  161. package/src/camera/device.ts +0 -422
  162. package/src/camera/frameWorker.ts +0 -403
  163. package/src/camera/index.ts +0 -679
  164. package/src/camera/interfaces.ts +0 -95
  165. package/src/camera/iou.ts +0 -153
  166. package/src/camera/polygon.ts +0 -226
  167. package/src/camera/python/__init__.py +0 -0
  168. package/src/camera/python/__pycache__/__init__.cpython-311.pyc +0 -0
  169. package/src/camera/python/__pycache__/classes.cpython-311.pyc +0 -0
  170. package/src/camera/python/__pycache__/delegate_controller.cpython-311.pyc +0 -0
  171. package/src/camera/python/__pycache__/interfaces.cpython-311.pyc +0 -0
  172. package/src/camera/python/__pycache__/iou.cpython-310.pyc +0 -0
  173. package/src/camera/python/__pycache__/iou.cpython-311.pyc +0 -0
  174. package/src/camera/python/__pycache__/iou2.cpython-310.pyc +0 -0
  175. package/src/camera/python/__pycache__/polygon.cpython-311.pyc +0 -0
  176. package/src/camera/python/__pycache__/typings.cpython-311.pyc +0 -0
  177. package/src/camera/python/__pycache__/video_frame.cpython-311.pyc +0 -0
  178. package/src/camera/python/classes.py +0 -41
  179. package/src/camera/python/interfaces.py +0 -130
  180. package/src/camera/python/iou.py +0 -158
  181. package/src/camera/python/polygon.py +0 -230
  182. package/src/camera/python/test/__pycache__/polygon.cpython-310.pyc +0 -0
  183. package/src/camera/python/test/iou_test.py +0 -799
  184. package/src/camera/python/test/polygon.py +0 -238
  185. package/src/camera/python/test/polygon_test.py +0 -256
  186. package/src/camera/python/test/polygon_test2.py +0 -484
  187. package/src/camera/python/typings.py +0 -50
  188. package/src/camera/python/video_frame.py +0 -143
  189. package/src/camera/session.ts +0 -192
  190. package/src/camera/streaming/fmp4-session.ts +0 -390
  191. package/src/camera/streaming/peer-connection.ts +0 -273
  192. package/src/camera/streaming/rtsp-session.ts +0 -331
  193. package/src/camera/streaming/webrtc-connection.ts +0 -260
  194. package/src/camera/streaming/werift-session.ts +0 -317
  195. package/src/camera/test/iou_test.ts +0 -761
  196. package/src/camera/test/polygon.test.ts +0 -611
  197. package/src/camera/test/polygon_test.ts +0 -210
  198. package/src/camera/types.ts +0 -48
  199. package/src/camera/utils.ts +0 -489
  200. package/src/camera/videoFrame.ts +0 -123
  201. package/src/cloud/index.ts +0 -61
  202. package/src/cloud/remote/cloudflare.ts +0 -18
  203. package/src/cloud/remote/upnp.ts +0 -18
  204. package/src/cloud/remote/utils.ts +0 -24
  205. package/src/cloud/types.ts +0 -16
  206. package/src/decoder/child.ts +0 -883
  207. package/src/decoder/imageUtils.ts +0 -275
  208. package/src/decoder/manager.ts +0 -251
  209. package/src/decoder/python/__init__.py +0 -0
  210. package/src/decoder/python/__pycache__/__init__.cpython-311.pyc +0 -0
  211. package/src/decoder/python/__pycache__/image_utils.cpython-311.pyc +0 -0
  212. package/src/decoder/python/__pycache__/typings.cpython-311.pyc +0 -0
  213. package/src/decoder/python/__pycache__/utils.cpython-311.pyc +0 -0
  214. package/src/decoder/python/child.py +0 -903
  215. package/src/decoder/python/image_utils.py +0 -196
  216. package/src/decoder/python/pool.py +0 -45
  217. package/src/decoder/python/test/group.py +0 -62
  218. package/src/decoder/python/test/motion.mp4 +0 -0
  219. package/src/decoder/python/test/motion2.mp4 +0 -0
  220. package/src/decoder/python/test/opencl.cl +0 -70
  221. package/src/decoder/python/test/opencl2.cl +0 -130
  222. package/src/decoder/python/test/test.py +0 -427
  223. package/src/decoder/python/test/test1.jpg +0 -0
  224. package/src/decoder/python/test/test1_resized.jpg +0 -0
  225. package/src/decoder/python/test/test2.jpg +0 -0
  226. package/src/decoder/python/test/test2.py +0 -451
  227. package/src/decoder/python/test/test2_resized.jpg +0 -0
  228. package/src/decoder/python/test/test3.jpg +0 -0
  229. package/src/decoder/python/test/utils.py +0 -50
  230. package/src/decoder/python/typings.py +0 -57
  231. package/src/decoder/python/utils.py +0 -70
  232. package/src/decoder/test/child.ts +0 -117
  233. package/src/decoder/test/ffmpeg.ts +0 -371
  234. package/src/decoder/test/test.ts +0 -182
  235. package/src/decoder/types.ts +0 -27
  236. package/src/decoder/utils.ts +0 -64
  237. package/src/decoder/wasm/asconfig.json +0 -28
  238. package/src/decoder/wasm/assembly/console.ts +0 -1
  239. package/src/decoder/wasm/assembly/index.ts +0 -890
  240. package/src/decoder/wasm/build/decoder.d.ts +0 -43
  241. package/src/decoder/wasm/build/decoder.js +0 -108
  242. package/src/decoder/wasm/build/decoder.wasm +0 -0
  243. package/src/decoder/wasm/tsconfig.json +0 -5
  244. package/src/decoder/worker.ts +0 -113
  245. package/src/go2rtc/index.ts +0 -324
  246. package/src/go2rtc/types.ts +0 -88
  247. package/src/main.ts +0 -267
  248. package/src/manager/coreManager.ts +0 -78
  249. package/src/manager/deviceManager.ts +0 -132
  250. package/src/manager/types.ts +0 -17
  251. package/src/plugins/index.ts +0 -443
  252. package/src/plugins/plugin.ts +0 -177
  253. package/src/plugins/runtime/base.ts +0 -282
  254. package/src/plugins/runtime/index.ts +0 -15
  255. package/src/plugins/runtime/node/child.ts +0 -193
  256. package/src/plugins/runtime/node/index.ts +0 -67
  257. package/src/plugins/runtime/node/plugin.ts +0 -122
  258. package/src/plugins/runtime/node/pluginApi.ts +0 -27
  259. package/src/plugins/runtime/node/proxy/cameraDevice.ts +0 -299
  260. package/src/plugins/runtime/node/proxy/coreManager.ts +0 -128
  261. package/src/plugins/runtime/node/proxy/deviceManager.ts +0 -187
  262. package/src/plugins/runtime/node/storage.ts +0 -312
  263. package/src/plugins/runtime/node/storageController.ts +0 -91
  264. package/src/plugins/runtime/python/__init__.py +0 -0
  265. package/src/plugins/runtime/python/__pycache__/__init__.cpython-311.pyc +0 -0
  266. package/src/plugins/runtime/python/__pycache__/camera_storage.cpython-311.pyc +0 -0
  267. package/src/plugins/runtime/python/__pycache__/config_service.cpython-311.pyc +0 -0
  268. package/src/plugins/runtime/python/__pycache__/constants.cpython-311.pyc +0 -0
  269. package/src/plugins/runtime/python/__pycache__/ipc.cpython-311.pyc +0 -0
  270. package/src/plugins/runtime/python/__pycache__/logger.cpython-311.pyc +0 -0
  271. package/src/plugins/runtime/python/__pycache__/message_queue.cpython-311.pyc +0 -0
  272. package/src/plugins/runtime/python/__pycache__/namespaces.cpython-311.pyc +0 -0
  273. package/src/plugins/runtime/python/__pycache__/plugin.cpython-311.pyc +0 -0
  274. package/src/plugins/runtime/python/__pycache__/plugin_api.cpython-311.pyc +0 -0
  275. package/src/plugins/runtime/python/__pycache__/plugin_logger.cpython-311.pyc +0 -0
  276. package/src/plugins/runtime/python/__pycache__/proxy_utils.cpython-311.pyc +0 -0
  277. package/src/plugins/runtime/python/__pycache__/schema.cpython-311.pyc +0 -0
  278. package/src/plugins/runtime/python/__pycache__/storage.cpython-311.pyc +0 -0
  279. package/src/plugins/runtime/python/__pycache__/storage_controller.cpython-311.pyc +0 -0
  280. package/src/plugins/runtime/python/__pycache__/typings.cpython-311.pyc +0 -0
  281. package/src/plugins/runtime/python/child.py +0 -248
  282. package/src/plugins/runtime/python/index.ts +0 -73
  283. package/src/plugins/runtime/python/namespaces.py +0 -101
  284. package/src/plugins/runtime/python/plugin.py +0 -155
  285. package/src/plugins/runtime/python/plugin_api.py +0 -29
  286. package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-310.pyc +0 -0
  287. package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-311.pyc +0 -0
  288. package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-38.pyc +0 -0
  289. package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-39.pyc +0 -0
  290. package/src/plugins/runtime/python/proxy/__pycache__/constants.cpython-311.pyc +0 -0
  291. package/src/plugins/runtime/python/proxy/__pycache__/constants.cpython-39.pyc +0 -0
  292. package/src/plugins/runtime/python/proxy/__pycache__/core_manager.cpython-311.pyc +0 -0
  293. package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-310.pyc +0 -0
  294. package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-311.pyc +0 -0
  295. package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-38.pyc +0 -0
  296. package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-39.pyc +0 -0
  297. package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-310.pyc +0 -0
  298. package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-311.pyc +0 -0
  299. package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-38.pyc +0 -0
  300. package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-39.pyc +0 -0
  301. package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-310.pyc +0 -0
  302. package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-311.pyc +0 -0
  303. package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-38.pyc +0 -0
  304. package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-39.pyc +0 -0
  305. package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-310.pyc +0 -0
  306. package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-311.pyc +0 -0
  307. package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-38.pyc +0 -0
  308. package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-39.pyc +0 -0
  309. package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-310.pyc +0 -0
  310. package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-311.pyc +0 -0
  311. package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-38.pyc +0 -0
  312. package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-39.pyc +0 -0
  313. package/src/plugins/runtime/python/proxy/camera_device.py +0 -1732
  314. package/src/plugins/runtime/python/proxy/core_manager.py +0 -126
  315. package/src/plugins/runtime/python/proxy/device_manager.py +0 -197
  316. package/src/plugins/runtime/python/schema.py +0 -99
  317. package/src/plugins/runtime/python/storage.py +0 -353
  318. package/src/plugins/runtime/python/storage_controller.py +0 -102
  319. package/src/plugins/runtime/python/typings.py +0 -195
  320. package/src/plugins/schema.ts +0 -472
  321. package/src/plugins/types.ts +0 -60
  322. package/src/plugins/worker.ts +0 -250
  323. package/src/rpc/index.ts +0 -149
  324. package/src/rpc/namespaces.ts +0 -79
  325. package/src/rpc/server.ts +0 -422
  326. package/src/rpc/types.ts +0 -119
  327. package/src/rpc/utils.ts +0 -16
  328. package/src/services/config/constants.ts +0 -47
  329. package/src/services/config/defaults.ts +0 -57
  330. package/src/services/config/index.ts +0 -744
  331. package/src/services/config/types.ts +0 -211
  332. package/src/services/logger/index.ts +0 -96
  333. package/src/types.ts +0 -47
  334. package/src/utils/path.ts +0 -16
  335. package/src/utils/pythonInstaller.ts +0 -597
  336. package/tsconfig.json +0 -37
  337. package/updates.config.js +0 -3
  338. /package/dist/interface/assets/{@xterm.DYP7pi_n.0.0.50-internal.0.css → @xterm.DYP7pi_n.0.0.50-internal.1.css} +0 -0
  339. /package/dist/interface/assets/{Adminpanel.BKek2EMH.0.0.50-internal.0.css → Adminpanel.BKek2EMH.0.0.50-internal.1.css} +0 -0
  340. /package/dist/interface/assets/{Cameras.BDWZJqPN.0.0.50-internal.0.css → Cameras.BDWZJqPN.0.0.50-internal.1.css} +0 -0
  341. /package/dist/interface/assets/{Camview.BFUFMoNX.0.0.50-internal.0.css → Camview.BFUFMoNX.0.0.50-internal.1.css} +0 -0
  342. /package/dist/interface/assets/{CuiConsole.DCYyxdVg.0.0.50-internal.0.css → CuiConsole.DCYyxdVg.0.0.50-internal.1.css} +0 -0
  343. /package/dist/interface/assets/{CuiPluginCard.yF8V0SZY.0.0.50-internal.0.css → CuiPluginCard.yF8V0SZY.0.0.50-internal.1.css} +0 -0
  344. /package/dist/interface/assets/{CuiTimeline.BkIwlYtw.0.0.50-internal.0.css → CuiTimeline.BkIwlYtw.0.0.50-internal.1.css} +0 -0
  345. /package/dist/interface/assets/{Plugin.DJElsAn5.0.0.50-internal.0.css → Plugin.DJElsAn5.0.0.50-internal.1.css} +0 -0
  346. /package/dist/interface/assets/{Plugins.0h77qnmN.0.0.50-internal.0.css → Plugins.0h77qnmN.0.0.50-internal.1.css} +0 -0
  347. /package/dist/interface/assets/{Settings.CkgfRkQr.0.0.50-internal.0.css → Settings.CkgfRkQr.0.0.50-internal.1.css} +0 -0
  348. /package/dist/interface/assets/{SettingsAccount.DeFul3eQ.0.0.50-internal.0.css → SettingsAccount.DeFul3eQ.0.0.50-internal.1.css} +0 -0
  349. /package/dist/interface/assets/{SettingsBackup.CX0rT0QJ.0.0.50-internal.0.css → SettingsBackup.CX0rT0QJ.0.0.50-internal.1.css} +0 -0
  350. /package/dist/interface/assets/{highlight.Ch2EwETz.0.0.50-internal.0.css → highlight.Ch2EwETz.0.0.50-internal.1.css} +0 -0
  351. /package/dist/interface/assets/{logo-256.BCQk9H1-.0.0.50-internal.0.png → logo-256.BCQk9H1-.0.0.50-internal.1.png} +0 -0
  352. /package/dist/interface/assets/{logo-512.DLKVOU2S.0.0.50-internal.0.png → logo-512.DLKVOU2S.0.0.50-internal.1.png} +0 -0
  353. /package/dist/interface/assets/{logo.DmEiRk0z.0.0.50-internal.0.png → logo.DmEiRk0z.0.0.50-internal.1.png} +0 -0
  354. /package/dist/interface/assets/{main.Cip9LkS3.0.0.50-internal.0.css → main.Cip9LkS3.0.0.50-internal.1.css} +0 -0
  355. /package/dist/interface/assets/{mode-json.Br7xisR1.0.0.50-internal.0.js → mode-json.Br7xisR1.0.0.50-internal.1.js} +0 -0
  356. /package/dist/interface/assets/{mode-yaml.CIYL8U3d.0.0.50-internal.0.js → mode-yaml.CIYL8U3d.0.0.50-internal.1.js} +0 -0
  357. /package/dist/interface/assets/{worker-base.jEXLGV2h.0.0.50-internal.0.js → worker-base.jEXLGV2h.0.0.50-internal.1.js} +0 -0
  358. /package/dist/interface/assets/{worker-json.DgwNIOck.0.0.50-internal.0.js → worker-json.DgwNIOck.0.0.50-internal.1.js} +0 -0
  359. /package/dist/interface/assets/{worker-yaml.B3uUYINB.0.0.50-internal.0.js → worker-yaml.B3uUYINB.0.0.50-internal.1.js} +0 -0
  360. /package/dist/interface/js/{@babel.l0sNRNKZ.0.0.50-internal.0.js → @babel.l0sNRNKZ.0.0.50-internal.1.js} +0 -0
  361. /package/dist/interface/js/{@intlify.BkGPX90O.0.0.50-internal.0.js → @intlify.BkGPX90O.0.0.50-internal.1.js} +0 -0
  362. /package/dist/interface/js/{@kurkle.D8fDXNIl.0.0.50-internal.0.js → @kurkle.D8fDXNIl.0.0.50-internal.1.js} +0 -0
  363. /package/dist/interface/js/{@primeuix.BFAY2Bk9.0.0.50-internal.0.js → @primeuix.BFAY2Bk9.0.0.50-internal.1.js} +0 -0
  364. /package/dist/interface/js/{@react-dnd.CcwRs9xb.0.0.50-internal.0.js → @react-dnd.CcwRs9xb.0.0.50-internal.1.js} +0 -0
  365. /package/dist/interface/js/{@socket.io.Dkula2eQ.0.0.50-internal.0.js → @socket.io.Dkula2eQ.0.0.50-internal.1.js} +0 -0
  366. /package/dist/interface/js/{@vue.B5vqhCp2.0.0.50-internal.0.js → @vue.B5vqhCp2.0.0.50-internal.1.js} +0 -0
  367. /package/dist/interface/js/{@xterm.CAa7rpjv.0.0.50-internal.0.js → @xterm.DIUBesyz.0.0.50-internal.1.js} +0 -0
  368. /package/dist/interface/js/{axios.DHr9lByg.0.0.50-internal.0.js → axios.DHr9lByg.0.0.50-internal.1.js} +0 -0
  369. /package/dist/interface/js/{birpc.l0sNRNKZ.0.0.50-internal.0.js → birpc.l0sNRNKZ.0.0.50-internal.1.js} +0 -0
  370. /package/dist/interface/js/{compare-versions.DqEOhma6.0.0.50-internal.0.js → compare-versions.DqEOhma6.0.0.50-internal.1.js} +0 -0
  371. /package/dist/interface/js/{dijkstrajs.C00ieaqj.0.0.50-internal.0.js → dijkstrajs.C00ieaqj.0.0.50-internal.1.js} +0 -0
  372. /package/dist/interface/js/{engine.io-parser.BiEtp6m2.0.0.50-internal.0.js → engine.io-parser.BiEtp6m2.0.0.50-internal.1.js} +0 -0
  373. /package/dist/interface/js/{entities.C20TfXL6.0.0.50-internal.0.js → entities.C20TfXL6.0.0.50-internal.1.js} +0 -0
  374. /package/dist/interface/js/{ev-emitter.X5f1qa-c.0.0.50-internal.0.js → ev-emitter.X5f1qa-c.0.0.50-internal.1.js} +0 -0
  375. /package/dist/interface/js/{get-size.D1dS-IaP.0.0.50-internal.0.js → get-size.D1dS-IaP.0.0.50-internal.1.js} +0 -0
  376. /package/dist/interface/js/{hookable.l0sNRNKZ.0.0.50-internal.0.js → hookable.l0sNRNKZ.0.0.50-internal.1.js} +0 -0
  377. /package/dist/interface/js/{mdurl.k9Sl0PQj.0.0.50-internal.0.js → mdurl.k9Sl0PQj.0.0.50-internal.1.js} +0 -0
  378. /package/dist/interface/js/{perfect-debounce.l0sNRNKZ.0.0.50-internal.0.js → perfect-debounce.l0sNRNKZ.0.0.50-internal.1.js} +0 -0
  379. /package/dist/interface/js/{primelocale.Bga3dOQu.0.0.50-internal.0.js → primelocale.Bga3dOQu.0.0.50-internal.1.js} +0 -0
  380. /package/dist/interface/js/{punycode.js.Dj65hjkv.0.0.50-internal.0.js → punycode.js.Dj65hjkv.0.0.50-internal.1.js} +0 -0
  381. /package/dist/interface/js/{react-dnd-html5-backend.1HQjlkwI.0.0.50-internal.0.js → react-dnd-html5-backend.1HQjlkwI.0.0.50-internal.1.js} +0 -0
  382. /package/dist/interface/js/{redux.BFxtlG_c.0.0.50-internal.0.js → redux.BFxtlG_c.0.0.50-internal.1.js} +0 -0
  383. /package/dist/interface/js/{tslib.9k7AwCpt.0.0.50-internal.0.js → tslib.9k7AwCpt.0.0.50-internal.1.js} +0 -0
  384. /package/dist/interface/js/{uc.micro.kMc2yuuw.0.0.50-internal.0.js → uc.micro.kMc2yuuw.0.0.50-internal.1.js} +0 -0
  385. /package/dist/interface/js/{uuid.C6aID195.0.0.50-internal.0.js → uuid.C6aID195.0.0.50-internal.1.js} +0 -0
  386. /package/dist/interface/js/{vue.l0sNRNKZ.0.0.50-internal.0.js → vue.l0sNRNKZ.0.0.50-internal.1.js} +0 -0
  387. /package/dist/interface/js/{zod.SKKegNRO.0.0.50-internal.0.js → zod.SKKegNRO.0.0.50-internal.1.js} +0 -0
@@ -1,489 +0,0 @@
1
- import {
2
- extractLevelFromProfileLevelId,
3
- extractProfileFromProfileLevelId,
4
- getAudioCodecProperties,
5
- getVideoCodecProperties,
6
- isSameAudioStreamInfo,
7
- isSameVideoStreamInfo,
8
- mapAudioCodecName,
9
- mapVideoCodecName,
10
- normalizeAudioCodecs,
11
- normalizeVideoCodecs,
12
- } from '@camera.ui/common/camera';
13
- import type { AudioStreamInfo, RTPInfo, VideoStreamInfo } from '@camera.ui/types';
14
- import type { Go2RTCProducer } from '../api/go2rtc/types.js';
15
-
16
- export function generateAudioStreamInfo(producers: Go2RTCProducer[]): AudioStreamInfo[] {
17
- const audioStreamInfos: AudioStreamInfo[] = [];
18
-
19
- // Extract SDP info for additional codec details
20
- const sdpInfo = extractSdpInfo(producers);
21
-
22
- // Process all producers and collect audio info from receivers and senders
23
- for (const producer of producers) {
24
- // Track backchannels we've already added to avoid duplicates
25
- const backchannelAdded = new Set<string>();
26
-
27
- // Process receivers (audio streams from the device)
28
- if (producer.receivers?.length) {
29
- for (const receiver of producer.receivers) {
30
- if (receiver.codec?.codec_type === 'audio') {
31
- const audioCodec = mapAudioCodecName(receiver.codec.codec_name);
32
- if (!audioCodec) continue;
33
-
34
- const { codec, ffmpegCodec } = normalizeAudioCodecs(audioCodec);
35
-
36
- // Create RTP info with receiver data
37
- const rtpInfo: RTPInfo = {
38
- codec: receiver.codec.codec_name,
39
- rate: receiver.codec.sample_rate,
40
- encoding: receiver.codec.channels,
41
- };
42
-
43
- // Add SDP info if available
44
- const sdpCodecInfo = sdpInfo.audio[codec];
45
- if (sdpCodecInfo) {
46
- // Update payload if available
47
- if (sdpCodecInfo.clockRate) {
48
- rtpInfo.rate = sdpCodecInfo.clockRate;
49
- }
50
- if (sdpCodecInfo.channels) {
51
- rtpInfo.encoding = sdpCodecInfo.channels;
52
- }
53
- if (sdpCodecInfo.payload) {
54
- rtpInfo.payload = sdpCodecInfo.payload;
55
- }
56
- }
57
-
58
- const properties = getAudioCodecProperties(codec, rtpInfo);
59
-
60
- // Add fmtp parameters from SDP if available
61
- if (sdpCodecInfo?.fmtp && properties.fmtpInfo) {
62
- properties.fmtpInfo.config = sdpCodecInfo.fmtp;
63
- }
64
-
65
- // For MPEG4-GENERIC, add config parameter from SDP if available
66
- if (codec === 'MPEG4-GENERIC' && sdpCodecInfo?.config && properties.fmtpInfo) {
67
- // Füge config-Parameter zum fmtp hinzu, wenn nicht bereits enthalten
68
- if (!properties.fmtpInfo.config.includes('config=')) {
69
- properties.fmtpInfo.config += `;config=${sdpCodecInfo.config}`;
70
- }
71
- }
72
-
73
- const audioStreamInfo: AudioStreamInfo = {
74
- codec,
75
- ffmpegCodec,
76
- properties,
77
- direction: 'sendonly', // From camera's perspective it's sending to us
78
- };
79
-
80
- // Add if unique
81
- if (!audioStreamInfos.some((info) => isSameAudioStreamInfo(info, audioStreamInfo))) {
82
- audioStreamInfos.push(audioStreamInfo);
83
- }
84
- }
85
- }
86
- }
87
-
88
- // Process senders (talkback/microphone to the device)
89
- if (producer.senders?.length) {
90
- for (const sender of producer.senders) {
91
- // Skip ANY codec as it's likely a placeholder, but we'll check medias for more info
92
- if (sender.codec?.codec_type === 'audio' && sender.codec.codec_name !== 'ANY') {
93
- const audioCodec = mapAudioCodecName(sender.codec.codec_name);
94
- if (!audioCodec) continue;
95
-
96
- const { codec, ffmpegCodec } = normalizeAudioCodecs(audioCodec);
97
-
98
- const rtpInfo: RTPInfo = {
99
- codec: sender.codec.codec_name,
100
- rate: sender.codec.sample_rate,
101
- encoding: sender.codec.channels,
102
- };
103
-
104
- const properties = getAudioCodecProperties(codec, rtpInfo);
105
-
106
- const audioStreamInfo: AudioStreamInfo = {
107
- codec,
108
- ffmpegCodec,
109
- properties,
110
- direction: 'recvonly', // From camera's perspective it's receiving from us
111
- };
112
-
113
- // Add if unique
114
- if (!audioStreamInfos.some((info) => isSameAudioStreamInfo(info, audioStreamInfo))) {
115
- audioStreamInfos.push(audioStreamInfo);
116
- // Mark this codec as handled for backchannel
117
- backchannelAdded.add(codec);
118
- }
119
- }
120
- }
121
- }
122
-
123
- // Check medias for backchannel if we have ANY codecs as senders or no codec info
124
- if (producer.medias) {
125
- for (const media of producer.medias) {
126
- if (media.startsWith('audio') && media.includes('sendonly')) {
127
- // This is a backchannel (talkback) from the device's perspective
128
- const parts = media.split(', ');
129
- if (parts.length >= 3) {
130
- const codecInfo = parts[2];
131
- const codecParts = codecInfo.split('/');
132
- const audioCodecStr = codecParts[0];
133
-
134
- const audioCodec = mapAudioCodecName(audioCodecStr);
135
- if (!audioCodec) continue;
136
-
137
- // Skip if we already added this codec as backchannel
138
- if (backchannelAdded.has(audioCodec)) continue;
139
-
140
- const { codec, ffmpegCodec } = normalizeAudioCodecs(audioCodec);
141
-
142
- const rtpInfo: RTPInfo = {
143
- codec: audioCodecStr,
144
- rate: codecParts.length > 1 ? parseInt(codecParts[1]) : undefined,
145
- encoding: codecParts.length > 2 ? parseInt(codecParts[2]) : undefined,
146
- };
147
-
148
- // Add SDP info if available
149
- const sdpCodecInfo = sdpInfo.audio[codec];
150
- if (sdpCodecInfo) {
151
- // Update rate etc if available
152
- if (sdpCodecInfo.clockRate && !rtpInfo.rate) {
153
- rtpInfo.rate = sdpCodecInfo.clockRate;
154
- }
155
- if (sdpCodecInfo.channels && !rtpInfo.encoding) {
156
- rtpInfo.encoding = sdpCodecInfo.channels;
157
- }
158
- if (sdpCodecInfo.payload) {
159
- rtpInfo.payload = sdpCodecInfo.payload;
160
- }
161
- }
162
-
163
- const properties = getAudioCodecProperties(codec, rtpInfo);
164
-
165
- // Add fmtp parameters from SDP if available
166
- if (sdpCodecInfo?.fmtp && properties.fmtpInfo) {
167
- properties.fmtpInfo.config = sdpCodecInfo.fmtp;
168
- }
169
-
170
- const audioStreamInfo: AudioStreamInfo = {
171
- codec,
172
- ffmpegCodec,
173
- properties,
174
- direction: 'recvonly', // From camera's perspective it's receiving from us (talkback)
175
- };
176
-
177
- // Add if unique
178
- if (!audioStreamInfos.some((info) => isSameAudioStreamInfo(info, audioStreamInfo))) {
179
- audioStreamInfos.push(audioStreamInfo);
180
- backchannelAdded.add(codec);
181
- }
182
- }
183
- }
184
- }
185
- }
186
- }
187
-
188
- return audioStreamInfos;
189
- }
190
-
191
- export function generateVideoStreamInfo(producers: Go2RTCProducer[]): VideoStreamInfo[] {
192
- const videoStreamInfos: VideoStreamInfo[] = [];
193
-
194
- // Extract SDP info for additional codec details
195
- const sdpInfo = extractSdpInfo(producers);
196
-
197
- // Process all producers and collect video info from receivers
198
- for (const producer of producers) {
199
- // Process receivers (video streams from the device)
200
- if (producer.receivers?.length) {
201
- for (const receiver of producer.receivers) {
202
- if (receiver.codec?.codec_type === 'video') {
203
- const videoCodec = mapVideoCodecName(receiver.codec.codec_name);
204
- if (!videoCodec) continue;
205
-
206
- const { codec, ffmpegCodec } = normalizeVideoCodecs(videoCodec);
207
-
208
- // Create RTP info
209
- const rtpInfo: RTPInfo = {
210
- codec: receiver.codec.codec_name,
211
- rate: 90000, // Default for video
212
- };
213
-
214
- // Add SDP info if available
215
- const sdpCodecInfo = sdpInfo.video[codec];
216
-
217
- if (sdpCodecInfo) {
218
- // Update payload if available
219
- if (sdpCodecInfo.payload) {
220
- rtpInfo.payload = sdpCodecInfo.payload;
221
- }
222
-
223
- // For H.264/H.265, extract profile and level from profile-level-id
224
- if ((codec === 'H264' || codec === 'H265') && sdpCodecInfo.profileLevelId) {
225
- rtpInfo.profile = extractProfileFromProfileLevelId(sdpCodecInfo.profileLevelId);
226
- rtpInfo.level = extractLevelFromProfileLevelId(sdpCodecInfo.profileLevelId);
227
- } else {
228
- // Fallback to receiver data
229
- if (receiver.codec.profile) {
230
- rtpInfo.profile = receiver.codec.profile;
231
- }
232
- if (receiver.codec.level) {
233
- rtpInfo.level = receiver.codec.level;
234
- }
235
- }
236
- } else {
237
- // Fallback to receiver data
238
- if (receiver.codec.profile) {
239
- rtpInfo.profile = receiver.codec.profile;
240
- }
241
- if (receiver.codec.level) {
242
- rtpInfo.level = receiver.codec.level;
243
- }
244
- }
245
-
246
- const properties = getVideoCodecProperties(codec, rtpInfo);
247
-
248
- // Add fmtp parameters from SDP if available
249
- if (sdpCodecInfo?.fmtp) {
250
- if (!properties.fmtpInfo) {
251
- properties.fmtpInfo = {
252
- payload: rtpInfo.payload ?? properties.payloadType,
253
- config: sdpCodecInfo.fmtp,
254
- };
255
- } else {
256
- properties.fmtpInfo.config = sdpCodecInfo.fmtp;
257
- }
258
- } else if (codec === 'H264' && rtpInfo.profile && rtpInfo.level) {
259
- // For H.264/H.265, add profile-level-id to fmtp if available
260
- const profileLevelId = createProfileLevelId(rtpInfo.profile, rtpInfo.level);
261
- if (profileLevelId) {
262
- if (!properties.fmtpInfo) {
263
- properties.fmtpInfo = {
264
- payload: rtpInfo.payload ?? properties.payloadType,
265
- config: `packetization-mode=1;profile-level-id=${profileLevelId}`,
266
- };
267
- } else {
268
- properties.fmtpInfo.config = `packetization-mode=1;profile-level-id=${profileLevelId}`;
269
- }
270
- }
271
- }
272
-
273
- const videoStreamInfo: VideoStreamInfo = {
274
- codec,
275
- ffmpegCodec,
276
- properties,
277
- direction: 'sendonly', // Video is typically sendonly from camera's perspective
278
- };
279
-
280
- // Add if unique
281
- if (!videoStreamInfos.some((info) => isSameVideoStreamInfo(info, videoStreamInfo))) {
282
- videoStreamInfos.push(videoStreamInfo);
283
- }
284
- }
285
- }
286
- }
287
- }
288
-
289
- // If we couldn't find any video info from receivers, check medias
290
- if (videoStreamInfos.length === 0) {
291
- for (const producer of producers) {
292
- if (producer.medias) {
293
- for (const media of producer.medias) {
294
- if (media.startsWith('video')) {
295
- const parts = media.split(', ');
296
- if (parts.length >= 3) {
297
- const videoCodecStr = parts[2].split('/')[0];
298
-
299
- const videoCodec = mapVideoCodecName(videoCodecStr);
300
- if (!videoCodec) continue;
301
-
302
- const { codec, ffmpegCodec } = normalizeVideoCodecs(videoCodec);
303
-
304
- const rtpInfo: RTPInfo = {
305
- codec: videoCodecStr,
306
- rate: 90000, // Default for video
307
- };
308
-
309
- // Add SDP info if available
310
- const sdpCodecInfo = sdpInfo.video[codec];
311
- if (sdpCodecInfo) {
312
- if (sdpCodecInfo.payload) {
313
- rtpInfo.payload = sdpCodecInfo.payload;
314
- }
315
-
316
- // For H.264/H.265, extract profile and level from profile-level-id
317
- if ((codec === 'H264' || codec === 'H265') && sdpCodecInfo.profileLevelId) {
318
- rtpInfo.profile = extractProfileFromProfileLevelId(sdpCodecInfo.profileLevelId);
319
- rtpInfo.level = extractLevelFromProfileLevelId(sdpCodecInfo.profileLevelId);
320
- }
321
- }
322
-
323
- const properties = getVideoCodecProperties(codec, rtpInfo);
324
-
325
- // Add fmtp parameters from SDP if available
326
- if (sdpCodecInfo?.fmtp) {
327
- if (!properties.fmtpInfo) {
328
- properties.fmtpInfo = {
329
- payload: rtpInfo.payload ?? properties.payloadType,
330
- config: sdpCodecInfo.fmtp,
331
- };
332
- } else {
333
- properties.fmtpInfo.config = sdpCodecInfo.fmtp;
334
- }
335
- }
336
-
337
- const videoStreamInfo: VideoStreamInfo = {
338
- codec,
339
- ffmpegCodec,
340
- properties,
341
- direction: 'sendonly', // Video is typically sendonly from camera's perspective
342
- };
343
-
344
- // Add if unique
345
- if (!videoStreamInfos.some((info) => isSameVideoStreamInfo(info, videoStreamInfo))) {
346
- videoStreamInfos.push(videoStreamInfo);
347
- }
348
- }
349
- }
350
- }
351
- }
352
- }
353
- }
354
-
355
- return videoStreamInfos;
356
- }
357
-
358
- export function extractSdpInfo(producers: Go2RTCProducer[]): {
359
- video: Record<string, Record<string, any>>;
360
- audio: Record<string, Record<string, any>>;
361
- } {
362
- const sdpInfo = {
363
- video: {} as Record<string, Record<string, any>>,
364
- audio: {} as Record<string, Record<string, any>>,
365
- };
366
-
367
- for (const producer of producers) {
368
- if (!producer.sdp) continue;
369
-
370
- const sdpLines = producer.sdp.split(/\r?\n/);
371
- let currentMedia: 'video' | 'audio' | null = null;
372
- let currentCodec = '';
373
-
374
- for (let i = 0; i < sdpLines.length; i++) {
375
- const line = sdpLines[i].trim();
376
-
377
- // Check for media type
378
- if (line.startsWith('m=')) {
379
- const mediaParts = line.split(' ');
380
- if (mediaParts.length >= 4) {
381
- const mediaType = mediaParts[0].substring(2) as 'audio' | 'video';
382
- if (mediaType === 'audio' || mediaType === 'video') {
383
- currentMedia = mediaType;
384
- } else {
385
- currentMedia = null;
386
- }
387
- }
388
- } else if (currentMedia && line.startsWith('a=rtpmap:')) {
389
- // Check for codec information
390
- const rtpMapMatch = /a=rtpmap:(\d+)\s+([^/]+)\/(\d+)(?:\/(\d+))?/.exec(line);
391
- if (rtpMapMatch) {
392
- const payload = parseInt(rtpMapMatch[1], 10);
393
- const codecName = rtpMapMatch[2].toUpperCase();
394
- const clockRate = parseInt(rtpMapMatch[3], 10);
395
- const channels = rtpMapMatch[4] ? parseInt(rtpMapMatch[4], 10) : 1;
396
-
397
- // Initialize codec object if not present
398
- if (!sdpInfo[currentMedia][codecName]) {
399
- sdpInfo[currentMedia][codecName] = {};
400
- }
401
-
402
- sdpInfo[currentMedia][codecName].payload = payload;
403
- sdpInfo[currentMedia][codecName].clockRate = clockRate;
404
-
405
- if (currentMedia === 'audio') {
406
- sdpInfo[currentMedia][codecName].channels = channels;
407
- }
408
-
409
- // Set current codec - we'll use this for subsequent fmtp lines
410
- currentCodec = codecName;
411
- }
412
- } else if (currentMedia && currentCodec && line.startsWith('a=fmtp:')) {
413
- // Check for fmtp information
414
- const fmtpMatch = /a=fmtp:(\d+)\s+(.*)/.exec(line);
415
- if (fmtpMatch) {
416
- const payload = parseInt(fmtpMatch[1], 10);
417
-
418
- // Check if this fmtp line is for the current codec
419
- if (sdpInfo[currentMedia][currentCodec] && sdpInfo[currentMedia][currentCodec].payload === payload) {
420
- const params = fmtpMatch[2];
421
-
422
- // Store fmtp params
423
- sdpInfo[currentMedia][currentCodec].fmtp = params;
424
- sdpInfo[currentMedia][currentCodec].fmtpPayload = payload; // Store payload for reference
425
-
426
- // For H.264/H.265, extract profile-level-id
427
- if ((currentCodec === 'H264' || currentCodec === 'H265') && currentMedia === 'video') {
428
- const paramMap: Record<string, string> = {};
429
- const paramPairs = params.split(';');
430
-
431
- for (const pair of paramPairs) {
432
- const [key, value] = pair.split('=').map((s) => s.trim());
433
- if (key && value) {
434
- paramMap[key] = value;
435
- }
436
- }
437
-
438
- if (paramMap['profile-level-id']) {
439
- sdpInfo[currentMedia][currentCodec].profileLevelId = paramMap['profile-level-id'];
440
- }
441
-
442
- // For H.264/H,265, extract sprop-parameter-sets, sprop-vps, sprop-sps, sprop-pps
443
- ['sprop-parameter-sets', 'sprop-vps', 'sprop-sps', 'sprop-pps'].forEach((param) => {
444
- if (paramMap[param]) {
445
- sdpInfo[currentMedia!][currentCodec][param] = paramMap[param];
446
- }
447
- });
448
- }
449
-
450
- // For MPEG4-GENERIC, extract config
451
- if (currentCodec === 'MPEG4-GENERIC' && currentMedia === 'audio') {
452
- const paramMap: Record<string, string> = {};
453
- const paramPairs = params.split(';');
454
-
455
- for (const pair of paramPairs) {
456
- const [key, value] = pair.split('=').map((s) => s.trim());
457
- if (key && value) {
458
- paramMap[key] = value;
459
- }
460
- }
461
-
462
- if (paramMap.config) {
463
- sdpInfo[currentMedia][currentCodec].config = paramMap.config;
464
- }
465
- }
466
- }
467
- }
468
- }
469
- }
470
- }
471
-
472
- return sdpInfo;
473
- }
474
-
475
- export function createProfileLevelId(profile: string, level: number): string | undefined {
476
- const profileMap: Record<string, string> = {
477
- Baseline: '42',
478
- Main: '4D',
479
- High: '64',
480
- };
481
-
482
- const profileId = profileMap[profile];
483
- if (!profileId) return undefined;
484
-
485
- // Format level as hex, ensure it's 2 digits
486
- const levelHex = level.toString(16).padStart(2, '0');
487
-
488
- return `${profileId}00${levelHex}`;
489
- }
@@ -1,123 +0,0 @@
1
- import sharp from 'sharp';
2
-
3
- import type { ClientInstance } from '@camera.ui/rpc-client';
4
- import type { Promisify, RPCBase } from '@camera.ui/rpc-common';
5
- import type {
6
- DecoderFormat,
7
- FrameBuffer,
8
- FrameData,
9
- FrameImage,
10
- FrameMetadata,
11
- ImageInformation,
12
- ImageOptions,
13
- MotionSetEvent,
14
- VideoFrame as VideoFrameInterface,
15
- } from '@camera.ui/types';
16
- import type { FrameWorkerInterface } from '../decoder/types.js';
17
-
18
- export class VideoFrame implements VideoFrameInterface {
19
- readonly #data: Uint8Array;
20
- readonly #metadata: FrameMetadata;
21
- readonly #info: ImageInformation;
22
- readonly #timestamp: number;
23
- readonly #motion?: MotionSetEvent;
24
-
25
- #subject: string;
26
- #proxy: ClientInstance | RPCBase;
27
-
28
- get data(): Uint8Array {
29
- return this.#data;
30
- }
31
-
32
- get metadata(): FrameMetadata {
33
- return this.#metadata;
34
- }
35
-
36
- get info(): ImageInformation {
37
- return this.#info;
38
- }
39
-
40
- get timestamp(): number {
41
- return this.#timestamp;
42
- }
43
-
44
- get motion(): MotionSetEvent | undefined {
45
- return this.#motion;
46
- }
47
-
48
- get inputWidth(): number {
49
- return this.#metadata.width;
50
- }
51
-
52
- get inputHeight(): number {
53
- return this.#metadata.height;
54
- }
55
-
56
- get inputFormat(): DecoderFormat {
57
- return this.#metadata.format;
58
- }
59
-
60
- constructor(frameData: FrameData, subject: string, proxy: ClientInstance | RPCBase, motion?: MotionSetEvent) {
61
- this.#data = frameData.data;
62
- this.#metadata = frameData.metadata;
63
- this.#info = frameData.info;
64
- this.#timestamp = frameData.timestamp;
65
- this.#motion = motion;
66
- this.#subject = subject;
67
- this.#proxy = proxy;
68
- }
69
-
70
- public async toBuffer(options: ImageOptions = {}): Promise<FrameBuffer> {
71
- let processedFrame: FrameBuffer = {
72
- image: this.data,
73
- info: this.info,
74
- };
75
-
76
- if (Object.keys(options).length > 0) {
77
- options = this.#validateOptions('buffer', options);
78
- const frameWorkerProxy = await this.#frameWorkerProxy();
79
- processedFrame = await frameWorkerProxy.processFrame(this.data, this.inputWidth, this.inputHeight, this.inputFormat, options);
80
- }
81
-
82
- return {
83
- image: Buffer.from(processedFrame.image.buffer, processedFrame.image.byteOffset, processedFrame.image.byteLength),
84
- info: processedFrame.info,
85
- };
86
- }
87
-
88
- public async toImage(options: ImageOptions = {}): Promise<FrameImage> {
89
- let processedFrame: FrameBuffer = {
90
- image: this.data,
91
- info: this.info,
92
- };
93
-
94
- if (Object.keys(options).length > 0) {
95
- options = this.#validateOptions('image', options);
96
- const frameWorkerProxy = await this.#frameWorkerProxy();
97
- processedFrame = await frameWorkerProxy.processFrame(this.data, this.inputWidth, this.inputHeight, this.inputFormat, options);
98
- }
99
-
100
- return {
101
- image: sharp(processedFrame.image, { raw: processedFrame.info as any }),
102
- info: processedFrame.info,
103
- };
104
- }
105
-
106
- public async save(path: string, options: ImageOptions = {}): Promise<void> {
107
- const { image } = await this.toImage(options);
108
- await image.toFile(path);
109
- image.destroy();
110
- }
111
-
112
- async #frameWorkerProxy(): Promise<Promisify<FrameWorkerInterface>> {
113
- return await this.#proxy.createRPCProxy<FrameWorkerInterface>(this.#subject);
114
- }
115
-
116
- #validateOptions(target: 'buffer' | 'image', options: ImageOptions = {}): ImageOptions {
117
- if (!options.format && target === 'image') {
118
- options.format = { to: 'rgb' };
119
- }
120
-
121
- return options;
122
- }
123
- }
@@ -1,61 +0,0 @@
1
- import { container } from 'tsyringe';
2
-
3
- import { CloudflareService } from './remote/cloudflare.js';
4
- import { UPNPService } from './remote/upnp.js';
5
-
6
- import type { Database } from '../api/database/index.js';
7
- import type { ConfigService } from '../services/config/index.js';
8
- import type { LoggerService } from '../services/logger/index.js';
9
-
10
- export class CloudService {
11
- public readonly cloudflare: CloudflareService;
12
- public readonly upnp: UPNPService;
13
-
14
- private dbs: Database;
15
- private logger: LoggerService;
16
- private configService: ConfigService;
17
-
18
- constructor() {
19
- container.registerInstance('cloud', this);
20
-
21
- this.dbs = container.resolve<Database>('dbs');
22
- this.logger = container.resolve<LoggerService>('logger');
23
- this.configService = container.resolve<ConfigService>('configService');
24
-
25
- this.cloudflare = new CloudflareService();
26
- this.upnp = new UPNPService();
27
- }
28
-
29
- public async initialize(): Promise<void> {
30
- const systemConfig = this.dbs.systemDB.get('system');
31
- if (systemConfig) {
32
- const mode = systemConfig.remoteAccess.mode;
33
-
34
- switch (mode) {
35
- case 'disabled':
36
- this.logger.log('Remote access is disabled');
37
- await this.cloudflare.stop();
38
- await this.upnp.stop();
39
- break;
40
- case 'cloudflare':
41
- this.logger.log('Remote access is enabled with Cloudflare');
42
- await this.cloudflare.start();
43
- break;
44
- case 'upnp':
45
- this.logger.log('Remote access is enabled with UPnP');
46
- await this.upnp.start();
47
- break;
48
- case 'port-forward':
49
- case 'router-forward':
50
- this.logger.log('Remote access is enabled with port/router forwarding');
51
- await this.upnp.start();
52
- break;
53
- case 'custom-domain':
54
- this.logger.log('Remote access is enabled with custom domain');
55
- break;
56
- }
57
- }
58
- }
59
-
60
- public async stop(): Promise<void> {}
61
- }
@@ -1,18 +0,0 @@
1
- import { container } from 'tsyringe';
2
-
3
- import type { Database } from '../../api/database/index.js';
4
- import type { SocketService } from '../../api/websocket/index.js';
5
-
6
- export class CloudflareService {
7
- private dbs: Database;
8
- private socketService: SocketService;
9
-
10
- constructor() {
11
- this.dbs = container.resolve<Database>('dbs');
12
- this.socketService = container.resolve<SocketService>('socket');
13
- }
14
-
15
- public async start(): Promise<void> {}
16
-
17
- public async stop(): Promise<void> {}
18
- }