public void ParseAudioStreamInfo_Valid_ReturnsExpectedData(string text, int index, string format, int sampleRate, string channels, string bitDepth, int bitrate) { var result = FileInfoFFmpeg.ParseStreamInfo(text); var info = result as MediaAudioStreamInfo; Assert.NotNull(info); Assert.Equal(text, info.RawText); Assert.Equal(FFmpegStreamType.Audio, info.StreamType); Assert.Equal(index, info.Index); Assert.Equal(format, info.Format); Assert.Equal(sampleRate, info.SampleRate); Assert.Equal(channels, info.Channels); Assert.Equal(bitDepth, info.BitDepth); Assert.Equal(bitrate, info.Bitrate); }
public void ParseVideoStreamInfo_Valid_ReturnsExpectedData(string text, int index, string format, string colorSpace, string colorRange, string colorMatrix, int width, int height, int sar1, int sar2, int dar1, int dar2, double frameRate, int bitDepth, int bitrate) { var result = FileInfoFFmpeg.ParseStreamInfo(text); var info = result as MediaVideoStreamInfo; Assert.NotNull(info); Assert.Equal(text, info.RawText); Assert.Equal(FFmpegStreamType.Video, info.StreamType); Assert.Equal(index, info.Index); Assert.Equal(format, info.Format); Assert.Equal(colorSpace, info.ColorSpace); Assert.Equal(colorRange, info.ColorRange); Assert.Equal(colorMatrix, info.ColorMatrix); Assert.Equal(width, info.Width); Assert.Equal(height, info.Height); Assert.Equal(sar1, info.SAR1); Assert.Equal(sar2, info.SAR2); Assert.Equal(dar1, info.DAR1); Assert.Equal(dar2, info.DAR2); Assert.Equal(frameRate, info.FrameRate); Assert.Equal(bitDepth, info.BitDepth); Assert.Equal(bitrate, info.Bitrate); }
public void ParseAudioStreamInfo_Invalid_ReturnsNull(string text) { var result = FileInfoFFmpeg.ParseStreamInfo(text); Assert.Null(result); }