public static async Task<IMediaInfo> Create() { var mediaInfo = new MediaInfo(); try { mediaInfo._handle = await MediaInfoInterop.NewAsync(); } catch { mediaInfo._handle = (IntPtr)0; } mediaInfo._mustUseAnsi = Environment.OSVersion.ToString().IndexOf("Windows", StringComparison.Ordinal) == -1; return mediaInfo; }
public MediaInfoWrapper() { _mediaInfo = new MediaInfo(); }