Commit eea174c4 authored by Vittorio Giovara's avatar Vittorio Giovara

Move VideoDetails from public api to cli-only

parent f3ad57bc
......@@ -22,29 +22,6 @@ use std::collections::BTreeSet;
const LOOKAHEAD_FRAMES: u64 = 10;
#[derive(Debug, Clone, Copy)]
pub struct VideoDetails {
pub width: usize,
pub height: usize,
pub bit_depth: usize,
pub chroma_sampling: ChromaSampling,
pub chroma_sample_position: ChromaSamplePosition,
pub time_base: Rational,
}
impl Default for VideoDetails {
fn default() -> Self {
VideoDetails {
width: 640,
height: 480,
bit_depth: 8,
chroma_sampling: ChromaSampling::Cs420,
chroma_sample_position: ChromaSamplePosition::Unknown,
time_base: Rational { num: 30, den: 1 }
}
}
}
// TODO: use the num crate?
#[derive(Clone, Copy, Debug)]
#[repr(C)]
......
......@@ -18,6 +18,7 @@ use std::sync::Arc;
use std::time::Instant;
use y4m;
use decoder::Decoder;
use decoder::VideoDetails;
pub struct EncoderIO {
pub input: Box<dyn Read>,
......
......@@ -17,3 +17,26 @@ pub enum DecodeError {
ParseError,
IoError(io::Error),
}
#[derive(Debug, Clone, Copy)]
pub struct VideoDetails {
pub width: usize,
pub height: usize,
pub bit_depth: usize,
pub chroma_sampling: ChromaSampling,
pub chroma_sample_position: ChromaSamplePosition,
pub time_base: Rational,
}
impl Default for VideoDetails {
fn default() -> Self {
VideoDetails {
width: 640,
height: 480,
bit_depth: 8,
chroma_sampling: ChromaSampling::Cs420,
chroma_sample_position: ChromaSamplePosition::Unknown,
time_base: Rational { num: 30, den: 1 }
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment