Files
DarkRoom/third_party/rawler-0.7.2/src/formats/bmff/dinf.rs
T
dtourolle 77a1925bac 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.
2026-09-27 17:33:19 -04:00

25 lines
655 B
Rust

// 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 })
}
}