robotastic / trunk-recorder

Records calls from a Trunked Radio System (P25 & SmartNet)
GNU General Public License v3.0
827 stars 191 forks source link

simplestream updates to send variable-length JSON metadata along with streaming audio packets #891

Closed aaknitt closed 6 months ago

aaknitt commented 6 months ago

Added 'sendJSON' configuration to simplestream plugin.

When set to true, JSON metadata that contains talkgroup, freq, src, patched_talkgroups, and audio_sample_rate fields will be prepended to each audio packet. Length of the JSON metadata will be prepended (4 bytes, little endian) to the metadata.

sendJSON will override the older sendTGID parameter (deprecated).

example_audio_player.py updated to support receiving & acting on JSON metadata.

robotastic commented 6 months ago

Looks good!