Skip to content

v3.3.0: ManagedStream for self-healing RTP streams

Choose a tag to compare

@mijahauan mijahauan released this 18 Dec 19:02
· 154 commits to main since this release

New Features

  • ManagedStream class: Wraps RadiodStream with automatic drop detection and channel restoration when radiod restarts
  • StreamState enum: Track stream health (STOPPED, STARTING, HEALTHY, DROPPED, RESTORING)
  • ManagedStreamStats: Monitor drops, restorations, and healthy/dropped durations
  • Callbacks: Get notified on stream drop and restoration events

Usage

from ka9q import RadiodControl, ManagedStream

stream = ManagedStream(
    control=control,
    frequency_hz=14.074e6,
    preset='usb',
    sample_rate=12000,
    on_samples=callback,
    on_stream_dropped=on_drop,
    on_stream_restored=on_restore,
    drop_timeout_sec=3.0,
    restore_interval_sec=1.0,
)
channel = stream.start()

This enables robust streaming applications that automatically recover from radiod restarts without manual intervention.

Installation

pip install ka9q-python==3.3.0