Exemplo n.º 1
0
        public HRESULT CopyAllItems(IMFAttributes pDest)
        {
            var hr = _type.CopyAllItems(pDest);

            Trace("hr: " + hr);
            return(hr);
        }
Exemplo n.º 2
0
        public void CopyFrom(IMFMediaType pType)
        {
            if (pType == null)
            {
                throw new Exception("E_POINTER");
            }
            HResult hr = pType.CopyAllItems(m_pType);

            MFError.ThrowExceptionForHR(hr);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Return a duplicate of a media type. Null input gives null output.
        /// </summary>
        /// <param name="inType">The IMFMediaType to clone or null.</param>
        /// <returns>Duplicate IMFMediaType or null.</returns>
        protected static IMFMediaType CloneMediaType(IMFMediaType inType)
        {
            IMFMediaType outType = null;

            if (inType != null)
            {
                MFError throwonhr;

                throwonhr = MFExtern.MFCreateMediaType(out outType);
                throwonhr = inType.CopyAllItems(outType);
            }

            return(outType);
        }
Exemplo n.º 4
0
 public void CopyFrom(IMFMediaType pType)
 {
     if (pType == null)
     {
         throw new Exception("E_POINTER");
     }
     int hr = pType.CopyAllItems(m_pType);
     MFError.ThrowExceptionForHR(hr);
 }