public void AddTrack(ITrack nuTrack)
{
// do some checking
// perhaps the movie needs to get longer!
if (GetTrackByTrackId(nuTrack.TrackMetaData.TrackId) != null)
{
// We already have a track with that trackId. Create a new one
nuTrack.TrackMetaData.TrackId = GetNextTrackId();
}
Tracks.Add(nuTrack);
}
public uint GetTimescale() => Tracks.Select(x=>x.TrackMetaData.Timescale).Aggregate((current, timescale) => Gcd(timescale, current));