示例#1
0
        public void Initialize()
        {
            const string mediaContainer = "mediaContainer";
            const string videoCodec = "videoCodec";
            const string videoProfile = "videoProfile";
            const int videoBitrate = 10000;
            const int width = 150;
            const int height = 100;
            const double frameRate = 25;
            const int keyFrameRate = 10;

            const string audioCodec = "audioCodec";
            const int audioBitrate = 500;

            _comparator = new Comparator();

            _videoSize = new VideoSize(width, height);

            _videoAdjusterParam = new VideoAdjusterParam()
                              {
                                  MediaContainer = mediaContainer,
                                  VideoCodec = videoCodec,
                                  VideoProfile = videoProfile,
                                  VideoBitrate = videoBitrate,
                                  FrameRate = frameRate,
                                  KeyFrameRate = keyFrameRate
                              };

            _videoParam = new VideoParam()
                              {
                                  MediaContainer = mediaContainer,
                                  VideoCodec = videoCodec,
                                  VideoProfile = videoProfile,
                                  VideoBitrate = videoBitrate,
                                  VideoWidth = width,
                                  VideoHeight = height,
                                  FrameRate = frameRate,
                                  KeyFrameRate = keyFrameRate
                              };
            
            _audioAdjusterParam = new AudioAdjusterParam()
                               {
                                   AudioCodec = audioCodec,
                                   AudioBitrate = audioBitrate
                               };

            _audioParam = new AudioParam()
                               {
                                   AudioCodec = audioCodec,
                                   AudioBitrate = audioBitrate
                               };
        }
示例#2
0
        public void VideoParamCompareWithDifferentVideoHeightTest()
        {
            //Arrange
            const string newContainer = "newContainer";
            _videoSize=new VideoSize(_videoParam.VideoWidth, 543);
            _videoParam.VideoHeight = 456;

            //Act
            var result = _comparator.VideoParamCompare(_videoAdjusterParam, _videoParam, newContainer, _videoSize);

            //Assert
            Assert.IsFalse(result);
        }