Skip to content

Commit

Permalink
Merge pull request #2 from jonay2000/fps
Browse files Browse the repository at this point in the history
add option to specify fps
  • Loading branch information
darkskygit authored Aug 25, 2022
2 parents 515be07 + 707753a commit f3de131
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,14 @@ impl<W: Write + Seek> Mp4Muxer<W> {
}

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(),
);
Expand Down

0 comments on commit f3de131

Please # to comment.