Ejemplo n.º 1
0
 /// <summary />
 public VideoStreamInfo(int itag, string url, long size, long bitrate, VideoResolution resolution, int framerate)
     : base(itag, url, size)
 {
     Bitrate           = bitrate.GuardNotNegative(nameof(bitrate));
     VideoEncoding     = GetVideoEncoding(itag);
     VideoQuality      = GetVideoQuality(itag);
     Resolution        = resolution;
     Framerate         = framerate.GuardNotNegative(nameof(framerate));
     VideoQualityLabel = VideoQuality.GetVideoQualityLabel(framerate);
 }
Ejemplo n.º 2
0
 /// <inheritdoc />
 public VideoStreamInfo(int itag, string url, long contentLength, long bitrate, VideoResolution videoResolution, double videoFramerate)
     : base(itag, url, contentLength)
 {
     Bitrate           = bitrate >= 0 ? bitrate : throw new ArgumentOutOfRangeException(nameof(bitrate));
     VideoEncoding     = GetVideoEncoding(itag);
     VideoQuality      = GetVideoQuality(itag);
     VideoResolution   = videoResolution;
     VideoFramerate    = videoFramerate >= 0 ? videoFramerate : throw new ArgumentOutOfRangeException(nameof(videoFramerate));
     VideoQualityLabel = GetVideoQualityLabel(VideoQuality, videoFramerate);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes an instance of <see cref="MuxedStreamInfo"/>.
 /// </summary>
 public MuxedStreamInfo(int itag, string url, Container container, long size, AudioEncoding audioEncoding,
                        VideoEncoding videoEncoding, string videoQualityLabel, VideoQuality videoQuality,
                        VideoResolution resolution)
     : base(itag, url, container, size)
 {
     AudioEncoding     = audioEncoding;
     VideoEncoding     = videoEncoding;
     VideoQualityLabel = videoQualityLabel.GuardNotNull(nameof(videoQualityLabel));
     VideoQuality      = videoQuality;
     Resolution        = resolution;
 }
Ejemplo n.º 4
0
 /// <summary />
 public VideoStreamInfo(int itag, string url, long size, long bitrate, VideoResolution resolution, int framerate,
                        string videoQualityLabel)
     : base(itag, url, size)
 {
     Bitrate           = bitrate.GuardNotNegative(nameof(bitrate));
     VideoEncoding     = ItagHelper.GetVideoEncoding(itag);
     Resolution        = resolution;
     Framerate         = framerate.GuardNotNegative(nameof(framerate));
     VideoQualityLabel = videoQualityLabel.GuardNotNull(nameof(videoQualityLabel));
     VideoQuality      = ParseVideoQualityFromLabel(videoQualityLabel);
 }
 /// <summary>
 /// Initializes an instance of <see cref="VideoStreamInfo"/>.
 /// </summary>
 public VideoStreamInfo(int itag, string url, Container container, long size, long bitrate,
                        VideoEncoding videoEncoding, string videoQualityLabel, VideoQuality videoQuality,
                        VideoResolution resolution, int framerate)
     : base(itag, url, container, size)
 {
     Bitrate           = bitrate.GuardNotNegative(nameof(bitrate));
     VideoEncoding     = videoEncoding;
     VideoQualityLabel = videoQualityLabel.GuardNotNull(nameof(videoQualityLabel));
     VideoQuality      = videoQuality;
     Resolution        = resolution;
     Framerate         = framerate.GuardNotNegative(nameof(framerate));
 }