aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/Cargo.toml1
-rw-r--r--common/src/lib.rs18
2 files changed, 18 insertions, 1 deletions
diff --git a/common/Cargo.toml b/common/Cargo.toml
index de089d6..0557282 100644
--- a/common/Cargo.toml
+++ b/common/Cargo.toml
@@ -5,3 +5,4 @@ edition = "2021"
[dependencies]
serde = { version = "1.0.152", features = ["derive"] }
+bincode = { version = "2.0.0-rc.2", features = ["derive"] }
diff --git a/common/src/lib.rs b/common/src/lib.rs
index 0587613..08517c3 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -1,7 +1,11 @@
pub mod r#impl;
+use bincode::{Decode, Encode};
use serde::{Deserialize, Serialize};
-use std::{collections::BTreeMap, path::PathBuf};
+use std::{
+ collections::{BTreeMap, HashMap},
+ path::PathBuf,
+};
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct DirectoryInfo {
@@ -45,3 +49,15 @@ pub enum SourceTrackKind {
},
Subtitles,
}
+
+#[derive(Debug, Clone, Decode, Encode)]
+pub struct SeekIndex {
+ pub blocks: Vec<BlockIndex>,
+}
+
+#[derive(Debug, Clone, Decode, Encode)]
+pub struct BlockIndex {
+ pub pts: u64,
+ pub source_off: usize,
+ pub size: usize,
+}