mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-12-05 07:12:34 -05:00
update several dependencies
I left serde alone because uuid hasn't been updated for the new version.
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
use error::{Error, ResultExt};
|
||||
use fnv;
|
||||
use lru_cache::LruCache;
|
||||
use openssl::crypto::hash;
|
||||
use openssl::hash;
|
||||
use recording::{self, TIME_UNITS_PER_SEC};
|
||||
use rusqlite;
|
||||
use std::collections::BTreeMap;
|
||||
@@ -1066,7 +1066,7 @@ impl LockedDatabase {
|
||||
/// Inserts the specified video sample entry if absent.
|
||||
/// On success, returns the id of a new or existing row.
|
||||
pub fn insert_video_sample_entry(&mut self, w: u16, h: u16, data: &[u8]) -> Result<i32, Error> {
|
||||
let sha1 = hash::hash(hash::Type::SHA1, data)?;
|
||||
let sha1 = hash::hash(hash::MessageDigest::sha1(), data)?;
|
||||
let mut sha1_bytes = [0u8; 20];
|
||||
sha1_bytes.copy_from_slice(&sha1);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ use db;
|
||||
use error::Error;
|
||||
use libc;
|
||||
use recording;
|
||||
use openssl::crypto::hash;
|
||||
use openssl::hash;
|
||||
use std::cmp;
|
||||
use std::ffi;
|
||||
use std::fs;
|
||||
@@ -526,7 +526,7 @@ impl<'a> Writer<'a> {
|
||||
index: recording::SampleIndexEncoder::new(),
|
||||
uuid: uuid,
|
||||
corrupt: false,
|
||||
hasher: hash::Hasher::new(hash::Type::SHA1)?,
|
||||
hasher: hash::Hasher::new(hash::MessageDigest::sha1())?,
|
||||
prev_end: prev.map(|p| p.end_time),
|
||||
local_start: recording::Time(i64::max_value()),
|
||||
adjuster: ClockAdjuster::new(prev.map(|p| p.local_time_delta.0)),
|
||||
|
||||
@@ -87,7 +87,7 @@ use http_entity;
|
||||
use hyper::header;
|
||||
use mmapfile;
|
||||
use mime;
|
||||
use openssl::crypto::hash;
|
||||
use openssl::hash;
|
||||
use pieces;
|
||||
use pieces::ContextWriter;
|
||||
use pieces::Slices;
|
||||
@@ -569,7 +569,7 @@ impl Mp4FileBuilder {
|
||||
/// Builds the `Mp4File`, consuming the builder.
|
||||
pub fn build(mut self, db: Arc<db::Database>, dir: Arc<dir::SampleFileDir>) -> Result<Mp4File> {
|
||||
let mut max_end = None;
|
||||
let mut etag = hash::Hasher::new(hash::Type::SHA1)?;
|
||||
let mut etag = hash::Hasher::new(hash::MessageDigest::sha1())?;
|
||||
etag.update(&FORMAT_VERSION[..])?;
|
||||
if self.include_timestamp_subtitle_track {
|
||||
etag.update(b":ts:")?;
|
||||
@@ -1188,7 +1188,7 @@ mod tests {
|
||||
use error::Error;
|
||||
use ffmpeg;
|
||||
use hyper::header;
|
||||
use openssl::crypto::hash;
|
||||
use openssl::hash;
|
||||
use recording::{self, TIME_UNITS_PER_SEC};
|
||||
use http_entity::{self, Entity};
|
||||
use std::fs;
|
||||
@@ -1207,7 +1207,7 @@ mod tests {
|
||||
struct Sha1(hash::Hasher);
|
||||
|
||||
impl Sha1 {
|
||||
fn new() -> Sha1 { Sha1(hash::Hasher::new(hash::Type::SHA1).unwrap()) }
|
||||
fn new() -> Sha1 { Sha1(hash::Hasher::new(hash::MessageDigest::sha1()).unwrap()) }
|
||||
fn finish(mut self) -> Vec<u8> { self.0.finish().unwrap() }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user