Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mp4Writer track_id. #140

Open
qianzhang5 opened this issue May 18, 2024 · 0 comments
Open

Mp4Writer track_id. #140

qianzhang5 opened this issue May 18, 2024 · 0 comments

Comments

@qianzhang5
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant