Skip to content

Integrate reviewed upstream work and manual-install packaging - #2

Merged
shurkanTwo merged 52 commits into
masterfrom
t3/aeb61805
Oct 17, 2026
Merged

shurkanTwo merged 52 commits into
masterfrom
t3/aeb61805

Conversation

@shurkanTwo

@shurkanTwo shurkanTwo commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

All work from this PR is included in the combined 1.0.0.5 release. Original commits and contributor credits are preserved. Current installation instructions.

Record the initial community integration at 413290f, maintaining @dougforpres’s Sony camera plugin in this fork while shared upstream maintenance is being discussed. Preserve original commits, copyright notices, MPL-2.0, and contributor credit.

 Sony camera plugin
+ current capture safeguards and opt-in simulator (#10/#15)
+ focuser capability fix (#11), native buffer cleanup (#14)
+ lens/SD-card guides (#16/#17), ARW temperature (#18)
+ reviewed exposure/ISO/native-call/focuser fixes adapted from #13
+ manual-install ZIP/DLL, checksums, source/build provenance

Native timeouts remain blocked until NINA restarts; native cancellation stays opt-in and never interrupts readout/processing. Experimental USB reconnection, retries into a still-running timed-out driver, and forced busy-capture cancellation are deferred. Closed video WIP dougforpres#12 is not included.

Full source links, review findings and issue coverage: upstream review. Installation and rollback replace the existing DLL rather than loading duplicate plugins. Support and release links point to this fork.

Evidence

  • Before: regression tests demonstrate native cancellation during readout/processing and accepting a stale 30-second setting for a 31-second Bulb request.
    After: 98 Windows tests pass (59 capture/simulator/native-call/shutter, 24 temperature metadata, 15 actual-plugin integration). Windows CI builds and packages the Release plugin. ZIP/DLL SHA-256 checksums and package contents were independently verified; the plugin and Windows integration project also cross-build on Linux.
  • Independent Standards and Spec reviews caught unsafe recovery paths and incomplete image publication; fixes keep exclusion after timeout, use learnt shutter limits, publish copied images atomically, and consume images once.
  • Physical Sony camera, USB/MTP, lens operation and complete Sky Flat behavior have not been verified for this combined build. Existing legacy-package NU1701 warnings remain.

Merge Danger

Door: two-way

Manual users can restore their backed-up upstream DLL. The plugin identifier and original copyright notice are retained. This PR does not change NINA’s central plugin catalog or close upstream issues/PRs.

Blast Radius: equipment

Changes affect direct Sony camera capture, aborts, temperature, ISO selection and lens focuser calls. The community release retains explicit validation limits.

shurkanTwo and others added 22 commits December 8, 2025 13:52
GetCaptureStatus and GetPreviewImage copy the frame out of the buffer the
driver returns in ImageInfo, then drop the pointer on the floor. The driver
allocates ImageData and MetaData with CoTaskMemAlloc and hands ownership to
us - the usual COM convention, and the one this class already follows for the
device-id list in GetDeviceIds - so nothing ever released them and every
captured frame leaked its full size.

Measured on an a7S (~12 MB ARW) driving NINA 3.3.0.1057 with driver 1.0.1.21:
a session left running from 2026-09-15 to 2026-09-18 took 1770 frames over
71.6 hours and reached a 28 GB working set, ~16.2 MB per frame (image plus
metadata). It ended when a 12 MB CoTaskMemAlloc inside the driver failed with
E_OUTOFMEMORY (hr = 0x8007000e) during a flat sequence and took NINA down
mid-exposure. The driver reported the failure because it was the next caller
to ask for memory, but the allocation it could not satisfy was ours.

Add FreeImageInfo and call it from a finally at all four sites that hand an
ImageInfo to the driver. finally rather than a straight-line call because both
image paths can throw after the driver has already allocated, and liveview
runs GetPreviewImage many times a second. Freeing a null pointer is a no-op,
so it is safe whatever the driver populated.

Verified on the same rig: 154 full-size frames in 9.4 minutes, where the old
build would have grown ~2.44 GB, and memory stayed bounded at ~1.4 GB with no
driver errors and no crash dump.
Keep native abort opt-in, reject busy starts, and prevent delayed aborts
from cancelling newer captures. Report cancelled and failed captures
without downloading stale images.

Add 27 capture regression tests, CI checks, and hardware validation notes.
Inject camera communication so the production plugin can run without
SonyMTPCamera.dll or hardware. Keep simulation opt-in and share the
backend between NINA discovery and automated tests.

Exercise timing, failures, profile settings, cancellation, and image
routing with a manual clock and actual plugin integration tests.
# Conflicts:
#	.github/workflows/dotnet.yml
#	Drivers/CameraDriver.cs
Integrate the shutter readback, manual ISO, native serialization, image consumption, DLL version and focuser improvements proposed in dougforpres#13, while retaining the current capture controller and native image buffer cleanup.

Defer automatic USB reconnect, retrying timed-out native workers, and forced busy-capture cancellation. Add regression tests for readout cancellation, timeout exclusion, shutter application and combined RAW temperature reporting.

Co-authored-by: Robert Hasson <robert_hasson@yahoo.com>
@shurkanTwo
shurkanTwo merged commit 413290f into master Oct 17, 2026
1 check passed
@shurkanTwo shurkanTwo changed the title Prepare maintained Sony Camera Plugin 1.0.0.5 community preview Integrate reviewed upstream work and manual-install packaging Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants