9130: Extend API to support streaming dummy audio sources #1
@ -38,10 +38,10 @@ udpMaxPayloadSize: 1472
|
|||||||
externalAuthenticationURL:
|
externalAuthenticationURL:
|
||||||
|
|
||||||
# Enable the HTTP API.
|
# Enable the HTTP API.
|
||||||
api: no
|
api: yes
|
||||||
|
|
||||||
# Enable Prometheus-compatible metrics.
|
# Enable Prometheus-compatible metrics.
|
||||||
metrics: no
|
metrics: yes
|
||||||
|
|
||||||
# Enable pprof-compatible endpoint to monitor performances.
|
# Enable pprof-compatible endpoint to monitor performances.
|
||||||
pprof: no
|
pprof: no
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#! /usr/bin/env python3
|
#! /usr/bin/env python3
|
||||||
|
|
||||||
|
import requests
|
||||||
import SoapySDR as soapy
|
import SoapySDR as soapy
|
||||||
from radio import Radio
|
from radio import Radio
|
||||||
from tuuube import Tuuube
|
from tuuube import Tuuube
|
||||||
@ -13,9 +14,29 @@ swag = Swagger(app)
|
|||||||
|
|
||||||
radios = {}
|
radios = {}
|
||||||
|
|
||||||
|
@app.route('/report')
|
||||||
|
def report():
|
||||||
|
"""Get streams report from the RTSP relay.
|
||||||
|
---
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: JSON
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
r = requests.get("http://localhost:9997/v1/paths/list")
|
||||||
|
j = r.json()
|
||||||
|
for item in j['items']:
|
||||||
|
del j['items'][item]['conf']
|
||||||
|
del j['items'][item]['confName']
|
||||||
|
|
||||||
|
|
||||||
|
return jsonify(j)
|
||||||
|
except:
|
||||||
|
return "Shat the bed", 500
|
||||||
|
|
||||||
|
|
||||||
@app.route('/radio/report')
|
@app.route('/radio/report')
|
||||||
def report():
|
def radio_report():
|
||||||
"""List radio devices available to the system.
|
"""List radio devices available to the system.
|
||||||
---
|
---
|
||||||
responses:
|
responses:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user