示例#1
0
        /// <summary>
        /// Determines the equality of <c>this</c> and a specified object.
        /// </summary>
        /// <param name="obj">object to compare to</param>
        /// <returns>true if <c>this</c> equals <paramref name="obj">obj</paramref></returns>
        public override bool Equals(object obj)
        {
            VideoSettings rhs = obj as VideoSettings;

            if (((object)rhs) == null)
            {
                return(false);
            }
            return(base.Equals(obj) &&
                   (this.CodecType == rhs.CodecType) &&
                   (this.ImageSize == rhs.ImageSize) &&
                   (this.FrameRate == rhs.FrameRate) &&
                   (this.KeyFrameRate == rhs.KeyFrameRate) &&
                   (this.Quality == rhs.Quality) &&
                   (this.FrameRateUnits == rhs.FrameRateUnits));
        }
示例#2
0
        /// <summary>
        /// Creates a clone of this structure
        /// </summary>
        /// <returns>returns a new copy of <c>this</c>, with the same values</returns>
        public object Clone()
        {
            VideoSettings v = new VideoSettings();

            //MediaSettings members
            v.ConstantBitRate = this.ConstantBitRate;
            v.VBR             = (this.VBR != null) ? (VBR)this.VBR.Clone() : null;

            //VideoSettings members
            v.CodecType      = this.CodecType;
            v.ImageSize      = this.ImageSize;
            v.Quality        = this.Quality;
            v.FrameRate      = this.FrameRate;
            v.KeyFrameRate   = this.KeyFrameRate;
            v.FrameRateUnits = this.FrameRateUnits;

            return(v);
        }