mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-01-24 13:13:16 -05:00
Merge branch 'master' into new-ui
This commit is contained in:
commit
9706dcaba1
@ -113,21 +113,21 @@ The `application/json` response will have a dict as follows:
|
|||||||
* `rtsp_url`
|
* `rtsp_url`
|
||||||
* `signals`: a list of all *signals* known to the server. Each is a dictionary
|
* `signals`: a list of all *signals* known to the server. Each is a dictionary
|
||||||
with the following properties:
|
with the following properties:
|
||||||
* `id`: an integer identifier.
|
* `id`: an integer identifier.
|
||||||
* `shortName`: a unique, human-readable description of the signal
|
* `shortName`: a unique, human-readable description of the signal
|
||||||
* `cameras`: a map of associated cameras' UUIDs to the type of association:
|
* `cameras`: a map of associated cameras' UUIDs to the type of association:
|
||||||
`direct` or `indirect`. See `db/schema.sql` for more description.
|
`direct` or `indirect`. See `db/schema.sql` for more description.
|
||||||
* `type`: a UUID, expected to match one of `signalTypes`.
|
* `type`: a UUID, expected to match one of `signalTypes`.
|
||||||
* `days`: as in `cameras.streams.days` above.
|
* `days`: as in `cameras.streams.days` above.
|
||||||
**status: unimplemented**
|
**status: unimplemented**
|
||||||
* `signalTypes`: a list of all known signal types.
|
* `signalTypes`: a list of all known signal types.
|
||||||
* `uuid`: in text format.
|
* `uuid`: in text format.
|
||||||
* `states`: a map of all possible states of the enumeration to more
|
* `states`: a map of all possible states of the enumeration to more
|
||||||
information about them:
|
information about them:
|
||||||
* `color`: a recommended color to use in UIs to represent this state,
|
* `color`: a recommended color to use in UIs to represent this state,
|
||||||
as in the [HTML specification](https://html.spec.whatwg.org/#colours).
|
as in the [HTML specification](https://html.spec.whatwg.org/#colours).
|
||||||
* `motion`: if present and true, directly associated cameras will be
|
* `motion`: if present and true, directly associated cameras will be
|
||||||
considered to have motion when this signal is in this state.
|
considered to have motion when this signal is in this state.
|
||||||
* `session`: if logged in, a dict with the following properties:
|
* `session`: if logged in, a dict with the following properties:
|
||||||
* `username`
|
* `username`
|
||||||
* `csrf`: a cross-site request forgery token for use in `POST` requests.
|
* `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.
|
map.mp4` URL.
|
||||||
* `videoSamples`: the number of samples (aka frames) of video in this
|
* `videoSamples`: the number of samples (aka frames) of video in this
|
||||||
recording.
|
recording.
|
||||||
|
* `sampleFileBytes`: the number of bytes of video in this recording.
|
||||||
|
|
||||||
Under the property `videoSampleEntries`, an object mapping ids to objects with
|
Under the property `videoSampleEntries`, an object mapping ids to objects with
|
||||||
the following properties:
|
the following properties:
|
||||||
@ -331,7 +332,7 @@ Example response:
|
|||||||
"startTime90k": 130985461191810,
|
"startTime90k": 130985461191810,
|
||||||
"endTime90k": 130985466591817,
|
"endTime90k": 130985466591817,
|
||||||
"sampleFileBytes": 8405564,
|
"sampleFileBytes": 8405564,
|
||||||
"videoSampleEntryId": "1",
|
"videoSampleEntryId": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"endTime90k": 130985461191810,
|
"endTime90k": 130985461191810,
|
||||||
|
@ -440,7 +440,7 @@ pub struct Recording {
|
|||||||
pub end_time_90k: i64,
|
pub end_time_90k: i64,
|
||||||
pub sample_file_bytes: i64,
|
pub sample_file_bytes: i64,
|
||||||
pub video_samples: i64,
|
pub video_samples: i64,
|
||||||
pub video_sample_entry_id: String,
|
pub video_sample_entry_id: i32,
|
||||||
pub start_id: i32,
|
pub start_id: i32,
|
||||||
pub open_id: u32,
|
pub open_id: u32,
|
||||||
|
|
||||||
|
@ -712,7 +712,7 @@ impl Service {
|
|||||||
open_id: row.open_id,
|
open_id: row.open_id,
|
||||||
first_uncommitted: row.first_uncommitted,
|
first_uncommitted: row.first_uncommitted,
|
||||||
video_samples: row.video_samples,
|
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,
|
growing: row.growing,
|
||||||
});
|
});
|
||||||
if !out
|
if !out
|
||||||
|
Loading…
x
Reference in New Issue
Block a user