python-aidot-cameras 0.7.5__tar.gz → 0.7.7__tar.gz

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 (42) hide show
  1. {python_aidot_cameras-0.7.5/src/python_aidot_cameras.egg-info → python_aidot_cameras-0.7.7}/PKG-INFO +1 -1
  2. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/pyproject.toml +1 -1
  3. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/camera/client.py +23 -1
  4. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7/src/python_aidot_cameras.egg-info}/PKG-INFO +1 -1
  5. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/LICENSE +0 -0
  6. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/README.md +0 -0
  7. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/setup.cfg +0 -0
  8. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/__init__.py +0 -0
  9. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/aes_utils.py +0 -0
  10. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/camera/__init__.py +0 -0
  11. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/camera/lan_control.py +0 -0
  12. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/client.py +0 -0
  13. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/const.py +0 -0
  14. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/credentials.py +0 -0
  15. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/device_client.py +0 -0
  16. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/discover.py +0 -0
  17. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/exceptions.py +0 -0
  18. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/g711.py +0 -0
  19. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/login_const.py +0 -0
  20. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/models/__init__.py +0 -0
  21. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/models/device_client_model.py +0 -0
  22. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/models/device_model.py +0 -0
  23. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/aidot/models/discover_model.py +0 -0
  24. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/python_aidot_cameras.egg-info/SOURCES.txt +0 -0
  25. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/python_aidot_cameras.egg-info/dependency_links.txt +0 -0
  26. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/python_aidot_cameras.egg-info/requires.txt +0 -0
  27. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/src/python_aidot_cameras.egg-info/top_level.txt +0 -0
  28. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_alarm_event.py +0 -0
  29. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_highport_nomination.py +0 -0
  30. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_lan_control.py +0 -0
  31. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_motion_poll.py +0 -0
  32. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_no_undefined_names.py +0 -0
  33. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_post_merge_hardening.py +0 -0
  34. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_sdes_idle_release.py +0 -0
  35. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_sdes_sprop.py +0 -0
  36. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_sdes_talk.py +0 -0
  37. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_sdes_watchdog.py +0 -0
  38. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_speak.py +0 -0
  39. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_stream_cap.py +0 -0
  40. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_talk.py +0 -0
  41. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_terminal_ack.py +0 -0
  42. {python_aidot_cameras-0.7.5 → python_aidot_cameras-0.7.7}/tests/test_token_refresh.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-aidot-cameras
3
- Version: 0.7.5
3
+ Version: 0.7.7
4
4
  Summary: Control AiDot/Leedarson WiFi lights and cameras (WebRTC streaming, two-way audio, PTZ, controls)
5
5
  Author-email: cbrightly <chris.brightly@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-aidot-cameras"
7
- version = "0.7.5"
7
+ version = "0.7.7"
8
8
  description = "Control AiDot/Leedarson WiFi lights and cameras (WebRTC streaming, two-way audio, PTZ, controls)"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -4842,11 +4842,22 @@ class CameraMixin:
4842
4842
  # client and tear down before go2rtc connects.)
4843
4843
  await asyncio.sleep(0.3)
4844
4844
  self._serve_ready.set()
4845
+ # Periodic keyframe request shortens the camera's GOP so HA's
4846
+ # HLS segmenter (which cuts on keyframes) produces short
4847
+ # segments -> far less player buffering (the ~20s HLS lag is
4848
+ # dominated by long native GOPs). 0 disables; raising it
4849
+ # lowers bitrate at the cost of latency. Mains DTLS cameras
4850
+ # only; the SDES path has its own PLI cadence.
4851
+ _gop_pli_s = float(os.environ.get("AIDOT_GOP_PLI_S", "2.0"))
4852
+ _last_gop_pli = loop.time()
4845
4853
  # Wait for ffmpeg to exit (go2rtc disconnect) or idle release.
4846
4854
  while self._streaming_active and proc.returncode is None:
4847
- await asyncio.sleep(1.0)
4855
+ await asyncio.sleep(0.5)
4848
4856
  if _pc_dead():
4849
4857
  break
4858
+ if _gop_pli_s > 0 and loop.time() - _last_gop_pli >= _gop_pli_s:
4859
+ await self._send_video_pli(pc)
4860
+ _last_gop_pli = loop.time()
4850
4861
  # No consumer -> the pipe fills, the mux blocks, progress
4851
4862
  # goes stale. A real viewer keeps it fresh.
4852
4863
  if loop.time() - progress[0] > idle_secs:
@@ -5441,6 +5452,13 @@ class CameraMixin:
5441
5452
  _fast_connect = os.environ.get("AIDOT_FAST_CONNECT", "").strip().lower() in (
5442
5453
  "1", "true", "yes", "on",
5443
5454
  )
5455
+ # fast_connect (skip livePlay/ICE waits + strip TURN) is validated for the
5456
+ # DTLS path only. On SDES cameras those skips leave the SCTP handshake
5457
+ # under-armed and the session churns/re-establishes (~every 60-90s),
5458
+ # dropping the live view to a snapshot. Force the full, stable handshake
5459
+ # for SDES regardless of the option/env.
5460
+ if self.is_sdes_camera:
5461
+ _fast_connect = False
5444
5462
 
5445
5463
  # Wake battery cameras via the cloud HTTP low-power endpoint before the
5446
5464
  # handshake (matches the app, which fires the HTTP wake so a sleeping camera
@@ -8928,6 +8946,10 @@ class CameraMixin:
8928
8946
  _fast_connect = os.environ.get("AIDOT_FAST_CONNECT", "").strip().lower() in (
8929
8947
  "1", "true", "yes", "on",
8930
8948
  )
8949
+ # SDES path: fast_connect's wait-skips / TURN-strip destabilise the SCTP
8950
+ # handshake (session churns ~every 60-90s -> live view drops to snapshot),
8951
+ # so always use the full, stable handshake here.
8952
+ _fast_connect = False
8931
8953
 
8932
8954
  user_id = user_id or str(self.user_id)
8933
8955
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-aidot-cameras
3
- Version: 0.7.5
3
+ Version: 0.7.7
4
4
  Summary: Control AiDot/Leedarson WiFi lights and cameras (WebRTC streaming, two-way audio, PTZ, controls)
5
5
  Author-email: cbrightly <chris.brightly@gmail.com>
6
6
  License-Expression: MIT