store full rtsp urls

My dad's "GW-GW4089IP" cameras use separate ports for the main and sub
streams:

rtsp://192.168.1.110:5050/H264?channel=0&subtype=0&unicast=true&proto=Onvif
rtsp://192.168.1.110:5049/H264?channel=0&subtype=1&unicast=true&proto=Onvif

Previously I could get one of the streams to work by including :5050 or
:5049 in the host field of the camera. But not both. Now make the
camera's host field reflect the ONVIF port (which is also non-standard
on these cameras, :85). It's not directly used yet but probably will be
sooner or later. Make each stream know its full URL.
This commit is contained in:
Scott Lamb
2019-06-30 23:54:52 -05:00
parent afe693ef95
commit a9f64798d6
9 changed files with 148 additions and 68 deletions

View File

@@ -76,7 +76,7 @@ The `application/json` response will have a dict as follows:
a dictionary describing the configuration of the camera:
* `username`
* `password`
* `host`
* `onvif_host`
* `streams`: a dict of stream type ("main" or "sub") to a dictionary
describing the stream:
* `retainBytes`: the configured total number of bytes of completed
@@ -136,7 +136,7 @@ Example response:
"shortName": "driveway",
"description": "Hikvision DS-2CD2032 overlooking the driveway from east",
"config": {
"host": "192.168.1.100",
"onvif_host": "192.168.1.100",
"user": "admin",
"password": "12345",
},