How this port works
The SG2002 has no vendor GStreamer stack; its camera and encoder are
reached through the Cvitek/Sophgo MPI (Media Processing Interface) SDK.
CameraStack handles platforms like this with a C producer: a custom
adapter, written in C straight against the vendor SDK, that owns the
media pipeline from sensor to hardware encoder and hands encoded video
to the portable core. RTSP streaming and the ONVIF
services run in the shared generic core which provides the core
feature set shared with every other platform.
The producer implements the vendor-specific feature set in full.
Encoder settings changed through ONVIF are applied live: frame rate and
bitrate change mid-stream with no disconnection, and
synchronisation-point requests map to on-demand IDR keyframes. JPEG
snapshots and OSD text overlay run through the same pipeline. And when
no client is connected the producer pauses the encoder entirely, so the
hardware codecs only run, and only draw power, while someone is
actually streaming.
Everything above the producer comes from the shared portable core, and
this port inherits it all for free: the full RTSP transport family
(interleaved TCP, UDP, HTTP tunnelling, WebSocket and multicast),
metadata streaming, and eight ONVIF services, Device, DeviceIO, Media,
Media2 (Profile S and Profile T), PTZ, Events, Imaging and Analytics.
Events include the ONVIF ImageTooDark tampering topic, and the PTZ
service made its CameraStack debut with this port.
Built on the Sophgo MPI SDK
The producer builds against the Cvitek/Sophgo MPI middleware, the same
SDK used across the CV180x, CV181x and SG200x parts.
Capture runs through VI, the video input module that owns the sensor
and ISP; VPSS, the video processing subsystem, scales and converts each
stream profile; and VENC drives the hardware H.264, H.265 and JPEG
encoders. The port is proven with live multi-profile streams from a
5 MP OV5647 sensor.