alfg / alfg/mp4-rust

Mp4Writer track_id.

Open
#140 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
355
Forks
105
PR merge metrics
No merged PRs in 30d

Description

When adding a new track to Mp4Writer, is it better that returns track_id? so that with the track_id, a user can call write_sample conveniently. otherwise a user have to keep order of adding track, and using the sequence number as the track_id.

pub fn add_track(&mut self, config: &TrackConfig) -> Result {
let track_id = self.tracks.len() as u32 + 1;
let track = Mp4TrackWriter::new(track_id, config)?;
self.tracks.push(track);
Ok((self.tracks.len() + 1) as u32)
}

Thanks.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.