Skip to content

feat: engineering infrastructure, SIP gateway, DVR, and protocol enhancements - #7

Merged
im-pingo merged 6 commits into
mainfrom
feat/engineering-infrastructure
May 27, 2026
Merged

feat: engineering infrastructure, SIP gateway, DVR, and protocol enhancements#7
im-pingo merged 6 commits into
mainfrom
feat/engineering-infrastructure

Conversation

@im-pingo

Copy link
Copy Markdown
Owner

Summary

Adds engineering infrastructure, new modules, and protocol enhancements across 9 phases (20 items).

New Modules

  • SIP Gateway (module/sipgateway/) — B2BUA call bridging (inbound/outbound) with codec negotiation
  • DVR Time-Shift (module/dvr/) — File-based HLS DVR with configurable rolling window and seek support

Protocol Enhancements

  • RTSP UDP multicast transport
  • H.265 WebRTC WHEP compatibility
  • Classic MP4 recording (moov atom)
  • TS/HLS segment recording with VOD playlist

Core Features

  • Config hot-reload via SIGHUP
  • Cluster node health check + auto-eviction
  • Cluster relay connection pool (per-host semaphore)
  • Stream search/filter API (?q= parameter)
  • DVR status API endpoint

Engineering Infrastructure

  • GitHub Actions CI/CD (test, build, release)
  • golangci-lint + gosec configuration
  • sync.Pool memory reuse utilities
  • TS muxer zero-copy optimizations

Test Coverage

  • SIP dispatch/transaction tests
  • Metrics module tests
  • Notify HTTP sender tests
  • WebRTC tests
  • Integration protocol tests
  • RTSP multicast tests

Test Plan

  • go build ./... passes
  • go test -race ./module/dvr/ — 12 tests pass
  • go test -race ./module/sipgateway/ — 14 tests pass
  • go test -race ./module/api/ — all pass
  • go test -race ./module/cluster/ — relay pool + health tests pass
  • Full E2E with ffmpeg push/pull (requires running server)

im-pingo added 6 commits May 24, 2026 23:56
- SDP builder: add AAC clockrate fallback to 44100 when MediaInfo.SampleRate is unset
- RTMP handler: populate VideoSequenceHeader, AudioSequenceHeader, SampleRate, and Channels
  from incoming sequence header frames so downstream consumers (RTSP SDP, recordings) work
- MP4 muxer: update videoCodec/audioCodec from sequence header frames so buildStsd
  correctly generates mp4a+esds box (was producing unknown codec)

Also adds the new pkg/muxer/mp4 package (classic MP4 with moov atom) from Phase 5.
…on pool

Phase 6 core features:
- SIGHUP-based config hot-reload with atomic.Pointer for thread-safe swaps
- Reloadable module interface for live config updates
- Cluster HealthTracker with passive failure tracking and active TCP recovery
- RelayPool per-host semaphore limiting concurrent relay connections
- Integrated health filtering and pool gating into forward/origin managers
B2BUA gateway bridges SIP calls to LiveForge streams via RTP. Inbound
INVITE creates a stream and publishes decoded audio; outbound Dial
subscribes to a stream and sends packetized RTP. Includes codec
negotiation (PCMA/PCMU/opus/G722), port allocation, max-call limits,
and 14 passing tests with race detection.
Implements file-based DVR with configurable rolling window. The module
subscribes to stream RingBuffers, writes TS segments to disk, and serves
HLS playlists with EXT-X-PROGRAM-DATE-TIME for seek support. Includes
automatic cleanup of expired segments and seamless republish handling.
…ements

Adds ?q= query parameter to /api/v1/streams for substring filtering,
new /api/v1/dvr/status endpoint exposing active DVR sessions, and
ModuleByName lookup on core.Server. Console UI gains a search input
for streams and a DVR sessions stat card.
…CI/CD

RTSP: UDP multicast transport support with configurable TTL and base port.
Recording: classic MP4 writer (moov atom), TS/HLS segment recording.
WebRTC: H.265 compatibility in WHEP handler.
TS muxer: pre-allocated buffers to reduce allocations.
Tests: metrics, notify, SIP dispatch/transaction, WebRTC, integration.
CI/CD: GitHub Actions workflows for test/build/release, golangci-lint config.
Infrastructure: sync.Pool utilities, DVR SessionStatus export.
@im-pingo
im-pingo merged commit 67a84ab into main May 27, 2026
1 of 4 checks passed
@im-pingo
im-pingo deleted the feat/engineering-infrastructure branch May 27, 2026 17:04
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.

1 participant