Skip to content

Commit

Permalink
uuid v7 (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwsw authored Apr 7, 2024
1 parent c0c4c90 commit 97997d5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ savant_core = { path = "savant_core" }
savant_core_py = { path = "savant_core_py" }

[workspace.package]
version = "0.2.18"
version = "0.2.19"
edition = "2021"
authors = ["Ivan Kudriavtsev <[email protected]>"]
description = "Savant Rust core functions library"
Expand All @@ -21,7 +21,7 @@ repository = "https://github.com/insight-platform/savant-rs"
readme = "README.md"
keywords = ["computer-vision", "video-processing"]
categories = ["algorithms", "data-structures", "computer-vision"]
license="Apache-2.0"
license = "Apache-2.0"
rust-version = "1.70"


Expand Down
10 changes: 5 additions & 5 deletions savant_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version.workspace = true
edition.workspace = true
authors.workspace = true
description.workspace = true
homepage.workspace = true
homepage.workspace = true
repository.workspace = true
readme.workspace = true
keywords.workspace = true
Expand All @@ -23,17 +23,17 @@ derive_builder = "0.13"
evalexpr = { version = "11", features = ["rand", "regex_support"] }
etcd_dynamic_state = "0.2.10"
geo = "0.26"
hashbrown = { version = "0.14", features = ["raw", "serde"]}
hashbrown = { version = "0.14", features = ["raw", "serde"] }
jmespath = { version = "0.3", features = ["sync"] }
lazy_static = "1.4"
libloading = "0.8"
log = "0.4"
lru = {version = "0.12", features = ["hashbrown"] }
lru = { version = "0.12", features = ["hashbrown"] }
opentelemetry = "0.21"
opentelemetry_sdk = "0.21"
opentelemetry-stdout = { version = "0.2", features = ["trace"] }
opentelemetry-jaeger = "0.20"
parking_lot = {version = "0.12", features = ["deadlock_detection"]}
parking_lot = { version = "0.12", features = ["deadlock_detection"] }
prost = "0.12"
prost-types = "0.12"
rayon = "1.8"
Expand All @@ -42,7 +42,7 @@ serde_json = "1.0"
serde_yaml = "0.9"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1"
uuid = {version = "1.7", features = ["fast-rng", "v4"]}
uuid = { version = "1.7", features = ["fast-rng", "v7"] }
zmq = "0.10"

[dependencies.tokio]
Expand Down
2 changes: 1 addition & 1 deletion savant_core/src/primitives/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ impl Default for VideoFrame {
previous_frame_seq_id: None,
previous_keyframe: None,
source_id: String::new(),
uuid: Uuid::new_v4().as_u128(),
uuid: Uuid::now_v7().as_u128(),
creation_timestamp_ns: SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
Expand Down
5 changes: 3 additions & 2 deletions savant_core/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ use crate::primitives::object::{
};
use crate::primitives::{RBBox, WithAttributes};
use std::sync::Arc;

pub fn gen_empty_frame() -> VideoFrameProxy {
VideoFrameProxy::from_inner(
VideoFrameBuilder::default()
.source_id("test".to_string())
.pts(0)
.framerate("test".to_string())
.width(0)
.uuid(uuid::Uuid::new_v4().as_u128())
.uuid(uuid::Uuid::now_v7().as_u128())
.height(0)
.content(Arc::new(VideoFrameContent::None))
.transcoding_method(VideoFrameTranscodingMethod::Copy)
Expand All @@ -33,7 +34,7 @@ pub fn gen_frame() -> VideoFrameProxy {
.pts(1000000)
.framerate("test".to_string())
.width(1280)
.uuid(uuid::Uuid::new_v4().as_u128())
.uuid(uuid::Uuid::now_v7().as_u128())
.height(720)
.content(Arc::new(VideoFrameContent::None))
.transcoding_method(VideoFrameTranscodingMethod::Copy)
Expand Down

0 comments on commit 97997d5

Please sign in to comment.