How openipc/divinus works
Divinus is a multi-platform camera streamer. Its main workflow loads configuration, starts networking and server services, initializes the SoC SDK and media capture, then exposes configured streams and camera features. The graph groups the chip-specific HAL implementations together and retains the documented streaming, snapshot, overlay, recording, ONVIF, and night-mode capabilities. Relationships beyond the shown startup calls are dashed where their runtime wiring was not excerpted; unsampled implementation details are not asserted.
Main entry points: main.c Startup and lifecycle · media.c Media capture and control · network.c Network services · http_post.c HTTP image posting
Components 25
Application runtime
- Startup and lifecycle
src/main.c - Application configuration
src/app_config.c
Camera hardware
- SoC hardware abstraction
src/hal/support.c - Chip-family HALs
src/hal
Media delivery
- Media capture and control
src/media.c - Stream handling
src/stream.c - MP4 and FLV formats
src/fmt - JPEG snapshots
src/jpeg.c - MP3 encoding
src/lib/shine/layer3.c - Segment recording
src/record.c - HTTP image posting
src/http_post.c
Network services
- Web server
src/server.c - Network services
src/network.c - Service discovery
src/lib/tinysvcmdns.c - ONVIF
src/onvif.c - RTSP control
src/rtsp/rtsp.c - RTP media transport
src/rtsp/rtp.c
Camera features
- On-screen overlays
src/region.c - Night mode
src/night.c - Watchdog
src/watchdog.c - PNG decoding
src/lib/spng.c - Compression support
src/lib/miniz/miniz.c
Other components
- Camera operator
- Stream client
- HTTP endpoint
Connections 27
- Camera operator → Startup and lifecycle: starts
src/main.c - Startup and lifecycle → Application configuration: loads
src/main.c - Startup and lifecycle → Network services: starts
src/main.c - Startup and lifecycle → Web server: starts
src/main.c - Startup and lifecycle → Media capture and control: starts
src/main.c - Startup and lifecycle → RTSP control: creates
src/main.c - Startup and lifecycle → SoC hardware abstraction: starts SDK
src/main.c - Startup and lifecycle → Night mode: enables
src/main.c - Startup and lifecycle → On-screen overlays: starts
src/main.c - Startup and lifecycle → HTTP image posting: starts
src/main.c - Startup and lifecycle → Segment recording: starts
src/main.c - Network services → Service discovery: may use
- Network services → ONVIF: may serve
- Media capture and control → Chip-family HALs: captures via
- SoC hardware abstraction → Chip-family HALs: selects implementation
- Media capture and control → Stream handling: produces streams
- RTSP control → RTP media transport: dispatches media
- Media capture and control → MP4 and FLV formats: supports fMP4
- Media capture and control → JPEG snapshots: supports snapshots
- Media capture and control → MP3 encoding: encodes audio
- Web server → Segment recording: offers recording
- Media capture and control → HTTP image posting: may post images
- On-screen overlays → PNG decoding: may decode overlays
- PNG decoding → Compression support: uses compression
- Stream client → RTSP control: requests stream
- HTTP image posting → HTTP endpoint: posts images
- Startup and lifecycle → Watchdog: may start