mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-10 05:59:44 -05:00
support --rtsp-library=retina (#37)
This isn't well-tested and doesn't yet support an initial connection timeout. But in a quick test, it successfully returns video! I'd like to do some more aggressive code restructuring for zero-copy and to have only one writer thread per sample file directory (rather than the syncer thread + one writer thread per RTSP stream). But I'll likely wait until I drop support for ffmpeg entirely.
This commit is contained in:
@@ -350,8 +350,8 @@ pub struct Camera {
|
||||
pub short_name: String,
|
||||
pub description: String,
|
||||
pub onvif_host: String,
|
||||
pub username: String,
|
||||
pub password: String,
|
||||
pub username: Option<String>,
|
||||
pub password: Option<String>,
|
||||
pub streams: [Option<i32>; 2],
|
||||
}
|
||||
|
||||
@@ -500,8 +500,8 @@ pub struct CameraChange {
|
||||
pub short_name: String,
|
||||
pub description: String,
|
||||
pub onvif_host: String,
|
||||
pub username: String,
|
||||
pub password: String,
|
||||
pub username: Option<String>,
|
||||
pub password: Option<String>,
|
||||
|
||||
/// `StreamType t` is represented by `streams[t.index()]`. A default StreamChange will
|
||||
/// correspond to no stream in the database, provided there are no existing recordings for that
|
||||
@@ -2361,8 +2361,8 @@ mod tests {
|
||||
camera_id = row.id;
|
||||
assert_eq!(uuid, row.uuid);
|
||||
assert_eq!("test-camera", row.onvif_host);
|
||||
assert_eq!("foo", row.username);
|
||||
assert_eq!("bar", row.password);
|
||||
assert_eq!(Some("foo"), row.username.as_deref());
|
||||
assert_eq!(Some("bar"), row.password.as_deref());
|
||||
//assert_eq!("/main", row.main_rtsp_url);
|
||||
//assert_eq!("/sub", row.sub_rtsp_url);
|
||||
//assert_eq!(42, row.retain_bytes);
|
||||
@@ -2513,8 +2513,8 @@ mod tests {
|
||||
short_name: "testcam".to_owned(),
|
||||
description: "".to_owned(),
|
||||
onvif_host: "test-camera".to_owned(),
|
||||
username: "foo".to_owned(),
|
||||
password: "bar".to_owned(),
|
||||
username: Some("foo".to_owned()),
|
||||
password: Some("bar".to_owned()),
|
||||
streams: [
|
||||
StreamChange {
|
||||
sample_file_dir_id: Some(sample_file_dir_id),
|
||||
|
||||
@@ -84,8 +84,8 @@ impl<C: Clocks + Clone> TestDb<C> {
|
||||
short_name: "test camera".to_owned(),
|
||||
description: "".to_owned(),
|
||||
onvif_host: "test-camera".to_owned(),
|
||||
username: "foo".to_owned(),
|
||||
password: "bar".to_owned(),
|
||||
username: Some("foo".to_owned()),
|
||||
password: Some("bar".to_owned()),
|
||||
streams: [
|
||||
db::StreamChange {
|
||||
sample_file_dir_id: Some(sample_file_dir_id),
|
||||
|
||||
Reference in New Issue
Block a user