private void FillMFDictionary() { /* * 1 General * 2 Video * 3 Audio * 4 Image * 5 Text * 6 Menu * 7 Generic * 8 Other */ FillMIDictionaryByType(1, "General"); var strAudioCount = MI.Get(MediaInfoLib.StreamKind.General, 0, "AudioCount"); int AudioCount = 0; int.TryParse(strAudioCount, out AudioCount); var strVideoCount = MI.Get(MediaInfoLib.StreamKind.General, 0, "VideoCount"); int VideoCount = 0; int.TryParse(strVideoCount, out VideoCount); if (AudioCount > 0) { FillMIDictionaryByType(3, "Audio"); } if (VideoCount > 0) { FillMIDictionaryByType(2, "Video"); } }
private void FillMIDictionaryByType(int idParamsType, string paramTypeTitle) { foreach (var item in GetMIParameters(idParamsType)) { var tmp = MI.Get(MediaInfoLib.StreamKind.General, 0, item); if (!string.IsNullOrWhiteSpace(tmp)) { MFIDictionary.Add(string.Format("{0}.{1}", paramTypeTitle, item), tmp); } } }