mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-24 22:25:55 -05:00
improve Reolink interoperability with new Retina
Attempt at #114 and #144. Let's see how much it helps.
This commit is contained in:
parent
6270cc0ee4
commit
5c3c61838f
@ -13,6 +13,8 @@ Each release is tagged in Git and on the Docker repository
|
||||
before.
|
||||
* fix [#147](https://github.com/scottlamb/moonfire-nvr/issues/147): confusing
|
||||
`nvr init` failures when using very old versions of SQLite.
|
||||
* improve compatibility with Reolink cameras when using the default
|
||||
`--rtsp-library=retina`.
|
||||
|
||||
## `v0.6.5` (2021-08-13)
|
||||
|
||||
|
5
server/Cargo.lock
generated
5
server/Cargo.lock
generated
@ -1870,9 +1870,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "retina"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90f1c5358f01c77609ea1b56b86b96ff3b14e2f535bdd51fc214144cf266738b"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/scottlamb/retina#6155d4ebcfe61ee92b1e7ebb5525436e89f23bf3"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bitreader",
|
||||
|
@ -46,7 +46,7 @@ nom = "6.0.0"
|
||||
parking_lot = { version = "0.11.1", features = [] }
|
||||
protobuf = { git = "https://github.com/stepancheg/rust-protobuf" }
|
||||
reffers = "0.6.0"
|
||||
retina = "0.1.0"
|
||||
retina = { git = "https://github.com/scottlamb/retina" }
|
||||
ring = "0.16.2"
|
||||
rusqlite = "0.25.3"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
@ -383,7 +383,14 @@ impl RetinaOpener {
|
||||
),
|
||||
Error,
|
||||
> {
|
||||
let mut session = retina::client::Session::describe(url, creds).await?;
|
||||
let mut session = retina::client::Session::describe(
|
||||
url,
|
||||
retina::client::SessionOptions::default()
|
||||
.creds(creds)
|
||||
.user_agent("Moonfire NVR".to_owned())
|
||||
.ignore_spurious_data(true), // TODO: make this configurable.
|
||||
)
|
||||
.await?;
|
||||
let (video_i, mut video_params) = session
|
||||
.streams()
|
||||
.iter()
|
||||
@ -394,7 +401,7 @@ impl RetinaOpener {
|
||||
})
|
||||
.ok_or_else(|| format_err!("couldn't find H.264 video stream"))?;
|
||||
session.setup(video_i).await?;
|
||||
let session = session.play(retina::client::PlayPolicy::default()).await?;
|
||||
let session = session.play(retina::client::PlayOptions::default()).await?;
|
||||
let mut session = Box::pin(session.demuxed()?);
|
||||
|
||||
// First frame.
|
||||
|
Loading…
Reference in New Issue
Block a user