build fixes
This commit is contained in:
parent
0422593ec6
commit
d43e09d959
|
@ -365,7 +365,7 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"num",
|
"num",
|
||||||
"owning_ref",
|
"owning_ref",
|
||||||
"time 0.3.31",
|
"time 0.3.36",
|
||||||
"unicode-segmentation",
|
"unicode-segmentation",
|
||||||
"unicode-width",
|
"unicode-width",
|
||||||
"xi-unicode",
|
"xi-unicode",
|
||||||
|
@ -1312,6 +1312,12 @@ dependencies = [
|
||||||
"num-traits",
|
"num-traits",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-conv"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-integer"
|
name = "num-integer"
|
||||||
version = "0.1.45"
|
version = "0.1.45"
|
||||||
|
@ -2155,13 +2161,14 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "time"
|
name = "time"
|
||||||
version = "0.3.31"
|
version = "0.3.36"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e"
|
checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"deranged",
|
"deranged",
|
||||||
"itoa",
|
"itoa",
|
||||||
"libc",
|
"libc",
|
||||||
|
"num-conv",
|
||||||
"num_threads",
|
"num_threads",
|
||||||
"powerfmt",
|
"powerfmt",
|
||||||
"serde",
|
"serde",
|
||||||
|
@ -2177,10 +2184,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "time-macros"
|
name = "time-macros"
|
||||||
version = "0.2.16"
|
version = "0.2.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f"
|
checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"num-conv",
|
||||||
"time-core",
|
"time-core",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ pub struct VideoFrame {
|
||||||
|
|
||||||
/// An estimate of the duration of the frame, or zero.
|
/// An estimate of the duration of the frame, or zero.
|
||||||
/// This can be deceptive and is only used by some testing code.
|
/// This can be deceptive and is only used by some testing code.
|
||||||
|
#[cfg(test)]
|
||||||
pub duration: i32,
|
pub duration: i32,
|
||||||
|
|
||||||
pub is_key: bool,
|
pub is_key: bool,
|
||||||
|
@ -262,6 +263,7 @@ impl Stream for RetinaStream {
|
||||||
})?;
|
})?;
|
||||||
Ok(VideoFrame {
|
Ok(VideoFrame {
|
||||||
pts: frame.timestamp().elapsed(),
|
pts: frame.timestamp().elapsed(),
|
||||||
|
#[cfg(test)]
|
||||||
duration: 0,
|
duration: 0,
|
||||||
is_key: frame.is_random_access_point(),
|
is_key: frame.is_random_access_point(),
|
||||||
data: frame.into_data().into(),
|
data: frame.into_data().into(),
|
||||||
|
@ -345,6 +347,7 @@ pub mod testutil {
|
||||||
self.next_sample_id += 1;
|
self.next_sample_id += 1;
|
||||||
Ok(VideoFrame {
|
Ok(VideoFrame {
|
||||||
pts: sample.start_time as i64,
|
pts: sample.start_time as i64,
|
||||||
|
#[cfg(test)]
|
||||||
duration: sample.duration as i32,
|
duration: sample.duration as i32,
|
||||||
is_key: sample.is_sync,
|
is_key: sample.is_sync,
|
||||||
data: sample.bytes,
|
data: sample.bytes,
|
||||||
|
|
Loading…
Reference in New Issue