Merge branch 'master' into new-ui

This commit is contained in:
Scott Lamb 2021-02-22 13:48:20 -08:00
commit 9706dcaba1
3 changed files with 17 additions and 16 deletions

View File

@ -113,21 +113,21 @@ The `application/json` response will have a dict as follows:
* `rtsp_url`
* `signals`: a list of all *signals* known to the server. Each is a dictionary
with the following properties:
* `id`: an integer identifier.
* `shortName`: a unique, human-readable description of the signal
* `cameras`: a map of associated cameras' UUIDs to the type of association:
`direct` or `indirect`. See `db/schema.sql` for more description.
* `type`: a UUID, expected to match one of `signalTypes`.
* `days`: as in `cameras.streams.days` above.
* `id`: an integer identifier.
* `shortName`: a unique, human-readable description of the signal
* `cameras`: a map of associated cameras' UUIDs to the type of association:
`direct` or `indirect`. See `db/schema.sql` for more description.
* `type`: a UUID, expected to match one of `signalTypes`.
* `days`: as in `cameras.streams.days` above.
**status: unimplemented**
* `signalTypes`: a list of all known signal types.
* `uuid`: in text format.
* `states`: a map of all possible states of the enumeration to more
information about them:
* `color`: a recommended color to use in UIs to represent this state,
as in the [HTML specification](https://html.spec.whatwg.org/#colours).
* `motion`: if present and true, directly associated cameras will be
considered to have motion when this signal is in this state.
* `uuid`: in text format.
* `states`: a map of all possible states of the enumeration to more
information about them:
* `color`: a recommended color to use in UIs to represent this state,
as in the [HTML specification](https://html.spec.whatwg.org/#colours).
* `motion`: if present and true, directly associated cameras will be
considered to have motion when this signal is in this state.
* `session`: if logged in, a dict with the following properties:
* `username`
* `csrf`: a cross-site request forgery token for use in `POST` requests.
@ -299,6 +299,7 @@ arbitrary order. Each recording object has the following properties:
map.mp4` URL.
* `videoSamples`: the number of samples (aka frames) of video in this
recording.
* `sampleFileBytes`: the number of bytes of video in this recording.
Under the property `videoSampleEntries`, an object mapping ids to objects with
the following properties:
@ -331,7 +332,7 @@ Example response:
"startTime90k": 130985461191810,
"endTime90k": 130985466591817,
"sampleFileBytes": 8405564,
"videoSampleEntryId": "1",
"videoSampleEntryId": 1,
},
{
"endTime90k": 130985461191810,

View File

@ -440,7 +440,7 @@ pub struct Recording {
pub end_time_90k: i64,
pub sample_file_bytes: i64,
pub video_samples: i64,
pub video_sample_entry_id: String,
pub video_sample_entry_id: i32,
pub start_id: i32,
pub open_id: u32,

View File

@ -712,7 +712,7 @@ impl Service {
open_id: row.open_id,
first_uncommitted: row.first_uncommitted,
video_samples: row.video_samples,
video_sample_entry_id: row.video_sample_entry_id.to_string(),
video_sample_entry_id: row.video_sample_entry_id,
growing: row.growing,
});
if !out