Preview DSLR : resize 960px + base64 hors asyncio pour fluidifier liveview
This commit is contained in:
@@ -80,7 +80,8 @@ async def _pusher_preview():
|
||||
await diffuser_ws({"type": "camera_erreur", "message": "DSLR ne repond pas au preview"})
|
||||
_preview_actif = False
|
||||
continue
|
||||
b64 = base64.b64encode(donnees).decode("ascii")
|
||||
loop = asyncio.get_event_loop()
|
||||
b64 = await loop.run_in_executor(None, lambda d=donnees: base64.b64encode(d).decode("ascii"))
|
||||
await diffuser_ws({"type": "preview", "image": f"data:image/jpeg;base64,{b64}"})
|
||||
|
||||
async def surveiller_dslr():
|
||||
|
||||
Reference in New Issue
Block a user