public AviVideoStream(int index, IAviStreamWriteHandler writeHandler, int width, int height, BitsPerPixel bitsPerPixel) : base(index) { this.writeHandler = writeHandler; this.width = width; this.height = height; this.bitsPerPixel = bitsPerPixel; this.streamCodec = KnownFourCC.Codecs.Uncompressed; }
public AviVideoStream(int index, IAviStreamWriteHandler writeHandler, int width, int height, BitsPerPixel bitsPerPixel) : base(index) { Argument.IsNotNull(writeHandler, nameof(writeHandler)); Argument.IsPositive(width, nameof(width)); Argument.IsPositive(height, nameof(height)); Argument.IsEnumMember(bitsPerPixel, nameof(bitsPerPixel)); this.writeHandler = writeHandler; this.width = width; this.height = height; this.bitsPerPixel = bitsPerPixel; this.streamCodec = CodecIds.Uncompressed; }
public AviVideoStream(int index, IAviStreamWriteHandler writeHandler, int width, int height, BitsPerPixel bitsPerPixel) : base(index) { Contract.Requires(index >= 0); Contract.Requires(writeHandler != null); Contract.Requires(width > 0); Contract.Requires(height > 0); Contract.Requires(Enum.IsDefined(typeof(BitsPerPixel), bitsPerPixel)); this.writeHandler = writeHandler; this.width = width; this.height = height; this.bitsPerPixel = bitsPerPixel; this.streamCodec = KnownFourCCs.Codecs.Uncompressed; }
public AviAudioStream(int index, IAviStreamWriteHandler writeHandler, int channelCount, int samplesPerSecond, int bitsPerSample) : base(index) { Argument.IsNotNull(writeHandler, nameof(writeHandler)); this.writeHandler = writeHandler; this.format = AudioFormats.Pcm; this.formatData = null; this.channelCount = channelCount; this.samplesPerSecond = samplesPerSecond; this.bitsPerSample = bitsPerSample; this.granularity = (bitsPerSample * channelCount + 7) / 8; this.bytesPerSecond = granularity * samplesPerSecond; }
public AviAudioStream(int index, IAviStreamWriteHandler writeHandler, int channelCount, int samplesPerSecond, int bitsPerSample) : base(index) { Contract.Requires(index >= 0); Contract.Requires(writeHandler != null); this.writeHandler = writeHandler; this.format = AudioFormats.Pcm; this.formatData = null; this.channelCount = channelCount; this.samplesPerSecond = samplesPerSecond; this.bitsPerSample = bitsPerSample; this.granularity = (bitsPerSample * channelCount + 7) / 8; this.bytesPerSecond = granularity * samplesPerSecond; }