Merged
Conversation
Collaborator
davidnewhall
commented
Mar 3, 2026
- Fixed command encoding bugs:
- CameraArmMode values now serialize correctly as "0" / "1" in Toggle* camera methods.
- Fixed PTZ behavior to match SecuritySpy spec:
- Preset() now sends command 12-19.
- PresetSave() now sends command 112-119.
- PTZ capability bitmask updated so 16 = speed control, 32 = continuous movement, and added HasSpeed.
- Fixed nil-safety and refresh hardening:
- GetJPEG(nil) no longer panics.
- Refresh() now handles nil PTZ safely and missing schedule/override IDs without unsafe assumptions.
- Fixed transport behavior:
- Post("++audio", ...) now correctly sets Content-Type: audio/g711-ulaw only for audio endpoint.
- Hardened event lifecycle and concurrency:
- Reworked watch/stop lifecycle with cancellation + waitgroup, idempotent stop/start behavior.
- Removed close-driven event channel shutdown race.
- Added synchronization around runtime watcher fields.
- Improved scanner reconnect loop and scanner error handling.
- Made event parsing robust for short/optional-info lines and corrected trigger parsing precedence.
- Improved timeout/context behavior:
- Get() / GetClient() now use bounded contexts.
- Improved timeout fallback logic.
- Added context-aware stream APIs:
- StreamMJPGContext
- StreamH264Context
- StreamG711Context
- Stream methods now use timeout-free clients for long-lived media streams.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.