Vendor rawler 0.7.2 unmodified
The crate as crates.io publishes it, minus .cargo-ok, its Cargo.lock and data/testdata (13 MB of sample files only its own tests read). Not yet routed through [patch.crates-io]; the next commit is the patch.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright 2020 Alfred Gutierrez
|
||||
// Copyright 2021 Daniel Vogelbacher <daniel@chaospixel.com>
|
||||
|
||||
use super::{BoxHeader, FourCC, ReadBox, Result};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::io::{Read, Seek, SeekFrom};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct DinfBox {
|
||||
pub header: BoxHeader,
|
||||
}
|
||||
|
||||
impl DinfBox {
|
||||
pub const TYP: FourCC = FourCC::with(['d', 'i', 'n', 'f']);
|
||||
}
|
||||
|
||||
impl<R: Read + Seek> ReadBox<&mut R> for DinfBox {
|
||||
fn read_box(reader: &mut R, header: BoxHeader) -> Result<Self> {
|
||||
reader.seek(SeekFrom::Start(header.end_offset()))?;
|
||||
|
||||
Ok(Self { header })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user