Exemplo n.º 1
0
 private static bool TryGetSubSampling(string source, out ChromaSubSampling result)
 {
     return(ChromaSubSamplings.TryGetValue(source, out result));
 }
Exemplo n.º 2
0
        public void LoadHdDemo(string fileName, VideoCodec videoCodec, int height, ColorSpace colorSpace, ChromaSubSampling chromaSubSampling)
        {
            _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger);
            _mediaInfoWrapper.MediaInfoNotloaded.Should().BeFalse("InfoWrapper should be loaded");
            _mediaInfoWrapper.HasVideo.Should().BeTrue("Video stream must be detected");
            var video = _mediaInfoWrapper.VideoStreams[0];

            video.Height.Should().Be(height);
            video.Codec.Should().Be(videoCodec);
            video.ColorSpace.Should().Be(colorSpace);
            video.SubSampling.Should().Be(chromaSubSampling);
        }
Exemplo n.º 3
0
        public void LoadUhdDemo(string fileName, VideoCodec videoCodec, int height, ColorSpace colorSpace, ChromaSubSampling subSampling)
        {
            _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger);
            _mediaInfoWrapper.MediaInfoNotloaded.Should().BeFalse("InfoWrapper should be loaded");
            _mediaInfoWrapper.HasVideo.Should().BeTrue("Video stream must be detected");
            _mediaInfoWrapper.IsBluRay.Should().BeFalse("Is not BluRay disk");
            _mediaInfoWrapper.IsDvd.Should().BeFalse("Is not DVD disk");
            _mediaInfoWrapper.IsInterlaced.Should().BeFalse("Video stream is progressive");
            _mediaInfoWrapper.Is3D.Should().BeFalse("Video stream is not 3D");
            var video = _mediaInfoWrapper.VideoStreams[0];

            video.Height.Should().Be(height);
            video.Codec.Should().Be(videoCodec);
            video.ColorSpace.Should().Be(colorSpace);
            video.SubSampling.Should().Be(subSampling);
        }
Exemplo n.º 4
0
        public void Load3dDemo(string fileName, VideoCodec videoCodec, Hdr hdr, ColorSpace colorSpace, StereoMode stereoMode, ChromaSubSampling subSampling)
        {
            _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger);
            _mediaInfoWrapper.MediaInfoNotloaded.Should().BeFalse("InfoWrapper should be loaded");
            _mediaInfoWrapper.HasVideo.Should().BeTrue("Video stream must be detected");
            _mediaInfoWrapper.Is3D.Should().BeTrue("Video stream is 3D");
            var video = _mediaInfoWrapper.VideoStreams[0];

            video.Hdr.Should().Be(hdr);
            video.Codec.Should().Be(videoCodec);
            video.Stereoscopic.Should().Be(stereoMode);
            video.ColorSpace.Should().Be(colorSpace);
            video.SubSampling.Should().Be(subSampling);
        }
Exemplo n.º 5
0
        public void LoadHdrDemo(string fileName, VideoCodec videoCodec, Hdr hdr, ColorSpace colorSpace, ChromaSubSampling subSampling, AudioCodec audioCodec, int channels)
        {
            _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger);
            _mediaInfoWrapper.MediaInfoNotloaded.Should().BeFalse("InfoWrapper should be loaded");
            _mediaInfoWrapper.HasVideo.Should().BeTrue("Video stream must be detected");
            _mediaInfoWrapper.IsBluRay.Should().BeFalse("Is not BluRay disk");
            _mediaInfoWrapper.IsDvd.Should().BeFalse("Is not DVD disk");
            _mediaInfoWrapper.IsInterlaced.Should().BeFalse("Video stream is progressive");
            _mediaInfoWrapper.Is3D.Should().BeFalse("Video stream is not 3D");
            _mediaInfoWrapper.AudioStreams.Count.Should().Be(1);
            var audio = _mediaInfoWrapper.AudioStreams[0];

            audio.Codec.Should().Be(audioCodec);
            audio.Channel.Should().Be(channels);
            var video = _mediaInfoWrapper.VideoStreams[0];

            video.Hdr.Should().Be(hdr);
            video.Codec.Should().Be(videoCodec);
            video.ColorSpace.Should().Be(colorSpace);
            video.SubSampling.Should().Be(subSampling);
        }