aboutsummaryrefslogtreecommitdiff
path: root/common/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/lib.rs')
-rw-r--r--common/src/lib.rs18
1 files changed, 17 insertions, 1 deletions
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,
+}