fix: Linux aarch64 build + native SSP connector (no libssp dependency)#89
Open
damienheiser wants to merge 6 commits into
Open
fix: Linux aarch64 build + native SSP connector (no libssp dependency)#89damienheiser wants to merge 6 commits into
damienheiser wants to merge 6 commits into
Conversation
added 2 commits
March 8, 2026 12:30
- Fix FFmpeg component names (AVCODEC/AVUTIL → avcodec/avutil) to match FindFFmpeg.cmake case-sensitive comparison - Fix ENABLE_FRONTEND_API/ENABLE_QT to use option() instead of set() so CMake preset cache variables are respected - Fix Qt6 alias target error with Qt 6.10+ by checking ALIASED_TARGET before setting properties - Add Linux libssp linking case in ssp_connector/CMakeLists.txt - Add Linux install targets for ssp-connector and libssp - Skip ssp-connector build on aarch64 Linux (no vendor binary available) - Fix int64_t vs long long type mismatch on aarch64 in obs-ssp-source.cpp
…bssp Add ssp_native.c, a clean-room SSP protocol implementation that replaces the closed-source libssp dependency entirely. Protocol reverse-engineered from libssp-py and symbol analysis of the original library. Features: - TCP-based SSP client with SHA1 challenge-response auth - Stream start/stop, metadata, video and audio frame parsing - Heartbeat keepalive via poll()-based event loop - Compatible IPC output format for the obs-ssp plugin - Zero proprietary dependencies (only needs OpenSSL for SHA1) - Builds natively on any architecture (aarch64, x86_64, etc.) Build system changes: - New USE_NATIVE_SSP cmake option (auto-enabled on Linux aarch64) - Falls back to original libssp-based connector when available - Simplified install targets for all platforms Also adds scripts/zcam-rtsp.sh for low-latency GStreamer RTSP fallback.
added 4 commits
March 8, 2026 13:11
…ture Metadata, video, and audio packet formats were reverse-engineered from a live Z CAM wire capture. The original offsets were guesswork and produced garbage values (e.g. video=0x1114112). Metadata (0x6E): 9-byte header (type + 4 version + 4 field_count), then 17 × BE32 fields in order: video.timescale, video.unit, width, height, gop, reserved, audio.sample_rate, audio.unit, audio.timescale, audio.sample_size, channel, bitrate, pts_is_wall_clock, video.encoder, audio.encoder, timecode, tc_drop_frame. Video (0x6F): [0]=type [1..8]=pts(BE64) [9..12]=frame_type(BE32) [13..16]=frm_no(BE32) [17..]=NAL data. No ntp_timestamp on wire. Audio (0x70): [0]=type [1..8]=pts(BE64) [9..]=ADTS data. No ntp_timestamp on wire. Verified: video=1920x1080 ts=30000/1001 gop=30 enc=H264(96), audio=48000hz ch=2 enc=AAC(37) br=128000.
Stop() called worker.join() before destroying the pipe, but the worker thread was blocked in fread() waiting for connector output. Since os_process_pipe_destroy (which kills the connector) was only called AFTER join, the sequence deadlocked — OBS froze on source stop. Fix: send SIGTERM to the connector process before joining the worker. The connector's signal handler sets g_running=false, recv() returns EINTR, the connector exits, stdout closes, fread returns 0, the worker loop breaks, and join() completes immediately. Added os_process_pipe_signal() to both POSIX (kill()) and Windows (TerminateProcess()) pipe implementations.
Add clean-room SSP protocol documentation reverse-engineered from live Z CAM E2-M4 wire captures. Includes complete packet layouts for all message types, authentication flow, and metadata field map. Add public C API header (ssp/ssp.h) defining callback-based client interface for embedding the SSP client in other applications. Update copyright to Hedonistic, LLC. Include ssp_connector in repo via .gitignore allowlist.
Extract protocol logic from monolithic ssp_native.c into a clean embeddable library (ssp.c) implementing the public ssp_client_t API. - ssp.c: callback-driven library, no globals, cross-platform sockets - ssp_connector_main.c: thin CLI bridging library callbacks to IPC - ssp_platform.h: POSIX/Windows socket abstraction layer - test_ssp.c: 38 unit tests covering byte helpers, packet parsing, metadata field layout, and library API - CMakeLists.txt: object library + test target (SSP_BUILD_TESTS) - README.md: complete rewrite with build instructions, architecture overview, protocol summary, and camera compatibility table
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.
Summary
Adds Linux aarch64 build support and a native SSP client — a clean-room, open-source
replacement for the closed-source
libssp.sothat the upstream connector depends on.The SSP wire protocol was reverse-engineered from live Z CAM E2-M4 captures,
libssp-py, and symbol analysis.
Changes
ssp_native.c) — drop-in replacement, auto-selected on Linux aarch64ssp.clibrary +ssp_connector_main.cCLIssp_platform.habstracts POSIX/Windows differencesSSP_PROTOCOL.mdArchitecture
Commits
470d16a— Build fixes for aarch64 and modern toolchainsf4c5769— Native SSP connector implementation17e349a— Wire format parsing fixes from live camera capturesda71ec8— Stop() deadlock fix51ef16f— Protocol documentation and public API header89fb27c— Library refactor with tests and READMETest Plan
cmake -DSSP_BUILD_TESTS=ON)