public HRESULT GetItem(Guid guidKey, PropVariant pValue) { var hr = _type.GetItem(guidKey, pValue); Trace("guid: " + guidKey.ToName() + " value: " + (pValue != null ? pValue.ToString() : "<null>") + " hr: " + hr); return(hr); }
public static object GetValue(this IMFMediaType obj, Guid key) { if (obj == null) { throw new ArgumentNullException(nameof(obj)); } var pv = new PropVariant(); if (obj.GetItem(key, pv).IsError) { return(null); } return(pv.Value); }
public static object GetValue(this IMFMediaType input, Guid key) { if (input == null) { throw new ArgumentNullException(nameof(input)); } using (var pv = new PropVariant()) { if (input.GetItem(key, pv).IsError) { return(null); } return(pv.Value); } }