@camera.ui/server 0.0.50-internal.0 → 0.0.50-internal.2
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.
- package/dist/interface/index.html +44 -44
- package/dist/interface/js/{@primevue.OhxoO3MD.0.0.50-internal.0.js → @primevue.BAIU_p3r.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{@tanstack.D1IL6eOv.0.0.50-internal.0.js → @tanstack.mdCorqzE.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{@vee-validate.BGPyWWTh.0.0.50-internal.0.js → @vee-validate.D0vsSsly.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{@vueuse.BsKtqdiG.0.0.50-internal.0.js → @vueuse.we5ZpWr2.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Adminpanel.D93Kvbwp.0.0.50-internal.0.js → Adminpanel.9AEBJ3H1.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Camera.DF2l3OMA.0.0.50-internal.0.js → Camera.CZcnEH0C.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Cameras.YzvZccdv.0.0.50-internal.0.js → Cameras.DE0LkcGu.0.0.50-internal.2.js} +2 -2
- package/dist/interface/js/Cammesh.CVvmkelB.0.0.50-internal.2.js +1 -0
- package/dist/interface/js/{Camview.CB7_HnoQ.0.0.50-internal.0.js → Camview.CUr4pGoU.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Config.BwflsWTm.0.0.50-internal.0.js → Config.CaJhu4fF.0.0.50-internal.2.js} +2 -2
- package/dist/interface/js/{Console.DZM8pN8Q.0.0.50-internal.0.js → Console.5VUmgryj.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{CuiConsole.BXXU7Gth.0.0.50-internal.0.js → CuiConsole.iYmUxAR5.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{CuiPluginCard.YFOrpbVD.0.0.50-internal.0.js → CuiPluginCard.DXPyE5mF.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{CuiTimeline.VV5KSJd5.0.0.50-internal.0.js → CuiTimeline.BqtlOFnV.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{FirstSteps.b-nvymgb.0.0.50-internal.0.js → FirstSteps.C_RI-SDQ.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Plugin.BOMpVEwM.0.0.50-internal.0.js → Plugin.Ch_v02eN.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Plugins.DdPwaUDA.0.0.50-internal.0.js → Plugins.BpXAYgSG.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/Recordings.CIKHJytH.0.0.50-internal.2.js +1 -0
- package/dist/interface/js/{Settings.D24ttaPu.0.0.50-internal.0.js → Settings.BcLoGNEy.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{SettingsAccount.ms3aqz4E.0.0.50-internal.0.js → SettingsAccount.DMROW8kx.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/SettingsAppearance.CUaHpihp.0.0.50-internal.2.js +1 -0
- 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.BuKZ-Uco.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{SettingsBackup.BPEc4Rjg.0.0.50-internal.0.js → SettingsBackup.0QdwFSpv.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/SettingsRecordings.B-aj0U8_.0.0.50-internal.2.js +1 -0
- package/dist/interface/js/{SettingsRemote.BL5nXbUT.0.0.50-internal.0.js → SettingsRemote.Bi1YAJ76.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{SettingsSystem.D7T0AIpm.0.0.50-internal.0.js → SettingsSystem.CAx66Iir.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{SettingsUsers.1u0vCOVG.0.0.50-internal.0.js → SettingsUsers.CQcDtGy1.0.0.50-internal.2.js} +1 -1
- 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.BhXMzIhV.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{ace-builds.D1nmvCwb.0.0.50-internal.0.js → ace-builds.C0sCXSu5.0.0.50-internal.2.js} +2 -2
- package/dist/interface/js/{ace.config.G96T2z54.0.0.50-internal.0.js → ace.config.DNqPWa0Q.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{backup.B_Gzxtp_.0.0.50-internal.0.js → backup.DAXgG3bP.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{chart.js.CP_nMnnf.0.0.50-internal.0.js → chart.js.Bq3YocRX.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{close-circle.DYLuVIOg.0.0.50-internal.0.js → close-circle.9rxyNw0z.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{dnd-core.T9OeW7mu.0.0.50-internal.0.js → dnd-core.BuEvHAsS.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{draggabilly.D3zGcBb3.0.0.50-internal.0.js → draggabilly.DUdE08x8.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{engine.io-client.kITRnq-g.0.0.50-internal.0.js → engine.io-client.DWU6YI8o.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{fast-deep-equal.Bpc9mIsj.0.0.50-internal.0.js → fast-deep-equal.BpPyC6E4.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{highlight.js.BlSXU-Wb.0.0.50-internal.0.js → highlight.js.BoR2Rhdd.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{linkify-it.C3N1lWsJ.0.0.50-internal.0.js → linkify-it.BXzPONHs.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{main.D0YR3Jat.0.0.50-internal.0.js → main.DwcBYfWc.0.0.50-internal.2.js} +3 -3
- package/dist/interface/js/{markdown-it.Dj0dt5s2.0.0.50-internal.0.js → markdown-it.BUDVOjPt.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{nprogress.BwQWDcGj.0.0.50-internal.0.js → nprogress.CsG-OBoI.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{pinia.DRh7plEC.0.0.50-internal.0.js → pinia.CqEQao5R.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{primevue.Cl58krXf.0.0.50-internal.0.js → primevue.D91sslRx.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{qrcode.C1sDj6P8.0.0.50-internal.0.js → qrcode.SdSTPzZO.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{react-dnd-touch-backend.BA4WhUJo.0.0.50-internal.0.js → react-dnd-touch-backend.BwroebQ4.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{refresh-rounded.D_SmhhUf.0.0.50-internal.0.js → refresh-rounded.DxM48YSv.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{rxjs.C-fTBwEO.0.0.50-internal.0.js → rxjs.Cmpbnzo4.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{socket.io-client.DKrRxgjP.0.0.50-internal.0.js → socket.io-client.DF2YgZo1.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{socket.io-parser.EXj3YDH2.0.0.50-internal.0.js → socket.io-parser.BUs2ineY.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{system.CY8rGd-Q.0.0.50-internal.0.js → system.DmkT2LKx.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{trash-fill.CMnCN3Oy.0.0.50-internal.0.js → trash-fill.dPzyZDVa.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{unidragger.D0w6Tqtt.0.0.50-internal.0.js → unidragger.y2ZlFveS.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vee-validate.BeiObIH8.0.0.50-internal.0.js → vee-validate.Y-alCADW.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-chartjs.DtdZdiYw.0.0.50-internal.0.js → vue-chartjs.sRVFTqDf.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-i18n.BW2bx_6z.0.0.50-internal.0.js → vue-i18n.D5WrXOZa.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-inline-svg.BJkQGmKz.0.0.50-internal.0.js → vue-inline-svg.R0uz_abA.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-router.B2mOXHaC.0.0.50-internal.0.js → vue-router.65mnGy-o.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-zoomable.BKDyCJE7.0.0.50-internal.0.js → vue-zoomable.B1Qop6Uu.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue3-dnd.DRK24CBp.0.0.50-internal.0.js → vue3-dnd.CwmyAcir.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{zoom-out.DxvzgVEo.0.0.50-internal.0.js → zoom-out.CMPALvRh.0.0.50-internal.2.js} +1 -1
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +1 -1
- package/dist/server/src/rpc/server.js +4 -1
- package/dist/server/src/rpc/server.js.map +1 -1
- package/package.json +1 -1
- package/.prettierignore +0 -12
- package/.prettierrc.json +0 -12
- package/artillery.yaml +0 -29
- package/bin/cameraui-server.ts +0 -11
- package/dist/interface/js/Cammesh.D-6dAROQ.0.0.50-internal.0.js +0 -1
- package/dist/interface/js/Recordings.DhxjIW7e.0.0.50-internal.0.js +0 -1
- package/dist/interface/js/SettingsAppearance.DsTjKXk1.0.0.50-internal.0.js +0 -1
- package/dist/interface/js/SettingsRecordings.DgW7M0jj.0.0.50-internal.0.js +0 -1
- package/eslint.config.js +0 -103
- package/localdeps.txt +0 -10
- package/mypy.ini +0 -30
- package/requirements.txt +0 -15
- package/ruff.toml +0 -90
- package/src/__init__.py +0 -0
- package/src/_camera_ui_tools/__init__.py +0 -0
- package/src/_camera_ui_tools/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/api/controllers/api.controller.ts +0 -19
- package/src/api/controllers/auth.controller.ts +0 -294
- package/src/api/controllers/backup.controller.ts +0 -72
- package/src/api/controllers/cameras.controller.ts +0 -1029
- package/src/api/controllers/config.controller.ts +0 -102
- package/src/api/controllers/files.controller.ts +0 -35
- package/src/api/controllers/frameWorkers.controller.ts +0 -109
- package/src/api/controllers/plugins.controller.ts +0 -1206
- package/src/api/controllers/system.controller.ts +0 -273
- package/src/api/controllers/users.controller.ts +0 -648
- package/src/api/database/checks.ts +0 -268
- package/src/api/database/constants.ts +0 -8
- package/src/api/database/index.ts +0 -262
- package/src/api/database/migration.ts +0 -62
- package/src/api/database/selfcheck.ts +0 -492
- package/src/api/database/types.ts +0 -104
- package/src/api/go2rtc/api/application.ts +0 -48
- package/src/api/go2rtc/api/config.ts +0 -61
- package/src/api/go2rtc/api/discover.ts +0 -197
- package/src/api/go2rtc/api/index.ts +0 -49
- package/src/api/go2rtc/api/snapshot.ts +0 -44
- package/src/api/go2rtc/api/streams.ts +0 -168
- package/src/api/go2rtc/index.ts +0 -43
- package/src/api/go2rtc/queue.ts +0 -50
- package/src/api/go2rtc/types.ts +0 -174
- package/src/api/index.ts +0 -286
- package/src/api/middlewares/authPermission.middleware.ts +0 -46
- package/src/api/middlewares/authValidation.middleware.ts +0 -160
- package/src/api/middlewares/pagination.middleware.ts +0 -67
- package/src/api/middlewares/socketAuth.middleware.ts +0 -136
- package/src/api/plugins/header.plugin.ts +0 -15
- package/src/api/plugins/logger.plugin.ts +0 -44
- package/src/api/plugins/proxy.plugin.ts +0 -255
- package/src/api/plugins/socket.plugin.ts +0 -28
- package/src/api/plugins/system.plugin.ts +0 -48
- package/src/api/plugins/useragent.plugin.ts +0 -19
- package/src/api/routes/api.routes.ts +0 -10
- package/src/api/routes/auth.routes.ts +0 -56
- package/src/api/routes/backup.routes.ts +0 -28
- package/src/api/routes/cameras.routes.ts +0 -281
- package/src/api/routes/config.routes.ts +0 -66
- package/src/api/routes/files.routes.ts +0 -15
- package/src/api/routes/frameWorkers.routes.ts +0 -39
- package/src/api/routes/index.ts +0 -37
- package/src/api/routes/plugins.routes.ts +0 -420
- package/src/api/routes/system.routes.ts +0 -101
- package/src/api/routes/users.routes.ts +0 -167
- package/src/api/schemas/backup.schema.ts +0 -112
- package/src/api/schemas/cameras.schema.ts +0 -479
- package/src/api/schemas/config.schema.ts +0 -38
- package/src/api/schemas/go2rtc.schema.ts +0 -189
- package/src/api/schemas/plugins.schema.ts +0 -126
- package/src/api/schemas/storage.schema.ts +0 -11
- package/src/api/schemas/system.schema.ts +0 -45
- package/src/api/schemas/users.schema.ts +0 -185
- package/src/api/services/auth.service.ts +0 -210
- package/src/api/services/backup.service.ts +0 -144
- package/src/api/services/cameras.service.ts +0 -671
- package/src/api/services/plugins.service.ts +0 -470
- package/src/api/services/system.service.ts +0 -85
- package/src/api/services/users.service.ts +0 -276
- package/src/api/types/index.ts +0 -675
- package/src/api/utils/cert.ts +0 -254
- package/src/api/utils/constants.ts +0 -17
- package/src/api/utils/fetch.ts +0 -21
- package/src/api/utils/moveFiles.ts +0 -45
- package/src/api/utils/parse.ts +0 -17
- package/src/api/websocket/index.ts +0 -110
- package/src/api/websocket/nsp/logs.ts +0 -240
- package/src/api/websocket/nsp/main.ts +0 -27
- package/src/api/websocket/nsp/metrics.ts +0 -301
- package/src/api/websocket/nsp/notifications.ts +0 -43
- package/src/api/websocket/nsp/plugins.ts +0 -37
- package/src/api/websocket/nsp/server.ts +0 -220
- package/src/api/websocket/nsp/status.ts +0 -77
- package/src/api/websocket/types.ts +0 -55
- package/src/api.ts +0 -163
- package/src/camera/classes.ts +0 -32
- package/src/camera/controller.ts +0 -579
- package/src/camera/device.ts +0 -422
- package/src/camera/frameWorker.ts +0 -403
- package/src/camera/index.ts +0 -679
- package/src/camera/interfaces.ts +0 -95
- package/src/camera/iou.ts +0 -153
- package/src/camera/polygon.ts +0 -226
- package/src/camera/python/__init__.py +0 -0
- package/src/camera/python/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/classes.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/delegate_controller.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/interfaces.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/iou.cpython-310.pyc +0 -0
- package/src/camera/python/__pycache__/iou.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/iou2.cpython-310.pyc +0 -0
- package/src/camera/python/__pycache__/polygon.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/typings.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/video_frame.cpython-311.pyc +0 -0
- package/src/camera/python/classes.py +0 -41
- package/src/camera/python/interfaces.py +0 -130
- package/src/camera/python/iou.py +0 -158
- package/src/camera/python/polygon.py +0 -230
- package/src/camera/python/test/__pycache__/polygon.cpython-310.pyc +0 -0
- package/src/camera/python/test/iou_test.py +0 -799
- package/src/camera/python/test/polygon.py +0 -238
- package/src/camera/python/test/polygon_test.py +0 -256
- package/src/camera/python/test/polygon_test2.py +0 -484
- package/src/camera/python/typings.py +0 -50
- package/src/camera/python/video_frame.py +0 -143
- package/src/camera/session.ts +0 -192
- package/src/camera/streaming/fmp4-session.ts +0 -390
- package/src/camera/streaming/peer-connection.ts +0 -273
- package/src/camera/streaming/rtsp-session.ts +0 -331
- package/src/camera/streaming/webrtc-connection.ts +0 -260
- package/src/camera/streaming/werift-session.ts +0 -317
- package/src/camera/test/iou_test.ts +0 -761
- package/src/camera/test/polygon.test.ts +0 -611
- package/src/camera/test/polygon_test.ts +0 -210
- package/src/camera/types.ts +0 -48
- package/src/camera/utils.ts +0 -489
- package/src/camera/videoFrame.ts +0 -123
- package/src/cloud/index.ts +0 -61
- package/src/cloud/remote/cloudflare.ts +0 -18
- package/src/cloud/remote/upnp.ts +0 -18
- package/src/cloud/remote/utils.ts +0 -24
- package/src/cloud/types.ts +0 -16
- package/src/decoder/child.ts +0 -883
- package/src/decoder/imageUtils.ts +0 -275
- package/src/decoder/manager.ts +0 -251
- package/src/decoder/python/__init__.py +0 -0
- package/src/decoder/python/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/decoder/python/__pycache__/image_utils.cpython-311.pyc +0 -0
- package/src/decoder/python/__pycache__/typings.cpython-311.pyc +0 -0
- package/src/decoder/python/__pycache__/utils.cpython-311.pyc +0 -0
- package/src/decoder/python/child.py +0 -903
- package/src/decoder/python/image_utils.py +0 -196
- package/src/decoder/python/pool.py +0 -45
- package/src/decoder/python/test/group.py +0 -62
- package/src/decoder/python/test/motion.mp4 +0 -0
- package/src/decoder/python/test/motion2.mp4 +0 -0
- package/src/decoder/python/test/opencl.cl +0 -70
- package/src/decoder/python/test/opencl2.cl +0 -130
- package/src/decoder/python/test/test.py +0 -427
- package/src/decoder/python/test/test1.jpg +0 -0
- package/src/decoder/python/test/test1_resized.jpg +0 -0
- package/src/decoder/python/test/test2.jpg +0 -0
- package/src/decoder/python/test/test2.py +0 -451
- package/src/decoder/python/test/test2_resized.jpg +0 -0
- package/src/decoder/python/test/test3.jpg +0 -0
- package/src/decoder/python/test/utils.py +0 -50
- package/src/decoder/python/typings.py +0 -57
- package/src/decoder/python/utils.py +0 -70
- package/src/decoder/test/child.ts +0 -117
- package/src/decoder/test/ffmpeg.ts +0 -371
- package/src/decoder/test/test.ts +0 -182
- package/src/decoder/types.ts +0 -27
- package/src/decoder/utils.ts +0 -64
- package/src/decoder/wasm/asconfig.json +0 -28
- package/src/decoder/wasm/assembly/console.ts +0 -1
- package/src/decoder/wasm/assembly/index.ts +0 -890
- package/src/decoder/wasm/build/decoder.d.ts +0 -43
- package/src/decoder/wasm/build/decoder.js +0 -108
- package/src/decoder/wasm/build/decoder.wasm +0 -0
- package/src/decoder/wasm/tsconfig.json +0 -5
- package/src/decoder/worker.ts +0 -113
- package/src/go2rtc/index.ts +0 -324
- package/src/go2rtc/types.ts +0 -88
- package/src/main.ts +0 -267
- package/src/manager/coreManager.ts +0 -78
- package/src/manager/deviceManager.ts +0 -132
- package/src/manager/types.ts +0 -17
- package/src/plugins/index.ts +0 -443
- package/src/plugins/plugin.ts +0 -177
- package/src/plugins/runtime/base.ts +0 -282
- package/src/plugins/runtime/index.ts +0 -15
- package/src/plugins/runtime/node/child.ts +0 -193
- package/src/plugins/runtime/node/index.ts +0 -67
- package/src/plugins/runtime/node/plugin.ts +0 -122
- package/src/plugins/runtime/node/pluginApi.ts +0 -27
- package/src/plugins/runtime/node/proxy/cameraDevice.ts +0 -299
- package/src/plugins/runtime/node/proxy/coreManager.ts +0 -128
- package/src/plugins/runtime/node/proxy/deviceManager.ts +0 -187
- package/src/plugins/runtime/node/storage.ts +0 -312
- package/src/plugins/runtime/node/storageController.ts +0 -91
- package/src/plugins/runtime/python/__init__.py +0 -0
- package/src/plugins/runtime/python/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/camera_storage.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/config_service.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/constants.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/ipc.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/logger.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/message_queue.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/namespaces.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/plugin.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/plugin_api.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/plugin_logger.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/proxy_utils.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/schema.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/storage.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/storage_controller.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/typings.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/child.py +0 -248
- package/src/plugins/runtime/python/index.ts +0 -73
- package/src/plugins/runtime/python/namespaces.py +0 -101
- package/src/plugins/runtime/python/plugin.py +0 -155
- package/src/plugins/runtime/python/plugin_api.py +0 -29
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/constants.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/constants.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/core_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/camera_device.py +0 -1732
- package/src/plugins/runtime/python/proxy/core_manager.py +0 -126
- package/src/plugins/runtime/python/proxy/device_manager.py +0 -197
- package/src/plugins/runtime/python/schema.py +0 -99
- package/src/plugins/runtime/python/storage.py +0 -353
- package/src/plugins/runtime/python/storage_controller.py +0 -102
- package/src/plugins/runtime/python/typings.py +0 -195
- package/src/plugins/schema.ts +0 -472
- package/src/plugins/types.ts +0 -60
- package/src/plugins/worker.ts +0 -250
- package/src/rpc/index.ts +0 -149
- package/src/rpc/namespaces.ts +0 -79
- package/src/rpc/server.ts +0 -422
- package/src/rpc/types.ts +0 -119
- package/src/rpc/utils.ts +0 -16
- package/src/services/config/constants.ts +0 -47
- package/src/services/config/defaults.ts +0 -57
- package/src/services/config/index.ts +0 -744
- package/src/services/config/types.ts +0 -211
- package/src/services/logger/index.ts +0 -96
- package/src/types.ts +0 -47
- package/src/utils/path.ts +0 -16
- package/src/utils/pythonInstaller.ts +0 -597
- package/tsconfig.json +0 -37
- package/types/fastify.d.ts +0 -14
- package/updates.config.js +0 -3
- /package/dist/interface/assets/{@xterm.DYP7pi_n.0.0.50-internal.0.css → @xterm.DYP7pi_n.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Adminpanel.BKek2EMH.0.0.50-internal.0.css → Adminpanel.BKek2EMH.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Cameras.BDWZJqPN.0.0.50-internal.0.css → Cameras.BDWZJqPN.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Camview.BFUFMoNX.0.0.50-internal.0.css → Camview.BFUFMoNX.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{CuiConsole.DCYyxdVg.0.0.50-internal.0.css → CuiConsole.DCYyxdVg.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{CuiPluginCard.yF8V0SZY.0.0.50-internal.0.css → CuiPluginCard.yF8V0SZY.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{CuiTimeline.BkIwlYtw.0.0.50-internal.0.css → CuiTimeline.BkIwlYtw.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Plugin.DJElsAn5.0.0.50-internal.0.css → Plugin.DJElsAn5.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Plugins.0h77qnmN.0.0.50-internal.0.css → Plugins.0h77qnmN.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Settings.CkgfRkQr.0.0.50-internal.0.css → Settings.CkgfRkQr.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{SettingsAccount.DeFul3eQ.0.0.50-internal.0.css → SettingsAccount.DeFul3eQ.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{SettingsBackup.CX0rT0QJ.0.0.50-internal.0.css → SettingsBackup.CX0rT0QJ.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{highlight.Ch2EwETz.0.0.50-internal.0.css → highlight.Ch2EwETz.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{logo-256.BCQk9H1-.0.0.50-internal.0.png → logo-256.BCQk9H1-.0.0.50-internal.2.png} +0 -0
- /package/dist/interface/assets/{logo-512.DLKVOU2S.0.0.50-internal.0.png → logo-512.DLKVOU2S.0.0.50-internal.2.png} +0 -0
- /package/dist/interface/assets/{logo.DmEiRk0z.0.0.50-internal.0.png → logo.DmEiRk0z.0.0.50-internal.2.png} +0 -0
- /package/dist/interface/assets/{main.Cip9LkS3.0.0.50-internal.0.css → main.Cip9LkS3.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{mode-json.Br7xisR1.0.0.50-internal.0.js → mode-json.Br7xisR1.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/assets/{mode-yaml.CIYL8U3d.0.0.50-internal.0.js → mode-yaml.CIYL8U3d.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/assets/{worker-base.jEXLGV2h.0.0.50-internal.0.js → worker-base.jEXLGV2h.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/assets/{worker-json.DgwNIOck.0.0.50-internal.0.js → worker-json.DgwNIOck.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/assets/{worker-yaml.B3uUYINB.0.0.50-internal.0.js → worker-yaml.B3uUYINB.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@babel.l0sNRNKZ.0.0.50-internal.0.js → @babel.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@intlify.BkGPX90O.0.0.50-internal.0.js → @intlify.BkGPX90O.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@kurkle.D8fDXNIl.0.0.50-internal.0.js → @kurkle.D8fDXNIl.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@primeuix.BFAY2Bk9.0.0.50-internal.0.js → @primeuix.BFAY2Bk9.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@react-dnd.CcwRs9xb.0.0.50-internal.0.js → @react-dnd.CcwRs9xb.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@socket.io.Dkula2eQ.0.0.50-internal.0.js → @socket.io.Dkula2eQ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@vue.B5vqhCp2.0.0.50-internal.0.js → @vue.B5vqhCp2.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@xterm.CAa7rpjv.0.0.50-internal.0.js → @xterm.C-5Lxnx_.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{axios.DHr9lByg.0.0.50-internal.0.js → axios.DHr9lByg.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{birpc.l0sNRNKZ.0.0.50-internal.0.js → birpc.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{compare-versions.DqEOhma6.0.0.50-internal.0.js → compare-versions.DqEOhma6.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{dijkstrajs.C00ieaqj.0.0.50-internal.0.js → dijkstrajs.C00ieaqj.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{engine.io-parser.BiEtp6m2.0.0.50-internal.0.js → engine.io-parser.BiEtp6m2.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{entities.C20TfXL6.0.0.50-internal.0.js → entities.C20TfXL6.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{ev-emitter.X5f1qa-c.0.0.50-internal.0.js → ev-emitter.X5f1qa-c.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{get-size.D1dS-IaP.0.0.50-internal.0.js → get-size.D1dS-IaP.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{hookable.l0sNRNKZ.0.0.50-internal.0.js → hookable.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{mdurl.k9Sl0PQj.0.0.50-internal.0.js → mdurl.k9Sl0PQj.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{perfect-debounce.l0sNRNKZ.0.0.50-internal.0.js → perfect-debounce.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{primelocale.Bga3dOQu.0.0.50-internal.0.js → primelocale.Bga3dOQu.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{punycode.js.Dj65hjkv.0.0.50-internal.0.js → punycode.js.Dj65hjkv.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{react-dnd-html5-backend.1HQjlkwI.0.0.50-internal.0.js → react-dnd-html5-backend.1HQjlkwI.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{redux.BFxtlG_c.0.0.50-internal.0.js → redux.BFxtlG_c.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{tslib.9k7AwCpt.0.0.50-internal.0.js → tslib.9k7AwCpt.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{uc.micro.kMc2yuuw.0.0.50-internal.0.js → uc.micro.kMc2yuuw.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{uuid.C6aID195.0.0.50-internal.0.js → uuid.C6aID195.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{vue.l0sNRNKZ.0.0.50-internal.0.js → vue.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{zod.SKKegNRO.0.0.50-internal.0.js → zod.SKKegNRO.0.0.50-internal.2.js} +0 -0
package/src/camera/interfaces.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { rpc } from '@camera.ui/rpc-common';
|
|
2
|
-
import { CameraDeviceCapability } from '@camera.ui/types';
|
|
3
|
-
|
|
4
|
-
import { NamespaceManager } from '../rpc/namespaces.js';
|
|
5
|
-
|
|
6
|
-
import type { Promisify, RPCConnection } from '@camera.ui/rpc-common';
|
|
7
|
-
import type { PTZCommand, PTZInterface, SnapshotInterface, StreamingInterface } from '@camera.ui/types';
|
|
8
|
-
import type { BehaviorSubject } from 'rxjs';
|
|
9
|
-
import type { CameraInterfaces, PluginCapabilities } from './types.js';
|
|
10
|
-
|
|
11
|
-
interface ProxyInstance {
|
|
12
|
-
createRPCConnection(namespace: string): Promise<RPCConnection>;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export class CameraInterface implements CameraInterfaces {
|
|
16
|
-
public interfaces?: PTZInterface | SnapshotInterface | StreamingInterface;
|
|
17
|
-
|
|
18
|
-
#proxy: ProxyInstance;
|
|
19
|
-
#capabilities: BehaviorSubject<PluginCapabilities[]>;
|
|
20
|
-
#cameraId: string;
|
|
21
|
-
#pluginId?: string;
|
|
22
|
-
#rpcConnections: { namespace: string; connection: RPCConnection }[] = [];
|
|
23
|
-
|
|
24
|
-
constructor(proxy: ProxyInstance, capabilities: BehaviorSubject<PluginCapabilities[]>, cameraId: string, pluginId?: string) {
|
|
25
|
-
this.#proxy = proxy;
|
|
26
|
-
this.#capabilities = capabilities;
|
|
27
|
-
this.#cameraId = cameraId;
|
|
28
|
-
this.#pluginId = pluginId;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@rpc({ public: true })
|
|
32
|
-
public async streamUrl(sourceName: string): Promise<string> {
|
|
33
|
-
const capability = this.#capabilities.getValue().find((cap) => cap.capabilities.some((c) => c === CameraDeviceCapability.StreamUrl));
|
|
34
|
-
if (!capability) {
|
|
35
|
-
throw new Error('No capability found for streamUrl');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (this.interfaces && 'streamUrl' in this.interfaces) {
|
|
39
|
-
return this.interfaces.streamUrl(sourceName);
|
|
40
|
-
} else {
|
|
41
|
-
const cameraProxy = await this.#cameraProxy(capability.pluginId);
|
|
42
|
-
return cameraProxy.streamUrl(sourceName);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@rpc({ public: true })
|
|
47
|
-
public async snapshot(sourceId: string, forceNew?: boolean): Promise<ArrayBuffer | undefined> {
|
|
48
|
-
const capability = this.#capabilities.getValue().find((cap) => cap.capabilities.some((c) => c === CameraDeviceCapability.Snapshot));
|
|
49
|
-
if (!capability) {
|
|
50
|
-
throw new Error('No capability found for snapshot');
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (this.interfaces && 'snapshot' in this.interfaces) {
|
|
54
|
-
return this.interfaces.snapshot(sourceId, forceNew);
|
|
55
|
-
} else {
|
|
56
|
-
const cameraProxy = await this.#cameraProxy(capability.pluginId);
|
|
57
|
-
return cameraProxy.snapshot(sourceId, forceNew);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@rpc({ public: true })
|
|
62
|
-
public async ptzCommand(command: PTZCommand): Promise<void> {
|
|
63
|
-
const capability = this.#capabilities.getValue().find((cap) => cap.capabilities.some((c) => c === CameraDeviceCapability.PTZ));
|
|
64
|
-
if (!capability) {
|
|
65
|
-
throw new Error('No capability found for PTZ');
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (this.interfaces && 'ptzCommand' in this.interfaces) {
|
|
69
|
-
return this.interfaces.ptzCommand(command);
|
|
70
|
-
} else {
|
|
71
|
-
const cameraProxy = await this.#cameraProxy(capability.pluginId);
|
|
72
|
-
return cameraProxy.ptzCommand(command);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
public async disconnect(): Promise<void> {
|
|
77
|
-
await Promise.allSettled(this.#rpcConnections.map((rpc) => rpc.connection.disconnect()));
|
|
78
|
-
this.#rpcConnections = [];
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async #cameraProxy(pluginId: string): Promise<Promisify<CameraInterfaces>> {
|
|
82
|
-
if (pluginId === this.#pluginId) {
|
|
83
|
-
throw new Error('Can not create camera proxy for the same plugin');
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const namespace = NamespaceManager.pluginCameraNamespaces(pluginId, this.#cameraId).cameraInterfacesRpc;
|
|
87
|
-
const rpcConnection = await this.#proxy.createRPCConnection(namespace);
|
|
88
|
-
|
|
89
|
-
if (!this.#rpcConnections.some((rpc) => rpc.namespace === namespace)) {
|
|
90
|
-
this.#rpcConnections.push({ namespace, connection: rpcConnection });
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
return rpcConnection.createProxy<CameraInterfaces>();
|
|
94
|
-
}
|
|
95
|
-
}
|
package/src/camera/iou.ts
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import type { BoundingBox, Detection } from '@camera.ui/types';
|
|
2
|
-
|
|
3
|
-
// Simple spatial index using grid-based bucketing
|
|
4
|
-
class SpatialIndex {
|
|
5
|
-
private cells = new Map<string, Detection[]>();
|
|
6
|
-
private cellSize: number;
|
|
7
|
-
|
|
8
|
-
constructor(cellSize = 100) {
|
|
9
|
-
this.cellSize = cellSize;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
private getCellsForBox(box: BoundingBox, margin = 0): string[] {
|
|
13
|
-
const minCellX = Math.floor((box[0] - margin) / this.cellSize);
|
|
14
|
-
const minCellY = Math.floor((box[1] - margin) / this.cellSize);
|
|
15
|
-
const maxCellX = Math.floor((box[2] + margin) / this.cellSize);
|
|
16
|
-
const maxCellY = Math.floor((box[3] + margin) / this.cellSize);
|
|
17
|
-
|
|
18
|
-
const cells: string[] = [];
|
|
19
|
-
for (let x = minCellX; x <= maxCellX; x++) {
|
|
20
|
-
for (let y = minCellY; y <= maxCellY; y++) {
|
|
21
|
-
cells.push(`${x},${y}`);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return cells;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
insert(detection: Detection): void {
|
|
28
|
-
const box = detection.boundingBox;
|
|
29
|
-
const cells = this.getCellsForBox(box);
|
|
30
|
-
|
|
31
|
-
for (const cell of cells) {
|
|
32
|
-
if (!this.cells.has(cell)) {
|
|
33
|
-
this.cells.set(cell, []);
|
|
34
|
-
}
|
|
35
|
-
this.cells.get(cell)!.push(detection);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
search(box: BoundingBox, margin = 0): Detection[] {
|
|
40
|
-
const cells = this.getCellsForBox(box, margin);
|
|
41
|
-
const result = new Set<Detection>();
|
|
42
|
-
|
|
43
|
-
for (const cell of cells) {
|
|
44
|
-
const detections = this.cells.get(cell) ?? [];
|
|
45
|
-
for (const detection of detections) {
|
|
46
|
-
result.add(detection);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return Array.from(result);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// Helper functions
|
|
55
|
-
function calculateIoU(box1: BoundingBox, box2: BoundingBox): number {
|
|
56
|
-
const intersectionX1 = Math.max(box1[0], box2[0]);
|
|
57
|
-
const intersectionY1 = Math.max(box1[1], box2[1]);
|
|
58
|
-
const intersectionX2 = Math.min(box1[2], box2[2]);
|
|
59
|
-
const intersectionY2 = Math.min(box1[3], box2[3]);
|
|
60
|
-
|
|
61
|
-
if (intersectionX2 < intersectionX1 || intersectionY2 < intersectionY1) {
|
|
62
|
-
return 0;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const intersectionArea = (intersectionX2 - intersectionX1) * (intersectionY2 - intersectionY1);
|
|
66
|
-
const box1Area = (box1[2] - box1[0]) * (box1[3] - box1[1]);
|
|
67
|
-
const box2Area = (box2[2] - box2[0]) * (box2[3] - box2[1]);
|
|
68
|
-
|
|
69
|
-
return intersectionArea / (box1Area + box2Area - intersectionArea);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function mergeBoundingBoxes(boxes: BoundingBox[]): BoundingBox {
|
|
73
|
-
const minX = Math.max(0, Math.round(Math.min(...boxes.map((box) => box[0]))));
|
|
74
|
-
const minY = Math.max(0, Math.round(Math.min(...boxes.map((box) => box[1]))));
|
|
75
|
-
const maxX = Math.min(1000, Math.round(Math.max(...boxes.map((box) => box[2]))));
|
|
76
|
-
const maxY = Math.min(1000, Math.round(Math.max(...boxes.map((box) => box[3]))));
|
|
77
|
-
|
|
78
|
-
return [minX, minY, maxX, maxY];
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function generateId(): string {
|
|
82
|
-
return Math.random().toString(36).slice(2, 9);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function isValidBox(box: BoundingBox): boolean {
|
|
86
|
-
return box[0] < box[2] && box[1] < box[3];
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export function mergeDetections(detections: Detection[], iouThreshold = 0.01, closeThreshold = 100): Detection[] {
|
|
90
|
-
if (detections.length === 0) {
|
|
91
|
-
return [];
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// Create spatial index with cell size based on closeThreshold
|
|
95
|
-
const spatialIndex = new SpatialIndex(closeThreshold);
|
|
96
|
-
const processedIds = new Set<string>();
|
|
97
|
-
const mergedDetections: Detection[] = [];
|
|
98
|
-
|
|
99
|
-
// Prepare detections with IDs
|
|
100
|
-
const preparedDetections = detections.map((d) => ({
|
|
101
|
-
...d,
|
|
102
|
-
id: d.id ?? generateId(),
|
|
103
|
-
}));
|
|
104
|
-
|
|
105
|
-
// Load spatial index
|
|
106
|
-
for (const detection of preparedDetections) {
|
|
107
|
-
spatialIndex.insert(detection);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
for (const detection of preparedDetections) {
|
|
111
|
-
if (processedIds.has(detection.id)) continue;
|
|
112
|
-
|
|
113
|
-
const currentDetection = { ...detection };
|
|
114
|
-
let maxConfidence = currentDetection.confidence;
|
|
115
|
-
const overlappingBoxes: BoundingBox[] = [currentDetection.boundingBox];
|
|
116
|
-
|
|
117
|
-
// Find potential overlaps using spatial index
|
|
118
|
-
const searchMargin = Math.max(closeThreshold, 10);
|
|
119
|
-
const potentialOverlaps = spatialIndex.search(currentDetection.boundingBox, searchMargin);
|
|
120
|
-
|
|
121
|
-
for (const overlap of potentialOverlaps) {
|
|
122
|
-
if (overlap.id === currentDetection.id || processedIds.has(overlap.id!) || overlap.label !== currentDetection.label) {
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const iou = calculateIoU(currentDetection.boundingBox, overlap.boundingBox);
|
|
127
|
-
const isClose =
|
|
128
|
-
Math.abs(currentDetection.boundingBox[0] - overlap.boundingBox[0]) <= closeThreshold &&
|
|
129
|
-
Math.abs(currentDetection.boundingBox[1] - overlap.boundingBox[1]) <= closeThreshold;
|
|
130
|
-
|
|
131
|
-
if (iou > iouThreshold || isClose) {
|
|
132
|
-
overlappingBoxes.push(overlap.boundingBox);
|
|
133
|
-
processedIds.add(overlap.id!);
|
|
134
|
-
maxConfidence = Math.max(maxConfidence, overlap.confidence);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (overlappingBoxes.length > 1) {
|
|
139
|
-
const mergedBox = mergeBoundingBoxes(overlappingBoxes);
|
|
140
|
-
if (isValidBox(mergedBox)) {
|
|
141
|
-
currentDetection.boundingBox = mergedBox;
|
|
142
|
-
currentDetection.confidence = maxConfidence;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if (isValidBox(currentDetection.boundingBox)) {
|
|
147
|
-
mergedDetections.push(currentDetection);
|
|
148
|
-
}
|
|
149
|
-
processedIds.add(currentDetection.id);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
return mergedDetections;
|
|
153
|
-
}
|
package/src/camera/polygon.ts
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import type { BoundingBox, CameraDetectionSettings, Detection, DetectionZone, ObjectClass, Point } from '@camera.ui/types';
|
|
2
|
-
|
|
3
|
-
function pointsEqual(p1: Point, p2: Point): boolean {
|
|
4
|
-
return p1[0] === p2[0] && p1[1] === p2[1];
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function isBoxContainedInPolygon(box: BoundingBox, polygon: Point[]): boolean {
|
|
8
|
-
const corners: Point[] = [
|
|
9
|
-
[box[0], box[1]], // Top-left
|
|
10
|
-
[box[2], box[1]], // Top-right
|
|
11
|
-
[box[2], box[3]], // Bottom-right
|
|
12
|
-
[box[0], box[3]], // Bottom-left
|
|
13
|
-
];
|
|
14
|
-
|
|
15
|
-
return corners.every((point) => isPointInPolygon(point, polygon));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function isBoxCompletelyOutsidePolygon(box: BoundingBox, polygon: Point[]): boolean {
|
|
19
|
-
const corners: Point[] = [
|
|
20
|
-
[box[0], box[1]], // Top-left
|
|
21
|
-
[box[2], box[1]], // Top-right
|
|
22
|
-
[box[2], box[3]], // Bottom-right
|
|
23
|
-
[box[0], box[3]], // Bottom-left
|
|
24
|
-
];
|
|
25
|
-
|
|
26
|
-
return !doPolygonsIntersect(box, polygon) && corners.every((point) => !isPointInPolygon(point, polygon));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function isPointInPolygon(point: Point, polygon: Point[]): boolean {
|
|
30
|
-
const [x, y] = point;
|
|
31
|
-
let inside = false;
|
|
32
|
-
|
|
33
|
-
// Check if point is on the edge of the polygon
|
|
34
|
-
for (let i = 0; i < polygon.length; i++) {
|
|
35
|
-
const j = (i + 1) % polygon.length;
|
|
36
|
-
const [xi, yi] = polygon[i];
|
|
37
|
-
const [xj, yj] = polygon[j];
|
|
38
|
-
|
|
39
|
-
// Point lies on a horizontal or vertical edge
|
|
40
|
-
if (x >= Math.min(xi, xj) && x <= Math.max(xi, xj) && y >= Math.min(yi, yj) && y <= Math.max(yi, yj)) {
|
|
41
|
-
// Verticale Linie
|
|
42
|
-
if (Math.abs(xi - xj) < 0.000001) {
|
|
43
|
-
if (Math.abs(x - xi) < 0.000001) {
|
|
44
|
-
return true;
|
|
45
|
-
}
|
|
46
|
-
} else {
|
|
47
|
-
// Other lines
|
|
48
|
-
const m = (yj - yi) / (xj - xi);
|
|
49
|
-
const b = yi - m * xi;
|
|
50
|
-
const yOnLine = m * x + b;
|
|
51
|
-
if (Math.abs(y - yOnLine) < 0.000001) {
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Standard Ray-Casting Test
|
|
58
|
-
// eslint-disable-next-line @stylistic/no-mixed-operators
|
|
59
|
-
if (yi > y !== yj > y && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi) {
|
|
60
|
-
inside = !inside;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return inside;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function doLinesIntersect(a1: Point, a2: Point, b1: Point, b2: Point): boolean {
|
|
68
|
-
const denominator = (b2[1] - b1[1]) * (a2[0] - a1[0]) - (b2[0] - b1[0]) * (a2[1] - a1[1]);
|
|
69
|
-
if (denominator === 0) return false;
|
|
70
|
-
|
|
71
|
-
const ua = ((b2[0] - b1[0]) * (a1[1] - b1[1]) - (b2[1] - b1[1]) * (a1[0] - b1[0])) / denominator;
|
|
72
|
-
const ub = ((a2[0] - a1[0]) * (a1[1] - b1[1]) - (a2[1] - a1[1]) * (a1[0] - b1[0])) / denominator;
|
|
73
|
-
|
|
74
|
-
return ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function doPolygonsIntersect(box: BoundingBox, polygon: Point[]): boolean {
|
|
78
|
-
const boxPolygon: Point[] = [
|
|
79
|
-
[box[0], box[1]], // Top-left
|
|
80
|
-
[box[2], box[1]], // Top-right
|
|
81
|
-
[box[2], box[3]], // Bottom-right
|
|
82
|
-
[box[0], box[3]], // Bottom-left
|
|
83
|
-
[box[0], box[1]], // Close the polygon
|
|
84
|
-
];
|
|
85
|
-
|
|
86
|
-
// Check if any of the box corners are inside the polygon
|
|
87
|
-
if (boxPolygon.some((point) => isPointInPolygon(point, polygon))) {
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (polygon.some((point) => point[0] >= box[0] && point[0] <= box[2] && point[1] >= box[1] && point[1] <= box[3])) {
|
|
92
|
-
return true;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// Check if any of the polygon corners intersect with any of the box edges
|
|
96
|
-
for (let i = 0; i < boxPolygon.length - 1; i++) {
|
|
97
|
-
for (let j = 0; j < polygon.length - 1; j++) {
|
|
98
|
-
if (doLinesIntersect(boxPolygon[i], boxPolygon[i + 1], polygon[j], polygon[j + 1])) {
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export const convertZonePointsToPixels = (zone: DetectionZone, detection: Detection): DetectionZone => {
|
|
108
|
-
const { origWidth, origHeight } = detection;
|
|
109
|
-
const convertedPoints: Point[] = zone.points.map(([x, y]) => [(x * origWidth) / 100, (y * origHeight) / 100]);
|
|
110
|
-
|
|
111
|
-
if (convertedPoints.length > 0 && !pointsEqual(convertedPoints[0], convertedPoints[convertedPoints.length - 1])) {
|
|
112
|
-
convertedPoints.push(convertedPoints[0]);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return {
|
|
116
|
-
...zone,
|
|
117
|
-
points: convertedPoints,
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export const convertBoundingBoxToPixels = (detection: Detection): Detection => {
|
|
122
|
-
const { origWidth, origHeight, inputWidth, inputHeight } = detection;
|
|
123
|
-
let [xmin, ymin, xmax, ymax] = detection.boundingBox;
|
|
124
|
-
|
|
125
|
-
xmin = (xmin * origWidth) / inputWidth;
|
|
126
|
-
ymin = (ymin * origHeight) / inputHeight;
|
|
127
|
-
xmax = (xmax * origWidth) / inputWidth;
|
|
128
|
-
ymax = (ymax * origHeight) / inputHeight;
|
|
129
|
-
|
|
130
|
-
xmin = Math.max(0, Math.min(xmin, origWidth));
|
|
131
|
-
ymin = Math.max(0, Math.min(ymin, origHeight));
|
|
132
|
-
xmax = Math.max(0, Math.min(xmax, origWidth));
|
|
133
|
-
ymax = Math.max(0, Math.min(ymax, origHeight));
|
|
134
|
-
|
|
135
|
-
return {
|
|
136
|
-
...detection,
|
|
137
|
-
boundingBox: [xmin, ymin, xmax, ymax],
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
export const areDetectionsValid = (detections: Detection[], zones: DetectionZone[], activitySettings: CameraDetectionSettings): Detection[] => {
|
|
142
|
-
if (zones.length === 0) {
|
|
143
|
-
return [];
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if (detections.length === 0) {
|
|
147
|
-
return [];
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
const validClasses = new Set<ObjectClass>();
|
|
151
|
-
for (const zone of zones) {
|
|
152
|
-
if (zone.classes.length > 0) {
|
|
153
|
-
zone.classes.forEach((cls) => validClasses.add(cls));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
return detections.filter((detection) => {
|
|
158
|
-
// Check if detection confidence is above threshold
|
|
159
|
-
if (detection.confidence < activitySettings.object.confidence) {
|
|
160
|
-
return false;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Check if detection class is valid
|
|
164
|
-
if (!validClasses.has(detection.label)) {
|
|
165
|
-
return false;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
const convertedDetection = convertBoundingBoxToPixels(detection);
|
|
169
|
-
|
|
170
|
-
// Check if detection is inside a privacy mask
|
|
171
|
-
for (const zone of zones) {
|
|
172
|
-
if (!zone.isPrivacyMask) continue;
|
|
173
|
-
|
|
174
|
-
const convertedZone = convertZonePointsToPixels(zone, convertedDetection);
|
|
175
|
-
if (isBoxContainedInPolygon(convertedDetection.boundingBox, convertedZone.points)) {
|
|
176
|
-
return false;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
let hasIncludeZone = false;
|
|
181
|
-
let isValid = false;
|
|
182
|
-
|
|
183
|
-
for (const zone of zones) {
|
|
184
|
-
// Skip privacy masks
|
|
185
|
-
if (zone.isPrivacyMask) continue;
|
|
186
|
-
|
|
187
|
-
// Skip zones that do not include the detection class
|
|
188
|
-
if (!zone.classes.includes(detection.label)) {
|
|
189
|
-
continue;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
const convertedZone = convertZonePointsToPixels(zone, convertedDetection);
|
|
193
|
-
const intersects = doPolygonsIntersect(convertedDetection.boundingBox, convertedZone.points);
|
|
194
|
-
const contained = isBoxContainedInPolygon(convertedDetection.boundingBox, convertedZone.points);
|
|
195
|
-
|
|
196
|
-
if (zone.filter === 'include') {
|
|
197
|
-
// include
|
|
198
|
-
hasIncludeZone = true;
|
|
199
|
-
if ((zone.type === 'contain' && contained) || (zone.type === 'intersect' && (intersects || contained))) {
|
|
200
|
-
isValid = true;
|
|
201
|
-
break;
|
|
202
|
-
}
|
|
203
|
-
} else {
|
|
204
|
-
// exclude
|
|
205
|
-
if (zone.type === 'contain') {
|
|
206
|
-
if (!isBoxCompletelyOutsidePolygon(convertedDetection.boundingBox, convertedZone.points)) {
|
|
207
|
-
return false;
|
|
208
|
-
}
|
|
209
|
-
} else {
|
|
210
|
-
// intersect/contained
|
|
211
|
-
if (intersects || contained) {
|
|
212
|
-
return false;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// If there are no include zones and the detection has not been blocked by a matching exclude zone
|
|
219
|
-
// or privacy mask, it is valid
|
|
220
|
-
if (!hasIncludeZone) {
|
|
221
|
-
return true;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
return isValid;
|
|
225
|
-
});
|
|
226
|
-
};
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
from _camera_ui_tools.camera_ui_types import Detection, ObjectClass
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def categorize_coco_class(class_name: str) -> ObjectClass:
|
|
5
|
-
if class_name == "person":
|
|
6
|
-
return "person"
|
|
7
|
-
|
|
8
|
-
if class_name == "motion":
|
|
9
|
-
return "motion"
|
|
10
|
-
|
|
11
|
-
animals = {
|
|
12
|
-
"bird",
|
|
13
|
-
"cat",
|
|
14
|
-
"dog",
|
|
15
|
-
"horse",
|
|
16
|
-
"sheep",
|
|
17
|
-
"cow",
|
|
18
|
-
"elephant",
|
|
19
|
-
"bear",
|
|
20
|
-
"zebra",
|
|
21
|
-
"giraffe",
|
|
22
|
-
"teddy bear",
|
|
23
|
-
}
|
|
24
|
-
if class_name in animals:
|
|
25
|
-
return "animal"
|
|
26
|
-
|
|
27
|
-
vehicles = {"bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", "boat"}
|
|
28
|
-
if class_name in vehicles:
|
|
29
|
-
return "vehicle"
|
|
30
|
-
|
|
31
|
-
return "other"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def transform_labels(detections: list[Detection]) -> list[Detection]:
|
|
35
|
-
transformed_detections: list[Detection] = []
|
|
36
|
-
for detection in detections:
|
|
37
|
-
new_detection = detection.copy()
|
|
38
|
-
new_detection["label"] = categorize_coco_class(detection["label"])
|
|
39
|
-
transformed_detections.append(new_detection)
|
|
40
|
-
|
|
41
|
-
return transformed_detections
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import asyncio
|
|
2
|
-
from contextlib import suppress
|
|
3
|
-
from typing import Optional, TypedDict, Union, cast
|
|
4
|
-
|
|
5
|
-
from reactivex.subject.behaviorsubject import BehaviorSubject
|
|
6
|
-
|
|
7
|
-
from _camera_ui_tools.camera_ui_rpc_client import ClientInstance
|
|
8
|
-
from _camera_ui_tools.camera_ui_rpc_client.base.rpc import RPCConnection
|
|
9
|
-
from _camera_ui_tools.camera_ui_rpc_client.utils.rpc import rpc
|
|
10
|
-
from _camera_ui_tools.camera_ui_types import (
|
|
11
|
-
CameraDeviceCapability,
|
|
12
|
-
PTZCommand,
|
|
13
|
-
PTZInterface,
|
|
14
|
-
SnapshotInterface,
|
|
15
|
-
StreamingInterface,
|
|
16
|
-
)
|
|
17
|
-
from plugins.runtime.python.namespaces import NamespaceManager
|
|
18
|
-
from plugins.runtime.python.typings import CameraInterfaces, PluginCapabilities
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class RPCConnectionInfo(TypedDict):
|
|
22
|
-
namespace: str
|
|
23
|
-
connection: RPCConnection
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class CameraInterface(CameraInterfaces):
|
|
27
|
-
def __init__(
|
|
28
|
-
self,
|
|
29
|
-
proxy: ClientInstance,
|
|
30
|
-
capabilities: BehaviorSubject[list[PluginCapabilities]],
|
|
31
|
-
camera_id: str,
|
|
32
|
-
plugin_id: Optional[str] = None,
|
|
33
|
-
):
|
|
34
|
-
self.__proxy = proxy
|
|
35
|
-
self.__capabilities = capabilities
|
|
36
|
-
self.__camera_id = camera_id
|
|
37
|
-
self.__plugin_id = plugin_id
|
|
38
|
-
|
|
39
|
-
self.__rpc_connection: list[RPCConnectionInfo] = []
|
|
40
|
-
self.interfaces: Optional[Union[PTZInterface, SnapshotInterface, StreamingInterface]] = None
|
|
41
|
-
|
|
42
|
-
@rpc(public=True)
|
|
43
|
-
async def streamUrl(self, source_name: str) -> str:
|
|
44
|
-
capability = next(
|
|
45
|
-
(
|
|
46
|
-
cap
|
|
47
|
-
for cap in self.__capabilities.value
|
|
48
|
-
if any(c == CameraDeviceCapability.StreamUrl for c in cap["capabilities"])
|
|
49
|
-
),
|
|
50
|
-
None,
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
if not capability:
|
|
54
|
-
raise RuntimeError("No capability found for streamUrl")
|
|
55
|
-
|
|
56
|
-
if self.interfaces and hasattr(self.interfaces, "streamUrl"):
|
|
57
|
-
interfaces = cast(StreamingInterface, self.interfaces)
|
|
58
|
-
return await interfaces.streamUrl(source_name)
|
|
59
|
-
else:
|
|
60
|
-
camera_proxy = await self.__camera_proxy(capability["pluginId"])
|
|
61
|
-
return await camera_proxy.streamUrl(source_name)
|
|
62
|
-
|
|
63
|
-
@rpc(public=True)
|
|
64
|
-
async def snapshot(self, source_id: str, force_new: Optional[bool] = None) -> Optional[bytes]:
|
|
65
|
-
capability = next(
|
|
66
|
-
(
|
|
67
|
-
cap
|
|
68
|
-
for cap in self.__capabilities.value
|
|
69
|
-
if any(c == CameraDeviceCapability.Snapshot for c in cap["capabilities"])
|
|
70
|
-
),
|
|
71
|
-
None,
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
if not capability:
|
|
75
|
-
raise RuntimeError("No capability found for snapshot")
|
|
76
|
-
|
|
77
|
-
if self.interfaces and hasattr(self.interfaces, "snapshot"):
|
|
78
|
-
interfaces = cast(SnapshotInterface, self.interfaces)
|
|
79
|
-
return await interfaces.snapshot(source_id, force_new)
|
|
80
|
-
else:
|
|
81
|
-
camera_proxy = await self.__camera_proxy(capability["pluginId"])
|
|
82
|
-
return await camera_proxy.snapshot(source_id, force_new)
|
|
83
|
-
|
|
84
|
-
@rpc(public=True)
|
|
85
|
-
async def ptzCommand(self, command: PTZCommand) -> None:
|
|
86
|
-
capability = next(
|
|
87
|
-
(
|
|
88
|
-
cap
|
|
89
|
-
for cap in self.__capabilities.value
|
|
90
|
-
if any(c == CameraDeviceCapability.PTZ for c in cap["capabilities"])
|
|
91
|
-
),
|
|
92
|
-
None,
|
|
93
|
-
)
|
|
94
|
-
|
|
95
|
-
if not capability:
|
|
96
|
-
raise RuntimeError("No capability found for PTZ")
|
|
97
|
-
|
|
98
|
-
if self.interfaces and hasattr(self.interfaces, "ptzCommand"):
|
|
99
|
-
interfaces = cast(PTZInterface, self.interfaces)
|
|
100
|
-
return await interfaces.ptzCommand(command)
|
|
101
|
-
else:
|
|
102
|
-
camera_proxy = await self.__camera_proxy(capability["pluginId"])
|
|
103
|
-
return await camera_proxy.ptzCommand(command)
|
|
104
|
-
|
|
105
|
-
async def disconnect(self) -> None:
|
|
106
|
-
with suppress(Exception):
|
|
107
|
-
await asyncio.gather(*[rpc["connection"].disconnect() for rpc in self.__rpc_connection])
|
|
108
|
-
|
|
109
|
-
async def __camera_proxy(self, plugin_id: str) -> CameraInterfaces:
|
|
110
|
-
if plugin_id == self.__plugin_id:
|
|
111
|
-
raise RuntimeError("Can not create camera proxy for the same plugin")
|
|
112
|
-
|
|
113
|
-
namespace = NamespaceManager.plugin_camera_namespaces(plugin_id, self.__camera_id)[
|
|
114
|
-
"cameraInterfacesRpc"
|
|
115
|
-
]
|
|
116
|
-
rpc_connection = await self.__proxy.create_rpc_connection(namespace)
|
|
117
|
-
|
|
118
|
-
rpc_connection_exists = next(
|
|
119
|
-
(rpc for rpc in self.__rpc_connection if rpc["namespace"] == namespace), None
|
|
120
|
-
)
|
|
121
|
-
|
|
122
|
-
if not rpc_connection_exists:
|
|
123
|
-
self.__rpc_connection.append(
|
|
124
|
-
{
|
|
125
|
-
"namespace": namespace,
|
|
126
|
-
"connection": rpc_connection,
|
|
127
|
-
}
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
return rpc_connection.create_proxy(CameraInterfaces)
|