private void PopulateMediaInfoModel(MiResponseModel miResponseModel) { if (miResponseModel == null) { return; } }
public static void InjectResponseModel(MiResponseModel responseModel, FileInfoModel fileInfoModel) { if (responseModel.VideoStreams.Count == 0) { return; } fileInfoModel.Codec = responseModel.VideoStreams[0].CodecID; fileInfoModel.Width = responseModel.VideoStreams[0].Width; fileInfoModel.Height = responseModel.VideoStreams[0].Height; fileInfoModel.AspectRatioPercent = responseModel.VideoStreams[0].DisplayAspectRatio.Replace(" ", string.Empty); fileInfoModel.AspectRatioDecimal = GenerateARDecimal(fileInfoModel.AspectRatioPercent); fileInfoModel.FPS = GenerateFPS(responseModel.VideoStreams[0].FrameRate); fileInfoModel.FPSRounded = GenerateFPSRounded(responseModel.VideoStreams[0].FrameRate); fileInfoModel.Ntsc = IsNtsc(fileInfoModel.FPS); fileInfoModel.Pal = IsPal(fileInfoModel.FPS); fileInfoModel.ProgressiveScan = responseModel.VideoStreams[0].ScanType == "Progressive"; fileInfoModel.InterlacedScan = responseModel.VideoStreams[0].ScanType == "Interlaced"; fileInfoModel.SubtitleStreams = responseModel.SubtitleStreams; fileInfoModel.AudioStreams = responseModel.AudioStreams; }
public static MiResponseModel DoMediaInfoScan(string filePath) { if (string.IsNullOrEmpty(filePath)) { return(null); } var responseModel = new MiResponseModel(); var xml = GetMediaInfoXml(filePath); responseModel.PopulateFromXML(xml); return(responseModel); }
public void DoMediaInfoScanTest() { string filePath = @"E:\HD\Sex and the City (2008)\Sex and the City (2008).mkv"; MiResponseModel actual = MediaInfoFactory.DoMediaInfoScan(filePath); }