예제 #1
0
        /// <summary>
        /// Adds new video stream with <see cref="UncompressedVideoEncoder"/>.
        /// </summary>
        /// <seealso cref="AviWriter.AddEncodingVideoStream"/>
        /// <seealso cref="UncompressedVideoEncoder"/>
        public static IAviVideoStream AddUncompressedVideoStream(this AviWriter writer, int width, int height)
        {
            Argument.IsNotNull(writer, nameof(writer));
            Argument.IsPositive(width, nameof(width));
            Argument.IsPositive(height, nameof(height));

            var encoder = new UncompressedVideoEncoder(width, height);

            return(writer.AddEncodingVideoStream(encoder, true, width, height));
        }
예제 #2
0
        /// <summary>
        /// Adds new video stream with <see cref="UncompressedVideoEncoder"/>.
        /// </summary>
        /// <seealso cref="AviWriter.AddEncodingVideoStream"/>
        /// <seealso cref="UncompressedVideoEncoder"/>
        public static IAviVideoStream AddUncompressedVideoStream(this AviWriter writer, int width, int height)
        {
            Contract.Requires(writer != null);
            Contract.Requires(width > 0);
            Contract.Requires(height > 0);
            Contract.Ensures(Contract.Result <IAviVideoStream>() != null);

            var encoder = new UncompressedVideoEncoder(width, height);

            return(writer.AddEncodingVideoStream(encoder, true, width, height));
        }