Exemplo n.º 1
0
 public static extern void MFCreateVideoMediaTypeFromVideoInfoHeader2(
     VideoInfoHeader2 pVideoInfoHeader,
     int cbVideoInfoHeader,
     long AdditionalVideoFlags,
     [In, MarshalAs(UnmanagedType.LPStruct)] Guid pSubtype,
     out IMFVideoMediaType ppIVideoMediaType
     );
Exemplo n.º 2
0
 public static extern void MFCreateVideoMediaTypeFromVideoInfoHeader(
     VideoInfoHeader pVideoInfoHeader,
     int cbVideoInfoHeader,
     int dwPixelAspectRatioX,
     int dwPixelAspectRatioY,
     MFVideoInterlaceMode InterlaceMode,
     long VideoFlags,
     [In, MarshalAs(UnmanagedType.LPStruct)] Guid pSubtype,
     out IMFVideoMediaType ppIVideoMediaType
     );
Exemplo n.º 3
0
 public static extern void MFCreateVideoMediaTypeFromBitMapInfoHeader(
     [In, MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(BMMarshaler))] BitmapInfoHeader pbmihBitMapInfoHeader,
     int dwPixelAspectRatioX,
     int dwPixelAspectRatioY,
     MFVideoInterlaceMode InterlaceMode,
     long VideoFlags,
     long qwFramesPerSecondNumerator,
     long qwFramesPerSecondDenominator,
     int dwMaxBitRate,
     out IMFVideoMediaType ppIVideoMediaType
     );
Exemplo n.º 4
0
        public int GetCurrentMediaType(out IMFVideoMediaType ppMediaType)
        {
            // Make sure we *never* leave this entry point with an exception
            try
            {
                lock (this)
                {
                    CheckShutdown();

                    if (m_pMediaType == null)
                    {
                        throw new COMException("IMFVideoPresenter.GetCurrentMediaType", MFError.MF_E_NOT_INITIALIZED);
                    }

                    // The function returns an IMFVideoMediaType pointer, and we store our media
                    // type as an IMFMediaType pointer, so we need to QI.

                    ppMediaType = (IMFVideoMediaType)m_pMediaType;
                }

                return S_Ok;
            }
            catch (Exception e)
            {
                ppMediaType = null;
                return Marshal.GetHRForException(e);
            }
        }
Exemplo n.º 5
0
        public int GetCurrentMediaTypeImpl(out IMFVideoMediaType ppMediaType)
        {
            HRESULT hr = S_OK;
            ppMediaType = null;
            try
            {
                lock (m_ObjectLock)
                {
                    hr = CheckShutdown();
                    if (hr.Failed) return hr;

                    if (m_pMediaType == null)
                    {
                        return MFHelper.MF_E_NOT_INITIALIZED;
                    }

                    // The function returns an IMFVideoMediaType pointer, and we store our media
                    // type as an IMFMediaType pointer, so we need to QI.

                    ppMediaType = (IMFVideoMediaType)m_pMediaType;

                }
            }
            catch (Exception _exception)
            {
                hr = (HRESULT)Marshal.GetHRForException(_exception);
            }
            return hr;
        }
Exemplo n.º 6
0
 public int GetCurrentMediaType(out IMFVideoMediaType ppMediaType)
 {
     Wrapper.CCallbackHandler _handler =
         new Wrapper.GetCurrentMediaTypeHandler(m_Caller);
     _handler.Invoke();
     ppMediaType = ((Wrapper.GetCurrentMediaTypeHandler)_handler).ppMediaType;
     return _handler.m_Result;
 }
Exemplo n.º 7
0
 public static extern void MFCreateVideoMediaTypeFromSubtype(
     [In, MarshalAs(UnmanagedType.LPStruct)] Guid pAMSubtype,
     out IMFVideoMediaType ppIVideoMediaType
     );
Exemplo n.º 8
0
 public static extern void MFCreateVideoMediaType(
     MFVideoFormat pVideoFormat,
     out IMFVideoMediaType ppIVideoMediaType
     );