From 707753af83b218348f8a8dd26627d1d82a6936ae Mon Sep 17 00:00:00 2001 From: jonay2000 Date: Thu, 25 Aug 2022 00:33:36 +0200 Subject: [PATCH] add option to specify fps --- src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 3d00c3c..5c59436 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -58,10 +58,14 @@ impl Mp4Muxer { } pub fn write_video(&self, data: &[u8]) { + self.write_video_with_fps(data, 60) + } + + pub fn write_video_with_fps(&self, data: &[u8], fps: u32) { unsafe { write_mp4( self.muxer_writer, - 60, + fps as c_int, data.as_ptr() as *const c_void, data.len().try_into().unwrap(), );