X-Git-Url: https://git.nihav.org/?p=nihav-tool.git;a=blobdiff_plain;f=src%2Ffrmwriter.rs;h=a9c0612d81e0c438f862817a175ebb42988537de;hp=c743fc0132fbf5f6fae2bc44898c16dd73ec0ed1;hb=125ba9b318a96ff30375425e937588b0bd247f35;hpb=3daa5fbb2446bdb3a9578e5b6628b8308ca3fe5f;ds=sidebyside diff --git a/src/frmwriter.rs b/src/frmwriter.rs index c743fc0..a9c0612 100644 --- a/src/frmwriter.rs +++ b/src/frmwriter.rs @@ -3,9 +3,8 @@ extern crate nihav_core; use nihav_core::frame::*; use std::io::prelude::*; use std::fs::File; -use std::cell::Ref; -pub fn write_pgmyuv(pfx: &str, strno: usize, num: u64, frm: Ref) { +pub fn write_pgmyuv(pfx: &str, strno: usize, num: u64, frm: NAFrameRef) { if let NABufferType::None = frm.get_buffer() { return; } let name = format!("{}out{:02}_{:08}.pgm", pfx, strno, num); let mut ofile = File::create(name).unwrap(); @@ -64,7 +63,7 @@ pub fn write_pgmyuv(pfx: &str, strno: usize, num: u64, frm: Ref) { } } -pub fn write_palppm(pfx: &str, strno: usize, num: u64, frm: Ref) { +pub fn write_palppm(pfx: &str, strno: usize, num: u64, frm: NAFrameRef) { let name = format!("{}out{:02}_{:08}.ppm", pfx, strno, num); let mut ofile = File::create(name).unwrap(); let buf = frm.get_buffer().get_vbuf().unwrap(); @@ -95,7 +94,7 @@ pub fn write_palppm(pfx: &str, strno: usize, num: u64, frm: Ref) { } } -pub fn write_ppm(pfx: &str, strno: usize, num: u64, frm: Ref) { +pub fn write_ppm(pfx: &str, strno: usize, num: u64, frm: NAFrameRef) { let name = format!("{}out{:02}_{:08}.ppm", pfx, strno, num); let mut ofile = File::create(name).unwrap(); if let NABufferType::VideoPacked(ref buf) = frm.get_buffer() {