/// <summary> /// Initializes a new instance of the <see cref="Mpeg4"/> class. /// </summary> /// <param name="mpeg4Tag">The MPEG-4 tag object. This constructor is more efficient if an Mpeg4Tag object is /// available. Changes made to the Mpeg4Tag object will not affect the properties in this object.</param> internal Mpeg4(Mpeg4Tag mpeg4Tag) { _frequency = mpeg4Tag.Frequency; _channels = mpeg4Tag.Channels; _samples = mpeg4Tag.Samples; if (_frequency != 0) { _totalSeconds = (decimal)_samples / _frequency; if (_totalSeconds != 0) { _bitrate = mpeg4Tag.MdatAtomSize / _totalSeconds / 125.0m; } } }
/// <summary> /// Initializes a new instance of the <see cref="Mpeg4"/> class. /// </summary> /// <param name="mpeg4Tag">The MPEG-4 tag object. This constructor is more efficient if an Mpeg4Tag object is /// available. Changes made to the Mpeg4Tag object will not affect the properties in this object.</param> internal Mpeg4(Mpeg4Tag mpeg4Tag) { _frequency = mpeg4Tag.Frequency; _channels = mpeg4Tag.Channels; _samples = mpeg4Tag.Samples; if (_frequency != 0) { _totalSeconds = (decimal)_samples / _frequency; if (_totalSeconds != 0) { _bitrate = mpeg4Tag.MdatAtomSize / _totalSeconds / 125.0m; } } }