Exemple #1
0
 public VideoProfile(
     string codec,
     BitRate bitRate,
     int width,
     int height)
 {
     Codec   = codec;
     BitRate = bitRate;
     Width   = width;
     Height  = height;
 }
Exemple #2
0
        public AudioProfile(
            string codec,
            BitRate bitRate,
            SampleFormat sampleFormat = default,
            int?sampleRate            = null)
        {
            if (string.IsNullOrEmpty(codec))
            {
                throw new ArgumentException("Required", nameof(codec));
            }

            if (sampleRate is int sr && sr <= 0)
            {
                throw new ArgumentOutOfRangeException("Must be > 0", sampleRate.Value, nameof(sampleRate));
            }

            Codec        = codec;
            BitRate      = bitRate;
            SampleFormat = sampleFormat;
            SampleRate   = sampleRate;
        }