diff options
Diffstat (limited to 'remuxer/src/lib.rs')
-rw-r--r-- | remuxer/src/lib.rs | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/remuxer/src/lib.rs b/remuxer/src/lib.rs index bc0aff7..21b41bb 100644 --- a/remuxer/src/lib.rs +++ b/remuxer/src/lib.rs @@ -7,17 +7,11 @@ use jellymatroska::{ block::Block, read::EbmlReader, unflatten::{Unflat, Unflatten}, - write::{write_vint, EbmlWriter}, + write::EbmlWriter, Master, MatroskaTag, }; -use log::{debug, error, info, trace, warn}; -use std::{ - collections::{BTreeMap, HashMap}, - fs::File, - io::Write, - path::PathBuf, - sync::Arc, -}; +use log::{debug, info, trace, warn}; +use std::{collections::BTreeMap, fs::File, io::Write, path::PathBuf, sync::Arc}; pub struct RemuxerContext {} @@ -29,7 +23,7 @@ impl RemuxerContext { pub fn generate_into( &self, writer: impl Write + 'static, - offset: usize, + _offset: usize, path_base: PathBuf, iteminfo: ItemInfo, selection: Vec<u64>, @@ -113,7 +107,7 @@ impl RemuxerContext { fn filter_segment( children: &mut Unflatten, writer: &mut EbmlWriter, - iteminfo: &ItemInfo, + _iteminfo: &ItemInfo, mapping: &BTreeMap<u64, u64>, ) -> Result<()> { while let Some(Ok(Unflat { children, item })) = children.next() { @@ -134,7 +128,7 @@ fn filter_segment( debug!("group"); let mut children = children.unwrap(); let mut group = vec![]; - while let Some(Ok(Unflat { children, item })) = children.next() { + while let Some(Ok(Unflat { children: _, item })) = children.next() { match item { MatroskaTag::Block(buf) => { let mut block = Block::parse(&buf)?; @@ -190,7 +184,11 @@ pub fn track_to_ebml(number: u64, track: &SourceTrack) -> MatroskaTag { els.push(MatroskaTag::DefaultDuration(*d)); } match track.kind { - SourceTrackKind::Video { width, height, fps } => { + SourceTrackKind::Video { + width, + height, + fps: _, + } => { els.push(MatroskaTag::TrackType(1)); els.push(MatroskaTag::DefaultDuration(41708333)); // TODO pls not hardcoded els.push(MatroskaTag::Video(Master::Collected(vec![ |