Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
        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;
        }
Ejemplo n.º 5
0
        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;
        }
Ejemplo n.º 6
0
        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;
        }
Ejemplo n.º 7
0
        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;
        }