Skip to content

Mp4Writer track_id. #140

@qianzhang5

Description

@qianzhang5

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions