/*** Autogenerated by WIDL 5.15 from ../../wine/include/mfmediaengine.idl - Do not edit ***/

#ifdef _WIN32
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include <rpc.h>
#include <rpcndr.h>
#endif

#ifndef COM_NO_WINDOWS_H
#include <windows.h>
#include <ole2.h>
#endif

#ifndef __mfmediaengine_h__
#define __mfmediaengine_h__

/* Forward declarations */

#ifndef __IMFMediaError_FWD_DEFINED__
#define __IMFMediaError_FWD_DEFINED__
typedef interface IMFMediaError IMFMediaError;
#ifdef __cplusplus
interface IMFMediaError;
#endif /* __cplusplus */
#endif

#ifndef __IMFMediaEngineSrcElements_FWD_DEFINED__
#define __IMFMediaEngineSrcElements_FWD_DEFINED__
typedef interface IMFMediaEngineSrcElements IMFMediaEngineSrcElements;
#ifdef __cplusplus
interface IMFMediaEngineSrcElements;
#endif /* __cplusplus */
#endif

#ifndef __IMFMediaTimeRange_FWD_DEFINED__
#define __IMFMediaTimeRange_FWD_DEFINED__
typedef interface IMFMediaTimeRange IMFMediaTimeRange;
#ifdef __cplusplus
interface IMFMediaTimeRange;
#endif /* __cplusplus */
#endif

#ifndef __IMFMediaEngine_FWD_DEFINED__
#define __IMFMediaEngine_FWD_DEFINED__
typedef interface IMFMediaEngine IMFMediaEngine;
#ifdef __cplusplus
interface IMFMediaEngine;
#endif /* __cplusplus */
#endif

#ifndef __IMFMediaEngineEx_FWD_DEFINED__
#define __IMFMediaEngineEx_FWD_DEFINED__
typedef interface IMFMediaEngineEx IMFMediaEngineEx;
#ifdef __cplusplus
interface IMFMediaEngineEx;
#endif /* __cplusplus */
#endif

#ifndef __IMFMediaEngineClassFactory_FWD_DEFINED__
#define __IMFMediaEngineClassFactory_FWD_DEFINED__
typedef interface IMFMediaEngineClassFactory IMFMediaEngineClassFactory;
#ifdef __cplusplus
interface IMFMediaEngineClassFactory;
#endif /* __cplusplus */
#endif

#ifndef __IMFMediaEngineNotify_FWD_DEFINED__
#define __IMFMediaEngineNotify_FWD_DEFINED__
typedef interface IMFMediaEngineNotify IMFMediaEngineNotify;
#ifdef __cplusplus
interface IMFMediaEngineNotify;
#endif /* __cplusplus */
#endif

/* Headers for imported files */

#include <mfidl.h>

#ifdef __cplusplus
extern "C" {
#endif

EXTERN_GUID(CLSID_MFMediaEngineClassFactory, 0xb44392da, 0x499b, 0x446b, 0xa4, 0xcb, 0x00, 0x5f, 0xea, 0xd0, 0xe6, 0xd5);
EXTERN_GUID(MF_MEDIA_ENGINE_AUDIO_CATEGORY,                     0xc8d4c51d, 0x350e, 0x41f2, 0xba, 0x46, 0xfa, 0xeb, 0xbb, 0x08, 0x57, 0xf6);
EXTERN_GUID(MF_MEDIA_ENGINE_AUDIO_ENDPOINT_ROLE,                0xd2cb93d1, 0x116a, 0x44f2, 0x93, 0x85, 0xf7, 0xd0, 0xfd, 0xa2, 0xfb, 0x46);
EXTERN_GUID(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE,         0x4e0212e2, 0xe18f, 0x41e1, 0x95, 0xe5, 0xc0, 0xe7, 0xe9, 0x23, 0x5b, 0xc3);
EXTERN_GUID(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE9,     0x052c2d39, 0x40c0, 0x4188, 0xab, 0x86, 0xf8, 0x28, 0x27, 0x3b, 0x75, 0x22);
EXTERN_GUID(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE10,    0x11a47afd, 0x6589, 0x4124, 0xb3, 0x12, 0x61, 0x58, 0xec, 0x51, 0x7f, 0xc3);
EXTERN_GUID(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE11,    0x1cf1315f, 0xce3f, 0x4035, 0x93, 0x91, 0x16, 0x14, 0x2f, 0x77, 0x51, 0x89);
EXTERN_GUID(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE_EDGE, 0xa6f3e465, 0x3aca, 0x442c, 0xa3, 0xf0, 0xad, 0x6d, 0xda, 0xd8, 0x39, 0xae);
EXTERN_GUID(MF_MEDIA_ENGINE_CALLBACK,                           0xc60381b8, 0x83a4, 0x41f8, 0xa3, 0xd0, 0xde, 0x05, 0x07, 0x68, 0x49, 0xa9);
EXTERN_GUID(MF_MEDIA_ENGINE_COMPATIBILITY_MODE,                 0x3ef26ad4, 0xdc54, 0x45de, 0xb9, 0xaf, 0x76, 0xc8, 0xc6, 0x6b, 0xfa, 0x8e);
EXTERN_GUID(MF_MEDIA_ENGINE_COMPATIBILITY_MODE_WIN10,           0x5b25e089, 0x6ca7, 0x4139, 0xa2, 0xcb, 0xfc, 0xaa, 0xb3, 0x95, 0x52, 0xa3);
EXTERN_GUID(MF_MEDIA_ENGINE_COMPATIBILITY_MODE_WWA_EDGE,        0x15b29098, 0x9f01, 0x4e4d, 0xb6, 0x5a, 0xc0, 0x6c, 0x6c, 0x89, 0xda, 0x2a);
EXTERN_GUID(MF_MEDIA_ENGINE_CONTENT_PROTECTION_FLAGS,           0xe0350223, 0x5aaf, 0x4d76, 0xa7, 0xc3, 0x06, 0xde, 0x70, 0x89, 0x4d, 0xb4);
EXTERN_GUID(MF_MEDIA_ENGINE_CONTENT_PROTECTION_MANAGER,         0xfdd6dfaa, 0xbd85, 0x4af3, 0x9e, 0x0f, 0xa0, 0x1d, 0x53, 0x9d, 0x87, 0x6a);
EXTERN_GUID(MF_MEDIA_ENGINE_CONTINUE_ON_CODEC_ERROR,            0xdbcdb7f9, 0x48e4, 0x4295, 0xb7, 0x0d, 0xd5, 0x18, 0x23, 0x4e, 0xeb, 0x38);
EXTERN_GUID(MF_MEDIA_ENGINE_COREWINDOW,                         0xfccae4dc, 0x0b7f, 0x41c2, 0x9f, 0x96, 0x46, 0x59, 0x94, 0x8a, 0xcd, 0xdc);
EXTERN_GUID(MF_MEDIA_ENGINE_DXGI_MANAGER,                       0x065702da, 0x1094, 0x486d, 0x86, 0x17, 0xee, 0x7c, 0xc4, 0xee, 0x46, 0x48);
EXTERN_GUID(MF_MEDIA_ENGINE_EME_CALLBACK,                       0x494553a7, 0xa481, 0x4cb7, 0xbe, 0xc5, 0x38, 0x09, 0x03, 0x51, 0x37, 0x31);
EXTERN_GUID(MF_MEDIA_ENGINE_EXTENSION,                          0x3109fd46, 0x060d, 0x4b62, 0x8d, 0xcf, 0xfa, 0xff, 0x81, 0x13, 0x18, 0xd2);
EXTERN_GUID(MF_MEDIA_ENGINE_MEDIA_PLAYER_MODE,                  0x3ddd8d45, 0x5aa1, 0x4112, 0x82, 0xe5, 0x36, 0xf6, 0xa2, 0x19, 0x7e, 0x6e);
EXTERN_GUID(MF_MEDIA_ENGINE_NEEDKEY_CALLBACK,                   0x7ea80843, 0xb6e4, 0x432c, 0x8e, 0xa4, 0x78, 0x48, 0xff, 0xe4, 0x22, 0x0e);
EXTERN_GUID(MF_MEDIA_ENGINE_OPM_HWND,                           0xa0be8ee7, 0x0572, 0x4f2c, 0xa8, 0x01, 0x2a, 0x15, 0x1b, 0xd3, 0xe7, 0x26);
EXTERN_GUID(MF_MEDIA_ENGINE_PLAYBACK_HWND,                      0xd988879b, 0x67c9, 0x4d92, 0xba, 0xa7, 0x6e, 0xad, 0xd4, 0x46, 0x03, 0x9d);
EXTERN_GUID(MF_MEDIA_ENGINE_PLAYBACK_VISUAL,                    0x6debd26f, 0x6ab9, 0x4d7e, 0xb0, 0xee, 0xc6, 0x1a, 0x73, 0xff, 0xad, 0x15);
EXTERN_GUID(MF_MEDIA_ENGINE_SOURCE_RESOLVER_CONFIG_STORE,       0x0ac0c497, 0xb3c4, 0x48c9, 0x9c, 0xde, 0xbb, 0x8c, 0xa2, 0x44, 0x2c, 0xa3);
EXTERN_GUID(MF_MEDIA_ENGINE_STREAM_CONTAINS_ALPHA_CHANNEL,      0x5cbfaf44, 0xd2b2, 0x4cfb, 0x80, 0xa7, 0xd4, 0x29, 0xc7, 0x4c, 0x78, 0x9d);
EXTERN_GUID(MF_MEDIA_ENGINE_SYNCHRONOUS_CLOSE,                  0xc3c2e12f, 0x7e0e, 0x4e43, 0xb9, 0x1c, 0xdc, 0x99, 0x2c, 0xcd, 0xfa, 0x5e);
EXTERN_GUID(MF_MEDIA_ENGINE_TELEMETRY_APPLICATION_ID,           0x1e7b273b, 0xa7e4, 0x402a, 0x8f, 0x51, 0xc4, 0x8e, 0x88, 0xa2, 0xca, 0xbc);
EXTERN_GUID(MF_MEDIA_ENGINE_TRACK_ID,                           0x65bea312, 0x4043, 0x4815, 0x8e, 0xab, 0x44, 0xdc, 0xe2, 0xef, 0x8f, 0x2a);
EXTERN_GUID(MF_MEDIA_ENGINE_VIDEO_OUTPUT_FORMAT,                0x5066893c, 0x8cf9, 0x42bc, 0x8b, 0x8a, 0x47, 0x22, 0x12, 0xe5, 0x27, 0x26);
typedef enum MF_MEDIA_ENGINE_ERR {
    MF_MEDIA_ENGINE_ERR_NOERROR = 0,
    MF_MEDIA_ENGINE_ERR_ABORTED = 1,
    MF_MEDIA_ENGINE_ERR_NETWORK = 2,
    MF_MEDIA_ENGINE_ERR_DECODE = 3,
    MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED = 4,
    MF_MEDIA_ENGINE_ERR_ENCRYPTED = 5
} MF_MEDIA_ENGINE_ERR;
typedef enum MF_MEDIA_ENGINE_PRELOAD {
    MF_MEDIA_ENGINE_PRELOAD_MISSING = 0,
    MF_MEDIA_ENGINE_PRELOAD_EMPTY = 1,
    MF_MEDIA_ENGINE_PRELOAD_NONE = 2,
    MF_MEDIA_ENGINE_PRELOAD_METADATA = 3,
    MF_MEDIA_ENGINE_PRELOAD_AUTOMATIC = 4
} MF_MEDIA_ENGINE_PRELOAD;
typedef enum MF_MEDIA_ENGINE_CANPLAY {
    MF_MEDIA_ENGINE_CANPLAY_NOT_SUPPORTED = 0,
    MF_MEDIA_ENGINE_CANPLAY_MAYBE = 1,
    MF_MEDIA_ENGINE_CANPLAY_PROBABLY = 2
} MF_MEDIA_ENGINE_CANPLAY;
typedef struct MFVideoNormalizedRect {
    float left;
    float top;
    float right;
    float bottom;
} MFVideoNormalizedRect;
typedef enum MF_MEDIA_ENGINE_CREATEFLAGS {
    MF_MEDIA_ENGINE_AUDIOONLY = 0x1,
    MF_MEDIA_ENGINE_WAITFORSTABLE_STATE = 0x2,
    MF_MEDIA_ENGINE_FORCEMUTE = 0x4,
    MF_MEDIA_ENGINE_REAL_TIME_MODE = 0x8,
    MF_MEDIA_ENGINE_DISABLE_LOCAL_PLUGINS = 0x10,
    MF_MEDIA_ENGINE_CREATEFLAGS_MASK = 0x1f
} MF_MEDIA_ENGINE_CREATEFLAGS;
typedef enum MF_MEDIA_ENGINE_EVENT {
    MF_MEDIA_ENGINE_EVENT_LOADSTART = 1,
    MF_MEDIA_ENGINE_EVENT_PROGRESS = 2,
    MF_MEDIA_ENGINE_EVENT_SUSPEND = 3,
    MF_MEDIA_ENGINE_EVENT_ABORT = 4,
    MF_MEDIA_ENGINE_EVENT_ERROR = 5,
    MF_MEDIA_ENGINE_EVENT_EMPTIED = 6,
    MF_MEDIA_ENGINE_EVENT_STALLED = 7,
    MF_MEDIA_ENGINE_EVENT_PLAY = 8,
    MF_MEDIA_ENGINE_EVENT_PAUSE = 9,
    MF_MEDIA_ENGINE_EVENT_LOADEDMETADATA = 10,
    MF_MEDIA_ENGINE_EVENT_LOADEDDATA = 11,
    MF_MEDIA_ENGINE_EVENT_WAITING = 12,
    MF_MEDIA_ENGINE_EVENT_PLAYING = 13,
    MF_MEDIA_ENGINE_EVENT_CANPLAY = 14,
    MF_MEDIA_ENGINE_EVENT_CANPLAYTHROUGH = 15,
    MF_MEDIA_ENGINE_EVENT_SEEKING = 16,
    MF_MEDIA_ENGINE_EVENT_SEEKED = 17,
    MF_MEDIA_ENGINE_EVENT_TIMEUPDATE = 18,
    MF_MEDIA_ENGINE_EVENT_ENDED = 19,
    MF_MEDIA_ENGINE_EVENT_RATECHANGE = 20,
    MF_MEDIA_ENGINE_EVENT_DURATIONCHANGE = 21,
    MF_MEDIA_ENGINE_EVENT_VOLUMECHANGE = 22,
    MF_MEDIA_ENGINE_EVENT_FORMATCHANGE = 1000,
    MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS = 1001,
    MF_MEDIA_ENGINE_EVENT_TIMELINE_MARKER = 1002,
    MF_MEDIA_ENGINE_EVENT_BALANCECHANGE = 1003,
    MF_MEDIA_ENGINE_EVENT_DOWNLOADCOMPLETE = 1004,
    MF_MEDIA_ENGINE_EVENT_BUFFERINGSTARTED = 1005,
    MF_MEDIA_ENGINE_EVENT_BUFFERINGENDED = 1006,
    MF_MEDIA_ENGINE_EVENT_FRAMESTEPCOMPLETED = 1007,
    MF_MEDIA_ENGINE_EVENT_NOTIFYSTABLESTATE = 1008,
    MF_MEDIA_ENGINE_EVENT_FIRSTFRAMEREADY = 1009,
    MF_MEDIA_ENGINE_EVENT_TRACKSCHANGE = 1010,
    MF_MEDIA_ENGINE_EVENT_OPMINFO = 1011,
    MF_MEDIA_ENGINE_EVENT_RESOURCELOST = 1012,
    MF_MEDIA_ENGINE_EVENT_DELAYLOADEVENT_CHANGED = 1013,
    MF_MEDIA_ENGINE_EVENT_STREAMRENDERINGERROR = 1014,
    MF_MEDIA_ENGINE_EVENT_SUPPORTEDRATES_CHANGED = 1015,
    MF_MEDIA_ENGINE_EVENT_AUDIOENDPOINTCHANGE = 1016
} MF_MEDIA_ENGINE_EVENT;
typedef enum MF_MEDIA_ENGINE_READY {
    MF_MEDIA_ENGINE_READY_HAVE_NOTHING = 0,
    MF_MEDIA_ENGINE_READY_HAVE_METADATA = 1,
    MF_MEDIA_ENGINE_READY_HAVE_CURRENT_DATA = 2,
    MF_MEDIA_ENGINE_READY_HAVE_FUTURE_DATA = 3,
    MF_MEDIA_ENGINE_READY_HAVE_ENOUGH_DATA = 4
} MF_MEDIA_ENGINE_READY;
/*****************************************************************************
 * IMFMediaError interface
 */
#ifndef __IMFMediaError_INTERFACE_DEFINED__
#define __IMFMediaError_INTERFACE_DEFINED__

DEFINE_GUID(IID_IMFMediaError, 0xfc0e10d2, 0xab2a, 0x4501, 0xa9,0x51, 0x06,0xbb,0x10,0x75,0x18,0x4c);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("fc0e10d2-ab2a-4501-a951-06bb1075184c")
IMFMediaError : public IUnknown
{
    virtual USHORT STDMETHODCALLTYPE GetErrorCode(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetExtendedErrorCode(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetErrorCode(
        MF_MEDIA_ENGINE_ERR error) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetExtendedErrorCode(
        HRESULT error) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IMFMediaError, 0xfc0e10d2, 0xab2a, 0x4501, 0xa9,0x51, 0x06,0xbb,0x10,0x75,0x18,0x4c)
#endif
#else
typedef struct IMFMediaErrorVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IMFMediaError *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IMFMediaError *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IMFMediaError *This);

    /*** IMFMediaError methods ***/
    USHORT (STDMETHODCALLTYPE *GetErrorCode)(
        IMFMediaError *This);

    HRESULT (STDMETHODCALLTYPE *GetExtendedErrorCode)(
        IMFMediaError *This);

    HRESULT (STDMETHODCALLTYPE *SetErrorCode)(
        IMFMediaError *This,
        MF_MEDIA_ENGINE_ERR error);

    HRESULT (STDMETHODCALLTYPE *SetExtendedErrorCode)(
        IMFMediaError *This,
        HRESULT error);

    END_INTERFACE
} IMFMediaErrorVtbl;

interface IMFMediaError {
    CONST_VTBL IMFMediaErrorVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IMFMediaError_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMFMediaError_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMFMediaError_Release(This) (This)->lpVtbl->Release(This)
/*** IMFMediaError methods ***/
#define IMFMediaError_GetErrorCode(This) (This)->lpVtbl->GetErrorCode(This)
#define IMFMediaError_GetExtendedErrorCode(This) (This)->lpVtbl->GetExtendedErrorCode(This)
#define IMFMediaError_SetErrorCode(This,error) (This)->lpVtbl->SetErrorCode(This,error)
#define IMFMediaError_SetExtendedErrorCode(This,error) (This)->lpVtbl->SetExtendedErrorCode(This,error)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IMFMediaError_QueryInterface(IMFMediaError* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IMFMediaError_AddRef(IMFMediaError* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IMFMediaError_Release(IMFMediaError* This) {
    return This->lpVtbl->Release(This);
}
/*** IMFMediaError methods ***/
static FORCEINLINE USHORT IMFMediaError_GetErrorCode(IMFMediaError* This) {
    return This->lpVtbl->GetErrorCode(This);
}
static FORCEINLINE HRESULT IMFMediaError_GetExtendedErrorCode(IMFMediaError* This) {
    return This->lpVtbl->GetExtendedErrorCode(This);
}
static FORCEINLINE HRESULT IMFMediaError_SetErrorCode(IMFMediaError* This,MF_MEDIA_ENGINE_ERR error) {
    return This->lpVtbl->SetErrorCode(This,error);
}
static FORCEINLINE HRESULT IMFMediaError_SetExtendedErrorCode(IMFMediaError* This,HRESULT error) {
    return This->lpVtbl->SetExtendedErrorCode(This,error);
}
#endif
#endif

#endif


#endif  /* __IMFMediaError_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IMFMediaEngineSrcElements interface
 */
#ifndef __IMFMediaEngineSrcElements_INTERFACE_DEFINED__
#define __IMFMediaEngineSrcElements_INTERFACE_DEFINED__

DEFINE_GUID(IID_IMFMediaEngineSrcElements, 0x7a5e5354, 0xb114, 0x4c72, 0xb9,0x91, 0x31,0x31,0xd7,0x50,0x32,0xea);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("7a5e5354-b114-4c72-b991-3131d75032ea")
IMFMediaEngineSrcElements : public IUnknown
{
    virtual DWORD STDMETHODCALLTYPE GetLength(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetURL(
        DWORD index,
        BSTR *url) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetType(
        DWORD index,
        BSTR *type) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetMedia(
        DWORD index,
        BSTR *media) = 0;

    virtual HRESULT STDMETHODCALLTYPE AddElement(
        BSTR url,
        BSTR type,
        BSTR media) = 0;

    virtual HRESULT STDMETHODCALLTYPE RemoveAllElements(
        ) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IMFMediaEngineSrcElements, 0x7a5e5354, 0xb114, 0x4c72, 0xb9,0x91, 0x31,0x31,0xd7,0x50,0x32,0xea)
#endif
#else
typedef struct IMFMediaEngineSrcElementsVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IMFMediaEngineSrcElements *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IMFMediaEngineSrcElements *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IMFMediaEngineSrcElements *This);

    /*** IMFMediaEngineSrcElements methods ***/
    DWORD (STDMETHODCALLTYPE *GetLength)(
        IMFMediaEngineSrcElements *This);

    HRESULT (STDMETHODCALLTYPE *GetURL)(
        IMFMediaEngineSrcElements *This,
        DWORD index,
        BSTR *url);

    HRESULT (STDMETHODCALLTYPE *GetType)(
        IMFMediaEngineSrcElements *This,
        DWORD index,
        BSTR *type);

    HRESULT (STDMETHODCALLTYPE *GetMedia)(
        IMFMediaEngineSrcElements *This,
        DWORD index,
        BSTR *media);

    HRESULT (STDMETHODCALLTYPE *AddElement)(
        IMFMediaEngineSrcElements *This,
        BSTR url,
        BSTR type,
        BSTR media);

    HRESULT (STDMETHODCALLTYPE *RemoveAllElements)(
        IMFMediaEngineSrcElements *This);

    END_INTERFACE
} IMFMediaEngineSrcElementsVtbl;

interface IMFMediaEngineSrcElements {
    CONST_VTBL IMFMediaEngineSrcElementsVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IMFMediaEngineSrcElements_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMFMediaEngineSrcElements_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMFMediaEngineSrcElements_Release(This) (This)->lpVtbl->Release(This)
/*** IMFMediaEngineSrcElements methods ***/
#define IMFMediaEngineSrcElements_GetLength(This) (This)->lpVtbl->GetLength(This)
#define IMFMediaEngineSrcElements_GetURL(This,index,url) (This)->lpVtbl->GetURL(This,index,url)
#define IMFMediaEngineSrcElements_GetType(This,index,type) (This)->lpVtbl->GetType(This,index,type)
#define IMFMediaEngineSrcElements_GetMedia(This,index,media) (This)->lpVtbl->GetMedia(This,index,media)
#define IMFMediaEngineSrcElements_AddElement(This,url,type,media) (This)->lpVtbl->AddElement(This,url,type,media)
#define IMFMediaEngineSrcElements_RemoveAllElements(This) (This)->lpVtbl->RemoveAllElements(This)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IMFMediaEngineSrcElements_QueryInterface(IMFMediaEngineSrcElements* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IMFMediaEngineSrcElements_AddRef(IMFMediaEngineSrcElements* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IMFMediaEngineSrcElements_Release(IMFMediaEngineSrcElements* This) {
    return This->lpVtbl->Release(This);
}
/*** IMFMediaEngineSrcElements methods ***/
static FORCEINLINE DWORD IMFMediaEngineSrcElements_GetLength(IMFMediaEngineSrcElements* This) {
    return This->lpVtbl->GetLength(This);
}
static FORCEINLINE HRESULT IMFMediaEngineSrcElements_GetURL(IMFMediaEngineSrcElements* This,DWORD index,BSTR *url) {
    return This->lpVtbl->GetURL(This,index,url);
}
static FORCEINLINE HRESULT IMFMediaEngineSrcElements_GetType(IMFMediaEngineSrcElements* This,DWORD index,BSTR *type) {
    return This->lpVtbl->GetType(This,index,type);
}
static FORCEINLINE HRESULT IMFMediaEngineSrcElements_GetMedia(IMFMediaEngineSrcElements* This,DWORD index,BSTR *media) {
    return This->lpVtbl->GetMedia(This,index,media);
}
static FORCEINLINE HRESULT IMFMediaEngineSrcElements_AddElement(IMFMediaEngineSrcElements* This,BSTR url,BSTR type,BSTR media) {
    return This->lpVtbl->AddElement(This,url,type,media);
}
static FORCEINLINE HRESULT IMFMediaEngineSrcElements_RemoveAllElements(IMFMediaEngineSrcElements* This) {
    return This->lpVtbl->RemoveAllElements(This);
}
#endif
#endif

#endif


#endif  /* __IMFMediaEngineSrcElements_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IMFMediaTimeRange interface
 */
#ifndef __IMFMediaTimeRange_INTERFACE_DEFINED__
#define __IMFMediaTimeRange_INTERFACE_DEFINED__

DEFINE_GUID(IID_IMFMediaTimeRange, 0xdb71a2fc, 0x078a, 0x414e, 0x9d,0xf9, 0x8c,0x25,0x31,0xb0,0xaa,0x6c);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("db71a2fc-078a-414e-9df9-8c2531b0aa6c")
IMFMediaTimeRange : public IUnknown
{
    virtual DWORD STDMETHODCALLTYPE GetLength(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStart(
        DWORD index,
        double *start) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetEnd(
        DWORD index,
        double *end) = 0;

    virtual BOOL STDMETHODCALLTYPE ContainsTime(
        double time) = 0;

    virtual HRESULT STDMETHODCALLTYPE AddRange(
        double start,
        double end) = 0;

    virtual HRESULT STDMETHODCALLTYPE Clear(
        ) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IMFMediaTimeRange, 0xdb71a2fc, 0x078a, 0x414e, 0x9d,0xf9, 0x8c,0x25,0x31,0xb0,0xaa,0x6c)
#endif
#else
typedef struct IMFMediaTimeRangeVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IMFMediaTimeRange *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IMFMediaTimeRange *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IMFMediaTimeRange *This);

    /*** IMFMediaTimeRange methods ***/
    DWORD (STDMETHODCALLTYPE *GetLength)(
        IMFMediaTimeRange *This);

    HRESULT (STDMETHODCALLTYPE *GetStart)(
        IMFMediaTimeRange *This,
        DWORD index,
        double *start);

    HRESULT (STDMETHODCALLTYPE *GetEnd)(
        IMFMediaTimeRange *This,
        DWORD index,
        double *end);

    BOOL (STDMETHODCALLTYPE *ContainsTime)(
        IMFMediaTimeRange *This,
        double time);

    HRESULT (STDMETHODCALLTYPE *AddRange)(
        IMFMediaTimeRange *This,
        double start,
        double end);

    HRESULT (STDMETHODCALLTYPE *Clear)(
        IMFMediaTimeRange *This);

    END_INTERFACE
} IMFMediaTimeRangeVtbl;

interface IMFMediaTimeRange {
    CONST_VTBL IMFMediaTimeRangeVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IMFMediaTimeRange_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMFMediaTimeRange_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMFMediaTimeRange_Release(This) (This)->lpVtbl->Release(This)
/*** IMFMediaTimeRange methods ***/
#define IMFMediaTimeRange_GetLength(This) (This)->lpVtbl->GetLength(This)
#define IMFMediaTimeRange_GetStart(This,index,start) (This)->lpVtbl->GetStart(This,index,start)
#define IMFMediaTimeRange_GetEnd(This,index,end) (This)->lpVtbl->GetEnd(This,index,end)
#define IMFMediaTimeRange_ContainsTime(This,time) (This)->lpVtbl->ContainsTime(This,time)
#define IMFMediaTimeRange_AddRange(This,start,end) (This)->lpVtbl->AddRange(This,start,end)
#define IMFMediaTimeRange_Clear(This) (This)->lpVtbl->Clear(This)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IMFMediaTimeRange_QueryInterface(IMFMediaTimeRange* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IMFMediaTimeRange_AddRef(IMFMediaTimeRange* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IMFMediaTimeRange_Release(IMFMediaTimeRange* This) {
    return This->lpVtbl->Release(This);
}
/*** IMFMediaTimeRange methods ***/
static FORCEINLINE DWORD IMFMediaTimeRange_GetLength(IMFMediaTimeRange* This) {
    return This->lpVtbl->GetLength(This);
}
static FORCEINLINE HRESULT IMFMediaTimeRange_GetStart(IMFMediaTimeRange* This,DWORD index,double *start) {
    return This->lpVtbl->GetStart(This,index,start);
}
static FORCEINLINE HRESULT IMFMediaTimeRange_GetEnd(IMFMediaTimeRange* This,DWORD index,double *end) {
    return This->lpVtbl->GetEnd(This,index,end);
}
static FORCEINLINE BOOL IMFMediaTimeRange_ContainsTime(IMFMediaTimeRange* This,double time) {
    return This->lpVtbl->ContainsTime(This,time);
}
static FORCEINLINE HRESULT IMFMediaTimeRange_AddRange(IMFMediaTimeRange* This,double start,double end) {
    return This->lpVtbl->AddRange(This,start,end);
}
static FORCEINLINE HRESULT IMFMediaTimeRange_Clear(IMFMediaTimeRange* This) {
    return This->lpVtbl->Clear(This);
}
#endif
#endif

#endif


#endif  /* __IMFMediaTimeRange_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IMFMediaEngine interface
 */
#ifndef __IMFMediaEngine_INTERFACE_DEFINED__
#define __IMFMediaEngine_INTERFACE_DEFINED__

#undef GetCurrentTime
DEFINE_GUID(IID_IMFMediaEngine, 0x98a1b0bb, 0x03eb, 0x4935, 0xae,0x7c, 0x93,0xc1,0xfa,0x0e,0x1c,0x93);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("98a1b0bb-03eb-4935-ae7c-93c1fa0e1c93")
IMFMediaEngine : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetError(
        IMFMediaError **error) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetErrorCode(
        MF_MEDIA_ENGINE_ERR error) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSourceElements(
        IMFMediaEngineSrcElements *elements) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSource(
        BSTR url) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCurrentSource(
        BSTR *url) = 0;

    virtual USHORT STDMETHODCALLTYPE GetNetworkState(
        ) = 0;

    virtual MF_MEDIA_ENGINE_PRELOAD STDMETHODCALLTYPE GetPreload(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPreload(
        MF_MEDIA_ENGINE_PRELOAD preload) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetBuffered(
        IMFMediaTimeRange **buffered) = 0;

    virtual HRESULT STDMETHODCALLTYPE Load(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE CanPlayType(
        BSTR type,
        MF_MEDIA_ENGINE_CANPLAY *answer) = 0;

    virtual USHORT STDMETHODCALLTYPE GetReadyState(
        ) = 0;

    virtual BOOL STDMETHODCALLTYPE IsSeeking(
        ) = 0;

    virtual double STDMETHODCALLTYPE GetCurrentTime(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCurrentTime(
        double time) = 0;

    virtual double STDMETHODCALLTYPE GetStartTime(
        ) = 0;

    virtual double STDMETHODCALLTYPE GetDuration(
        ) = 0;

    virtual BOOL STDMETHODCALLTYPE IsPaused(
        ) = 0;

    virtual double STDMETHODCALLTYPE GetDefaultPlaybackRate(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDefaultPlaybackRate(
        double rate) = 0;

    virtual double STDMETHODCALLTYPE GetPlaybackRate(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPlaybackRate(
        double rate) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPlayed(
        IMFMediaTimeRange **played) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSeekable(
        IMFMediaTimeRange **seekable) = 0;

    virtual BOOL STDMETHODCALLTYPE IsEnded(
        ) = 0;

    virtual BOOL STDMETHODCALLTYPE GetAutoPlay(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetAutoPlay(
        BOOL autoplay) = 0;

    virtual BOOL STDMETHODCALLTYPE GetLoop(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetLoop(
        BOOL loop) = 0;

    virtual HRESULT STDMETHODCALLTYPE Play(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Pause(
        ) = 0;

    virtual BOOL STDMETHODCALLTYPE GetMuted(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetMuted(
        BOOL muted) = 0;

    virtual double STDMETHODCALLTYPE GetVolume(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetVolume(
        double volume) = 0;

    virtual BOOL STDMETHODCALLTYPE HasVideo(
        ) = 0;

    virtual BOOL STDMETHODCALLTYPE HasAudio(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetNativeVideoSize(
        DWORD *cx,
        DWORD *cy) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVideoAspectRatio(
        DWORD *cx,
        DWORD *cy) = 0;

    virtual HRESULT STDMETHODCALLTYPE Shutdown(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE TransferVideoFrame(
        IUnknown *surface,
        const MFVideoNormalizedRect *src,
        const RECT *dst,
        const MFARGB *color) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnVideoStreamTick(
        LONGLONG *time) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IMFMediaEngine, 0x98a1b0bb, 0x03eb, 0x4935, 0xae,0x7c, 0x93,0xc1,0xfa,0x0e,0x1c,0x93)
#endif
#else
typedef struct IMFMediaEngineVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IMFMediaEngine *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IMFMediaEngine *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IMFMediaEngine *This);

    /*** IMFMediaEngine methods ***/
    HRESULT (STDMETHODCALLTYPE *GetError)(
        IMFMediaEngine *This,
        IMFMediaError **error);

    HRESULT (STDMETHODCALLTYPE *SetErrorCode)(
        IMFMediaEngine *This,
        MF_MEDIA_ENGINE_ERR error);

    HRESULT (STDMETHODCALLTYPE *SetSourceElements)(
        IMFMediaEngine *This,
        IMFMediaEngineSrcElements *elements);

    HRESULT (STDMETHODCALLTYPE *SetSource)(
        IMFMediaEngine *This,
        BSTR url);

    HRESULT (STDMETHODCALLTYPE *GetCurrentSource)(
        IMFMediaEngine *This,
        BSTR *url);

    USHORT (STDMETHODCALLTYPE *GetNetworkState)(
        IMFMediaEngine *This);

    MF_MEDIA_ENGINE_PRELOAD (STDMETHODCALLTYPE *GetPreload)(
        IMFMediaEngine *This);

    HRESULT (STDMETHODCALLTYPE *SetPreload)(
        IMFMediaEngine *This,
        MF_MEDIA_ENGINE_PRELOAD preload);

    HRESULT (STDMETHODCALLTYPE *GetBuffered)(
        IMFMediaEngine *This,
        IMFMediaTimeRange **buffered);

    HRESULT (STDMETHODCALLTYPE *Load)(
        IMFMediaEngine *This);

    HRESULT (STDMETHODCALLTYPE *CanPlayType)(
        IMFMediaEngine *This,
        BSTR type,
        MF_MEDIA_ENGINE_CANPLAY *answer);

    USHORT (STDMETHODCALLTYPE *GetReadyState)(
        IMFMediaEngine *This);

    BOOL (STDMETHODCALLTYPE *IsSeeking)(
        IMFMediaEngine *This);

    double (STDMETHODCALLTYPE *GetCurrentTime)(
        IMFMediaEngine *This);

    HRESULT (STDMETHODCALLTYPE *SetCurrentTime)(
        IMFMediaEngine *This,
        double time);

    double (STDMETHODCALLTYPE *GetStartTime)(
        IMFMediaEngine *This);

    double (STDMETHODCALLTYPE *GetDuration)(
        IMFMediaEngine *This);

    BOOL (STDMETHODCALLTYPE *IsPaused)(
        IMFMediaEngine *This);

    double (STDMETHODCALLTYPE *GetDefaultPlaybackRate)(
        IMFMediaEngine *This);

    HRESULT (STDMETHODCALLTYPE *SetDefaultPlaybackRate)(
        IMFMediaEngine *This,
        double rate);

    double (STDMETHODCALLTYPE *GetPlaybackRate)(
        IMFMediaEngine *This);

    HRESULT (STDMETHODCALLTYPE *SetPlaybackRate)(
        IMFMediaEngine *This,
        double rate);

    HRESULT (STDMETHODCALLTYPE *GetPlayed)(
        IMFMediaEngine *This,
        IMFMediaTimeRange **played);

    HRESULT (STDMETHODCALLTYPE *GetSeekable)(
        IMFMediaEngine *This,
        IMFMediaTimeRange **seekable);

    BOOL (STDMETHODCALLTYPE *IsEnded)(
        IMFMediaEngine *This);

    BOOL (STDMETHODCALLTYPE *GetAutoPlay)(
        IMFMediaEngine *This);

    HRESULT (STDMETHODCALLTYPE *SetAutoPlay)(
        IMFMediaEngine *This,
        BOOL autoplay);

    BOOL (STDMETHODCALLTYPE *GetLoop)(
        IMFMediaEngine *This);

    HRESULT (STDMETHODCALLTYPE *SetLoop)(
        IMFMediaEngine *This,
        BOOL loop);

    HRESULT (STDMETHODCALLTYPE *Play)(
        IMFMediaEngine *This);

    HRESULT (STDMETHODCALLTYPE *Pause)(
        IMFMediaEngine *This);

    BOOL (STDMETHODCALLTYPE *GetMuted)(
        IMFMediaEngine *This);

    HRESULT (STDMETHODCALLTYPE *SetMuted)(
        IMFMediaEngine *This,
        BOOL muted);

    double (STDMETHODCALLTYPE *GetVolume)(
        IMFMediaEngine *This);

    HRESULT (STDMETHODCALLTYPE *SetVolume)(
        IMFMediaEngine *This,
        double volume);

    BOOL (STDMETHODCALLTYPE *HasVideo)(
        IMFMediaEngine *This);

    BOOL (STDMETHODCALLTYPE *HasAudio)(
        IMFMediaEngine *This);

    HRESULT (STDMETHODCALLTYPE *GetNativeVideoSize)(
        IMFMediaEngine *This,
        DWORD *cx,
        DWORD *cy);

    HRESULT (STDMETHODCALLTYPE *GetVideoAspectRatio)(
        IMFMediaEngine *This,
        DWORD *cx,
        DWORD *cy);

    HRESULT (STDMETHODCALLTYPE *Shutdown)(
        IMFMediaEngine *This);

    HRESULT (STDMETHODCALLTYPE *TransferVideoFrame)(
        IMFMediaEngine *This,
        IUnknown *surface,
        const MFVideoNormalizedRect *src,
        const RECT *dst,
        const MFARGB *color);

    HRESULT (STDMETHODCALLTYPE *OnVideoStreamTick)(
        IMFMediaEngine *This,
        LONGLONG *time);

    END_INTERFACE
} IMFMediaEngineVtbl;

interface IMFMediaEngine {
    CONST_VTBL IMFMediaEngineVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IMFMediaEngine_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMFMediaEngine_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMFMediaEngine_Release(This) (This)->lpVtbl->Release(This)
/*** IMFMediaEngine methods ***/
#define IMFMediaEngine_GetError(This,error) (This)->lpVtbl->GetError(This,error)
#define IMFMediaEngine_SetErrorCode(This,error) (This)->lpVtbl->SetErrorCode(This,error)
#define IMFMediaEngine_SetSourceElements(This,elements) (This)->lpVtbl->SetSourceElements(This,elements)
#define IMFMediaEngine_SetSource(This,url) (This)->lpVtbl->SetSource(This,url)
#define IMFMediaEngine_GetCurrentSource(This,url) (This)->lpVtbl->GetCurrentSource(This,url)
#define IMFMediaEngine_GetNetworkState(This) (This)->lpVtbl->GetNetworkState(This)
#define IMFMediaEngine_GetPreload(This) (This)->lpVtbl->GetPreload(This)
#define IMFMediaEngine_SetPreload(This,preload) (This)->lpVtbl->SetPreload(This,preload)
#define IMFMediaEngine_GetBuffered(This,buffered) (This)->lpVtbl->GetBuffered(This,buffered)
#define IMFMediaEngine_Load(This) (This)->lpVtbl->Load(This)
#define IMFMediaEngine_CanPlayType(This,type,answer) (This)->lpVtbl->CanPlayType(This,type,answer)
#define IMFMediaEngine_GetReadyState(This) (This)->lpVtbl->GetReadyState(This)
#define IMFMediaEngine_IsSeeking(This) (This)->lpVtbl->IsSeeking(This)
#define IMFMediaEngine_GetCurrentTime(This) (This)->lpVtbl->GetCurrentTime(This)
#define IMFMediaEngine_SetCurrentTime(This,time) (This)->lpVtbl->SetCurrentTime(This,time)
#define IMFMediaEngine_GetStartTime(This) (This)->lpVtbl->GetStartTime(This)
#define IMFMediaEngine_GetDuration(This) (This)->lpVtbl->GetDuration(This)
#define IMFMediaEngine_IsPaused(This) (This)->lpVtbl->IsPaused(This)
#define IMFMediaEngine_GetDefaultPlaybackRate(This) (This)->lpVtbl->GetDefaultPlaybackRate(This)
#define IMFMediaEngine_SetDefaultPlaybackRate(This,rate) (This)->lpVtbl->SetDefaultPlaybackRate(This,rate)
#define IMFMediaEngine_GetPlaybackRate(This) (This)->lpVtbl->GetPlaybackRate(This)
#define IMFMediaEngine_SetPlaybackRate(This,rate) (This)->lpVtbl->SetPlaybackRate(This,rate)
#define IMFMediaEngine_GetPlayed(This,played) (This)->lpVtbl->GetPlayed(This,played)
#define IMFMediaEngine_GetSeekable(This,seekable) (This)->lpVtbl->GetSeekable(This,seekable)
#define IMFMediaEngine_IsEnded(This) (This)->lpVtbl->IsEnded(This)
#define IMFMediaEngine_GetAutoPlay(This) (This)->lpVtbl->GetAutoPlay(This)
#define IMFMediaEngine_SetAutoPlay(This,autoplay) (This)->lpVtbl->SetAutoPlay(This,autoplay)
#define IMFMediaEngine_GetLoop(This) (This)->lpVtbl->GetLoop(This)
#define IMFMediaEngine_SetLoop(This,loop) (This)->lpVtbl->SetLoop(This,loop)
#define IMFMediaEngine_Play(This) (This)->lpVtbl->Play(This)
#define IMFMediaEngine_Pause(This) (This)->lpVtbl->Pause(This)
#define IMFMediaEngine_GetMuted(This) (This)->lpVtbl->GetMuted(This)
#define IMFMediaEngine_SetMuted(This,muted) (This)->lpVtbl->SetMuted(This,muted)
#define IMFMediaEngine_GetVolume(This) (This)->lpVtbl->GetVolume(This)
#define IMFMediaEngine_SetVolume(This,volume) (This)->lpVtbl->SetVolume(This,volume)
#define IMFMediaEngine_HasVideo(This) (This)->lpVtbl->HasVideo(This)
#define IMFMediaEngine_HasAudio(This) (This)->lpVtbl->HasAudio(This)
#define IMFMediaEngine_GetNativeVideoSize(This,cx,cy) (This)->lpVtbl->GetNativeVideoSize(This,cx,cy)
#define IMFMediaEngine_GetVideoAspectRatio(This,cx,cy) (This)->lpVtbl->GetVideoAspectRatio(This,cx,cy)
#define IMFMediaEngine_Shutdown(This) (This)->lpVtbl->Shutdown(This)
#define IMFMediaEngine_TransferVideoFrame(This,surface,src,dst,color) (This)->lpVtbl->TransferVideoFrame(This,surface,src,dst,color)
#define IMFMediaEngine_OnVideoStreamTick(This,time) (This)->lpVtbl->OnVideoStreamTick(This,time)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IMFMediaEngine_QueryInterface(IMFMediaEngine* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IMFMediaEngine_AddRef(IMFMediaEngine* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IMFMediaEngine_Release(IMFMediaEngine* This) {
    return This->lpVtbl->Release(This);
}
/*** IMFMediaEngine methods ***/
static FORCEINLINE HRESULT IMFMediaEngine_GetError(IMFMediaEngine* This,IMFMediaError **error) {
    return This->lpVtbl->GetError(This,error);
}
static FORCEINLINE HRESULT IMFMediaEngine_SetErrorCode(IMFMediaEngine* This,MF_MEDIA_ENGINE_ERR error) {
    return This->lpVtbl->SetErrorCode(This,error);
}
static FORCEINLINE HRESULT IMFMediaEngine_SetSourceElements(IMFMediaEngine* This,IMFMediaEngineSrcElements *elements) {
    return This->lpVtbl->SetSourceElements(This,elements);
}
static FORCEINLINE HRESULT IMFMediaEngine_SetSource(IMFMediaEngine* This,BSTR url) {
    return This->lpVtbl->SetSource(This,url);
}
static FORCEINLINE HRESULT IMFMediaEngine_GetCurrentSource(IMFMediaEngine* This,BSTR *url) {
    return This->lpVtbl->GetCurrentSource(This,url);
}
static FORCEINLINE USHORT IMFMediaEngine_GetNetworkState(IMFMediaEngine* This) {
    return This->lpVtbl->GetNetworkState(This);
}
static FORCEINLINE MF_MEDIA_ENGINE_PRELOAD IMFMediaEngine_GetPreload(IMFMediaEngine* This) {
    return This->lpVtbl->GetPreload(This);
}
static FORCEINLINE HRESULT IMFMediaEngine_SetPreload(IMFMediaEngine* This,MF_MEDIA_ENGINE_PRELOAD preload) {
    return This->lpVtbl->SetPreload(This,preload);
}
static FORCEINLINE HRESULT IMFMediaEngine_GetBuffered(IMFMediaEngine* This,IMFMediaTimeRange **buffered) {
    return This->lpVtbl->GetBuffered(This,buffered);
}
static FORCEINLINE HRESULT IMFMediaEngine_Load(IMFMediaEngine* This) {
    return This->lpVtbl->Load(This);
}
static FORCEINLINE HRESULT IMFMediaEngine_CanPlayType(IMFMediaEngine* This,BSTR type,MF_MEDIA_ENGINE_CANPLAY *answer) {
    return This->lpVtbl->CanPlayType(This,type,answer);
}
static FORCEINLINE USHORT IMFMediaEngine_GetReadyState(IMFMediaEngine* This) {
    return This->lpVtbl->GetReadyState(This);
}
static FORCEINLINE BOOL IMFMediaEngine_IsSeeking(IMFMediaEngine* This) {
    return This->lpVtbl->IsSeeking(This);
}
static FORCEINLINE double IMFMediaEngine_GetCurrentTime(IMFMediaEngine* This) {
    return This->lpVtbl->GetCurrentTime(This);
}
static FORCEINLINE HRESULT IMFMediaEngine_SetCurrentTime(IMFMediaEngine* This,double time) {
    return This->lpVtbl->SetCurrentTime(This,time);
}
static FORCEINLINE double IMFMediaEngine_GetStartTime(IMFMediaEngine* This) {
    return This->lpVtbl->GetStartTime(This);
}
static FORCEINLINE double IMFMediaEngine_GetDuration(IMFMediaEngine* This) {
    return This->lpVtbl->GetDuration(This);
}
static FORCEINLINE BOOL IMFMediaEngine_IsPaused(IMFMediaEngine* This) {
    return This->lpVtbl->IsPaused(This);
}
static FORCEINLINE double IMFMediaEngine_GetDefaultPlaybackRate(IMFMediaEngine* This) {
    return This->lpVtbl->GetDefaultPlaybackRate(This);
}
static FORCEINLINE HRESULT IMFMediaEngine_SetDefaultPlaybackRate(IMFMediaEngine* This,double rate) {
    return This->lpVtbl->SetDefaultPlaybackRate(This,rate);
}
static FORCEINLINE double IMFMediaEngine_GetPlaybackRate(IMFMediaEngine* This) {
    return This->lpVtbl->GetPlaybackRate(This);
}
static FORCEINLINE HRESULT IMFMediaEngine_SetPlaybackRate(IMFMediaEngine* This,double rate) {
    return This->lpVtbl->SetPlaybackRate(This,rate);
}
static FORCEINLINE HRESULT IMFMediaEngine_GetPlayed(IMFMediaEngine* This,IMFMediaTimeRange **played) {
    return This->lpVtbl->GetPlayed(This,played);
}
static FORCEINLINE HRESULT IMFMediaEngine_GetSeekable(IMFMediaEngine* This,IMFMediaTimeRange **seekable) {
    return This->lpVtbl->GetSeekable(This,seekable);
}
static FORCEINLINE BOOL IMFMediaEngine_IsEnded(IMFMediaEngine* This) {
    return This->lpVtbl->IsEnded(This);
}
static FORCEINLINE BOOL IMFMediaEngine_GetAutoPlay(IMFMediaEngine* This) {
    return This->lpVtbl->GetAutoPlay(This);
}
static FORCEINLINE HRESULT IMFMediaEngine_SetAutoPlay(IMFMediaEngine* This,BOOL autoplay) {
    return This->lpVtbl->SetAutoPlay(This,autoplay);
}
static FORCEINLINE BOOL IMFMediaEngine_GetLoop(IMFMediaEngine* This) {
    return This->lpVtbl->GetLoop(This);
}
static FORCEINLINE HRESULT IMFMediaEngine_SetLoop(IMFMediaEngine* This,BOOL loop) {
    return This->lpVtbl->SetLoop(This,loop);
}
static FORCEINLINE HRESULT IMFMediaEngine_Play(IMFMediaEngine* This) {
    return This->lpVtbl->Play(This);
}
static FORCEINLINE HRESULT IMFMediaEngine_Pause(IMFMediaEngine* This) {
    return This->lpVtbl->Pause(This);
}
static FORCEINLINE BOOL IMFMediaEngine_GetMuted(IMFMediaEngine* This) {
    return This->lpVtbl->GetMuted(This);
}
static FORCEINLINE HRESULT IMFMediaEngine_SetMuted(IMFMediaEngine* This,BOOL muted) {
    return This->lpVtbl->SetMuted(This,muted);
}
static FORCEINLINE double IMFMediaEngine_GetVolume(IMFMediaEngine* This) {
    return This->lpVtbl->GetVolume(This);
}
static FORCEINLINE HRESULT IMFMediaEngine_SetVolume(IMFMediaEngine* This,double volume) {
    return This->lpVtbl->SetVolume(This,volume);
}
static FORCEINLINE BOOL IMFMediaEngine_HasVideo(IMFMediaEngine* This) {
    return This->lpVtbl->HasVideo(This);
}
static FORCEINLINE BOOL IMFMediaEngine_HasAudio(IMFMediaEngine* This) {
    return This->lpVtbl->HasAudio(This);
}
static FORCEINLINE HRESULT IMFMediaEngine_GetNativeVideoSize(IMFMediaEngine* This,DWORD *cx,DWORD *cy) {
    return This->lpVtbl->GetNativeVideoSize(This,cx,cy);
}
static FORCEINLINE HRESULT IMFMediaEngine_GetVideoAspectRatio(IMFMediaEngine* This,DWORD *cx,DWORD *cy) {
    return This->lpVtbl->GetVideoAspectRatio(This,cx,cy);
}
static FORCEINLINE HRESULT IMFMediaEngine_Shutdown(IMFMediaEngine* This) {
    return This->lpVtbl->Shutdown(This);
}
static FORCEINLINE HRESULT IMFMediaEngine_TransferVideoFrame(IMFMediaEngine* This,IUnknown *surface,const MFVideoNormalizedRect *src,const RECT *dst,const MFARGB *color) {
    return This->lpVtbl->TransferVideoFrame(This,surface,src,dst,color);
}
static FORCEINLINE HRESULT IMFMediaEngine_OnVideoStreamTick(IMFMediaEngine* This,LONGLONG *time) {
    return This->lpVtbl->OnVideoStreamTick(This,time);
}
#endif
#endif

#endif


#endif  /* __IMFMediaEngine_INTERFACE_DEFINED__ */

typedef enum MF_MEDIA_ENGINE_STATISTIC {
    MF_MEDIA_ENGINE_STATISTIC_FRAMES_RENDERED = 0,
    MF_MEDIA_ENGINE_STATISTIC_FRAMES_DROPPED = 1,
    MF_MEDIA_ENGINE_STATISTIC_BYTES_DOWNLOADED = 2,
    MF_MEDIA_ENGINE_STATISTIC_BUFFER_PROGRESS = 3,
    MF_MEDIA_ENGINE_STATISTIC_FRAMES_PER_SECOND = 4,
    MF_MEDIA_ENGINE_STATISTIC_PLAYBACK_JITTER = 5,
    MF_MEDIA_ENGINE_STATISTIC_FRAMES_CORRUPTED = 6,
    MF_MEDIA_ENGINE_STATISTIC_TOTAL_FRAME_DELAY = 7
} MF_MEDIA_ENGINE_STATISTIC;
typedef enum MF_MEDIA_ENGINE_S3D_PACKING_MODE {
    MF_MEDIA_ENGINE_S3D_PACKING_MODE_NONE = 0,
    MF_MEDIA_ENGINE_S3D_PACKING_MODE_SIDE_BY_SIDE = 1,
    MF_MEDIA_ENGINE_S3D_PACKING_MODE_TOP_BOTTOM = 2
} MF_MEDIA_ENGINE_S3D_PACKING_MODE;
typedef enum MF_MEDIA_ENGINE_SEEK_MODE {
    MF_MEDIA_ENGINE_SEEK_MODE_NORMAL = 0,
    MF_MEDIA_ENGINE_SEEK_MODE_APPROXIMATE = 1
} MF_MEDIA_ENGINE_SEEK_MODE;
/*****************************************************************************
 * IMFMediaEngineEx interface
 */
#ifndef __IMFMediaEngineEx_INTERFACE_DEFINED__
#define __IMFMediaEngineEx_INTERFACE_DEFINED__

DEFINE_GUID(IID_IMFMediaEngineEx, 0x83015ead, 0xb1e6, 0x40d0, 0xa9,0x8a, 0x37,0x14,0x5f,0xfe,0x1a,0xd1);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("83015ead-b1e6-40d0-a98a-37145ffe1ad1")
IMFMediaEngineEx : public IMFMediaEngine
{
    virtual HRESULT STDMETHODCALLTYPE SetSourceFromByteStream(
        IMFByteStream *bytestream,
        BSTR url) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStatistics(
        MF_MEDIA_ENGINE_STATISTIC stat_id,
        PROPVARIANT *stat) = 0;

    virtual HRESULT STDMETHODCALLTYPE UpdateVideoStream(
        const MFVideoNormalizedRect *src,
        const RECT *dst,
        const MFARGB *border_color) = 0;

    virtual double STDMETHODCALLTYPE GetBalance(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetBalance(
        double balance) = 0;

    virtual BOOL STDMETHODCALLTYPE IsPlaybackRateSupported(
        double rate) = 0;

    virtual HRESULT STDMETHODCALLTYPE FrameStep(
        BOOL forward) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetResourceCharacteristics(
        DWORD *flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPresentationAttribute(
        REFGUID attribute,
        PROPVARIANT *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetNumberOfStreams(
        DWORD *stream_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStreamAttribute(
        DWORD stream_index,
        REFGUID attribute,
        PROPVARIANT *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStreamSelection(
        DWORD stream_index,
        BOOL *enabled) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetStreamSelection(
        DWORD stream_index,
        BOOL enabled) = 0;

    virtual HRESULT STDMETHODCALLTYPE ApplyStreamSelections(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsProtected(
        BOOL *protected) = 0;

    virtual HRESULT STDMETHODCALLTYPE InsertVideoEffect(
        IUnknown *effect,
        BOOL is_optional) = 0;

    virtual HRESULT STDMETHODCALLTYPE InsertAudioEffect(
        IUnknown *effect,
        BOOL is_optional) = 0;

    virtual HRESULT STDMETHODCALLTYPE RemoveAllEffects(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetTimelineMarkerTimer(
        double timeout) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetTimelineMarkerTimer(
        double *timeout) = 0;

    virtual HRESULT STDMETHODCALLTYPE CancelTimelineMarkerTimer(
        ) = 0;

    virtual BOOL STDMETHODCALLTYPE IsStereo3D(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStereo3DFramePackingMode(
        MF_MEDIA_ENGINE_S3D_PACKING_MODE *mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetStereo3DFramePackingMode(
        MF_MEDIA_ENGINE_S3D_PACKING_MODE mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStereo3DRenderMode(
        MF3DVideoOutputType *output_type) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetStereo3DRenderMode(
        MF3DVideoOutputType output_type) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnableWindowlessSwapchainMode(
        BOOL enable) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVideoSwapchainHandle(
        HANDLE *swapchain) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnableHorizontalMirrorMode(
        BOOL enable) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetAudioStreamCategory(
        UINT32 *category) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetAudioStreamCategory(
        UINT32 category) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetAudioEndpointRole(
        UINT32 *role) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetAudioEndpointRole(
        UINT32 role) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetRealTimeMode(
        BOOL *enabled) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetRealTimeMode(
        BOOL enable) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCurrentTimeEx(
        double seektime,
        MF_MEDIA_ENGINE_SEEK_MODE mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnableTimeUpdateTimer(
        BOOL enable) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IMFMediaEngineEx, 0x83015ead, 0xb1e6, 0x40d0, 0xa9,0x8a, 0x37,0x14,0x5f,0xfe,0x1a,0xd1)
#endif
#else
typedef struct IMFMediaEngineExVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IMFMediaEngineEx *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IMFMediaEngineEx *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IMFMediaEngineEx *This);

    /*** IMFMediaEngine methods ***/
    HRESULT (STDMETHODCALLTYPE *GetError)(
        IMFMediaEngineEx *This,
        IMFMediaError **error);

    HRESULT (STDMETHODCALLTYPE *SetErrorCode)(
        IMFMediaEngineEx *This,
        MF_MEDIA_ENGINE_ERR error);

    HRESULT (STDMETHODCALLTYPE *SetSourceElements)(
        IMFMediaEngineEx *This,
        IMFMediaEngineSrcElements *elements);

    HRESULT (STDMETHODCALLTYPE *SetSource)(
        IMFMediaEngineEx *This,
        BSTR url);

    HRESULT (STDMETHODCALLTYPE *GetCurrentSource)(
        IMFMediaEngineEx *This,
        BSTR *url);

    USHORT (STDMETHODCALLTYPE *GetNetworkState)(
        IMFMediaEngineEx *This);

    MF_MEDIA_ENGINE_PRELOAD (STDMETHODCALLTYPE *GetPreload)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *SetPreload)(
        IMFMediaEngineEx *This,
        MF_MEDIA_ENGINE_PRELOAD preload);

    HRESULT (STDMETHODCALLTYPE *GetBuffered)(
        IMFMediaEngineEx *This,
        IMFMediaTimeRange **buffered);

    HRESULT (STDMETHODCALLTYPE *Load)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *CanPlayType)(
        IMFMediaEngineEx *This,
        BSTR type,
        MF_MEDIA_ENGINE_CANPLAY *answer);

    USHORT (STDMETHODCALLTYPE *GetReadyState)(
        IMFMediaEngineEx *This);

    BOOL (STDMETHODCALLTYPE *IsSeeking)(
        IMFMediaEngineEx *This);

    double (STDMETHODCALLTYPE *GetCurrentTime)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *SetCurrentTime)(
        IMFMediaEngineEx *This,
        double time);

    double (STDMETHODCALLTYPE *GetStartTime)(
        IMFMediaEngineEx *This);

    double (STDMETHODCALLTYPE *GetDuration)(
        IMFMediaEngineEx *This);

    BOOL (STDMETHODCALLTYPE *IsPaused)(
        IMFMediaEngineEx *This);

    double (STDMETHODCALLTYPE *GetDefaultPlaybackRate)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *SetDefaultPlaybackRate)(
        IMFMediaEngineEx *This,
        double rate);

    double (STDMETHODCALLTYPE *GetPlaybackRate)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *SetPlaybackRate)(
        IMFMediaEngineEx *This,
        double rate);

    HRESULT (STDMETHODCALLTYPE *GetPlayed)(
        IMFMediaEngineEx *This,
        IMFMediaTimeRange **played);

    HRESULT (STDMETHODCALLTYPE *GetSeekable)(
        IMFMediaEngineEx *This,
        IMFMediaTimeRange **seekable);

    BOOL (STDMETHODCALLTYPE *IsEnded)(
        IMFMediaEngineEx *This);

    BOOL (STDMETHODCALLTYPE *GetAutoPlay)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *SetAutoPlay)(
        IMFMediaEngineEx *This,
        BOOL autoplay);

    BOOL (STDMETHODCALLTYPE *GetLoop)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *SetLoop)(
        IMFMediaEngineEx *This,
        BOOL loop);

    HRESULT (STDMETHODCALLTYPE *Play)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *Pause)(
        IMFMediaEngineEx *This);

    BOOL (STDMETHODCALLTYPE *GetMuted)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *SetMuted)(
        IMFMediaEngineEx *This,
        BOOL muted);

    double (STDMETHODCALLTYPE *GetVolume)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *SetVolume)(
        IMFMediaEngineEx *This,
        double volume);

    BOOL (STDMETHODCALLTYPE *HasVideo)(
        IMFMediaEngineEx *This);

    BOOL (STDMETHODCALLTYPE *HasAudio)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *GetNativeVideoSize)(
        IMFMediaEngineEx *This,
        DWORD *cx,
        DWORD *cy);

    HRESULT (STDMETHODCALLTYPE *GetVideoAspectRatio)(
        IMFMediaEngineEx *This,
        DWORD *cx,
        DWORD *cy);

    HRESULT (STDMETHODCALLTYPE *Shutdown)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *TransferVideoFrame)(
        IMFMediaEngineEx *This,
        IUnknown *surface,
        const MFVideoNormalizedRect *src,
        const RECT *dst,
        const MFARGB *color);

    HRESULT (STDMETHODCALLTYPE *OnVideoStreamTick)(
        IMFMediaEngineEx *This,
        LONGLONG *time);

    /*** IMFMediaEngineEx methods ***/
    HRESULT (STDMETHODCALLTYPE *SetSourceFromByteStream)(
        IMFMediaEngineEx *This,
        IMFByteStream *bytestream,
        BSTR url);

    HRESULT (STDMETHODCALLTYPE *GetStatistics)(
        IMFMediaEngineEx *This,
        MF_MEDIA_ENGINE_STATISTIC stat_id,
        PROPVARIANT *stat);

    HRESULT (STDMETHODCALLTYPE *UpdateVideoStream)(
        IMFMediaEngineEx *This,
        const MFVideoNormalizedRect *src,
        const RECT *dst,
        const MFARGB *border_color);

    double (STDMETHODCALLTYPE *GetBalance)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *SetBalance)(
        IMFMediaEngineEx *This,
        double balance);

    BOOL (STDMETHODCALLTYPE *IsPlaybackRateSupported)(
        IMFMediaEngineEx *This,
        double rate);

    HRESULT (STDMETHODCALLTYPE *FrameStep)(
        IMFMediaEngineEx *This,
        BOOL forward);

    HRESULT (STDMETHODCALLTYPE *GetResourceCharacteristics)(
        IMFMediaEngineEx *This,
        DWORD *flags);

    HRESULT (STDMETHODCALLTYPE *GetPresentationAttribute)(
        IMFMediaEngineEx *This,
        REFGUID attribute,
        PROPVARIANT *value);

    HRESULT (STDMETHODCALLTYPE *GetNumberOfStreams)(
        IMFMediaEngineEx *This,
        DWORD *stream_count);

    HRESULT (STDMETHODCALLTYPE *GetStreamAttribute)(
        IMFMediaEngineEx *This,
        DWORD stream_index,
        REFGUID attribute,
        PROPVARIANT *value);

    HRESULT (STDMETHODCALLTYPE *GetStreamSelection)(
        IMFMediaEngineEx *This,
        DWORD stream_index,
        BOOL *enabled);

    HRESULT (STDMETHODCALLTYPE *SetStreamSelection)(
        IMFMediaEngineEx *This,
        DWORD stream_index,
        BOOL enabled);

    HRESULT (STDMETHODCALLTYPE *ApplyStreamSelections)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *IsProtected)(
        IMFMediaEngineEx *This,
        BOOL *protected);

    HRESULT (STDMETHODCALLTYPE *InsertVideoEffect)(
        IMFMediaEngineEx *This,
        IUnknown *effect,
        BOOL is_optional);

    HRESULT (STDMETHODCALLTYPE *InsertAudioEffect)(
        IMFMediaEngineEx *This,
        IUnknown *effect,
        BOOL is_optional);

    HRESULT (STDMETHODCALLTYPE *RemoveAllEffects)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *SetTimelineMarkerTimer)(
        IMFMediaEngineEx *This,
        double timeout);

    HRESULT (STDMETHODCALLTYPE *GetTimelineMarkerTimer)(
        IMFMediaEngineEx *This,
        double *timeout);

    HRESULT (STDMETHODCALLTYPE *CancelTimelineMarkerTimer)(
        IMFMediaEngineEx *This);

    BOOL (STDMETHODCALLTYPE *IsStereo3D)(
        IMFMediaEngineEx *This);

    HRESULT (STDMETHODCALLTYPE *GetStereo3DFramePackingMode)(
        IMFMediaEngineEx *This,
        MF_MEDIA_ENGINE_S3D_PACKING_MODE *mode);

    HRESULT (STDMETHODCALLTYPE *SetStereo3DFramePackingMode)(
        IMFMediaEngineEx *This,
        MF_MEDIA_ENGINE_S3D_PACKING_MODE mode);

    HRESULT (STDMETHODCALLTYPE *GetStereo3DRenderMode)(
        IMFMediaEngineEx *This,
        MF3DVideoOutputType *output_type);

    HRESULT (STDMETHODCALLTYPE *SetStereo3DRenderMode)(
        IMFMediaEngineEx *This,
        MF3DVideoOutputType output_type);

    HRESULT (STDMETHODCALLTYPE *EnableWindowlessSwapchainMode)(
        IMFMediaEngineEx *This,
        BOOL enable);

    HRESULT (STDMETHODCALLTYPE *GetVideoSwapchainHandle)(
        IMFMediaEngineEx *This,
        HANDLE *swapchain);

    HRESULT (STDMETHODCALLTYPE *EnableHorizontalMirrorMode)(
        IMFMediaEngineEx *This,
        BOOL enable);

    HRESULT (STDMETHODCALLTYPE *GetAudioStreamCategory)(
        IMFMediaEngineEx *This,
        UINT32 *category);

    HRESULT (STDMETHODCALLTYPE *SetAudioStreamCategory)(
        IMFMediaEngineEx *This,
        UINT32 category);

    HRESULT (STDMETHODCALLTYPE *GetAudioEndpointRole)(
        IMFMediaEngineEx *This,
        UINT32 *role);

    HRESULT (STDMETHODCALLTYPE *SetAudioEndpointRole)(
        IMFMediaEngineEx *This,
        UINT32 role);

    HRESULT (STDMETHODCALLTYPE *GetRealTimeMode)(
        IMFMediaEngineEx *This,
        BOOL *enabled);

    HRESULT (STDMETHODCALLTYPE *SetRealTimeMode)(
        IMFMediaEngineEx *This,
        BOOL enable);

    HRESULT (STDMETHODCALLTYPE *SetCurrentTimeEx)(
        IMFMediaEngineEx *This,
        double seektime,
        MF_MEDIA_ENGINE_SEEK_MODE mode);

    HRESULT (STDMETHODCALLTYPE *EnableTimeUpdateTimer)(
        IMFMediaEngineEx *This,
        BOOL enable);

    END_INTERFACE
} IMFMediaEngineExVtbl;

interface IMFMediaEngineEx {
    CONST_VTBL IMFMediaEngineExVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IMFMediaEngineEx_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMFMediaEngineEx_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMFMediaEngineEx_Release(This) (This)->lpVtbl->Release(This)
/*** IMFMediaEngine methods ***/
#define IMFMediaEngineEx_GetError(This,error) (This)->lpVtbl->GetError(This,error)
#define IMFMediaEngineEx_SetErrorCode(This,error) (This)->lpVtbl->SetErrorCode(This,error)
#define IMFMediaEngineEx_SetSourceElements(This,elements) (This)->lpVtbl->SetSourceElements(This,elements)
#define IMFMediaEngineEx_SetSource(This,url) (This)->lpVtbl->SetSource(This,url)
#define IMFMediaEngineEx_GetCurrentSource(This,url) (This)->lpVtbl->GetCurrentSource(This,url)
#define IMFMediaEngineEx_GetNetworkState(This) (This)->lpVtbl->GetNetworkState(This)
#define IMFMediaEngineEx_GetPreload(This) (This)->lpVtbl->GetPreload(This)
#define IMFMediaEngineEx_SetPreload(This,preload) (This)->lpVtbl->SetPreload(This,preload)
#define IMFMediaEngineEx_GetBuffered(This,buffered) (This)->lpVtbl->GetBuffered(This,buffered)
#define IMFMediaEngineEx_Load(This) (This)->lpVtbl->Load(This)
#define IMFMediaEngineEx_CanPlayType(This,type,answer) (This)->lpVtbl->CanPlayType(This,type,answer)
#define IMFMediaEngineEx_GetReadyState(This) (This)->lpVtbl->GetReadyState(This)
#define IMFMediaEngineEx_IsSeeking(This) (This)->lpVtbl->IsSeeking(This)
#define IMFMediaEngineEx_GetCurrentTime(This) (This)->lpVtbl->GetCurrentTime(This)
#define IMFMediaEngineEx_SetCurrentTime(This,time) (This)->lpVtbl->SetCurrentTime(This,time)
#define IMFMediaEngineEx_GetStartTime(This) (This)->lpVtbl->GetStartTime(This)
#define IMFMediaEngineEx_GetDuration(This) (This)->lpVtbl->GetDuration(This)
#define IMFMediaEngineEx_IsPaused(This) (This)->lpVtbl->IsPaused(This)
#define IMFMediaEngineEx_GetDefaultPlaybackRate(This) (This)->lpVtbl->GetDefaultPlaybackRate(This)
#define IMFMediaEngineEx_SetDefaultPlaybackRate(This,rate) (This)->lpVtbl->SetDefaultPlaybackRate(This,rate)
#define IMFMediaEngineEx_GetPlaybackRate(This) (This)->lpVtbl->GetPlaybackRate(This)
#define IMFMediaEngineEx_SetPlaybackRate(This,rate) (This)->lpVtbl->SetPlaybackRate(This,rate)
#define IMFMediaEngineEx_GetPlayed(This,played) (This)->lpVtbl->GetPlayed(This,played)
#define IMFMediaEngineEx_GetSeekable(This,seekable) (This)->lpVtbl->GetSeekable(This,seekable)
#define IMFMediaEngineEx_IsEnded(This) (This)->lpVtbl->IsEnded(This)
#define IMFMediaEngineEx_GetAutoPlay(This) (This)->lpVtbl->GetAutoPlay(This)
#define IMFMediaEngineEx_SetAutoPlay(This,autoplay) (This)->lpVtbl->SetAutoPlay(This,autoplay)
#define IMFMediaEngineEx_GetLoop(This) (This)->lpVtbl->GetLoop(This)
#define IMFMediaEngineEx_SetLoop(This,loop) (This)->lpVtbl->SetLoop(This,loop)
#define IMFMediaEngineEx_Play(This) (This)->lpVtbl->Play(This)
#define IMFMediaEngineEx_Pause(This) (This)->lpVtbl->Pause(This)
#define IMFMediaEngineEx_GetMuted(This) (This)->lpVtbl->GetMuted(This)
#define IMFMediaEngineEx_SetMuted(This,muted) (This)->lpVtbl->SetMuted(This,muted)
#define IMFMediaEngineEx_GetVolume(This) (This)->lpVtbl->GetVolume(This)
#define IMFMediaEngineEx_SetVolume(This,volume) (This)->lpVtbl->SetVolume(This,volume)
#define IMFMediaEngineEx_HasVideo(This) (This)->lpVtbl->HasVideo(This)
#define IMFMediaEngineEx_HasAudio(This) (This)->lpVtbl->HasAudio(This)
#define IMFMediaEngineEx_GetNativeVideoSize(This,cx,cy) (This)->lpVtbl->GetNativeVideoSize(This,cx,cy)
#define IMFMediaEngineEx_GetVideoAspectRatio(This,cx,cy) (This)->lpVtbl->GetVideoAspectRatio(This,cx,cy)
#define IMFMediaEngineEx_Shutdown(This) (This)->lpVtbl->Shutdown(This)
#define IMFMediaEngineEx_TransferVideoFrame(This,surface,src,dst,color) (This)->lpVtbl->TransferVideoFrame(This,surface,src,dst,color)
#define IMFMediaEngineEx_OnVideoStreamTick(This,time) (This)->lpVtbl->OnVideoStreamTick(This,time)
/*** IMFMediaEngineEx methods ***/
#define IMFMediaEngineEx_SetSourceFromByteStream(This,bytestream,url) (This)->lpVtbl->SetSourceFromByteStream(This,bytestream,url)
#define IMFMediaEngineEx_GetStatistics(This,stat_id,stat) (This)->lpVtbl->GetStatistics(This,stat_id,stat)
#define IMFMediaEngineEx_UpdateVideoStream(This,src,dst,border_color) (This)->lpVtbl->UpdateVideoStream(This,src,dst,border_color)
#define IMFMediaEngineEx_GetBalance(This) (This)->lpVtbl->GetBalance(This)
#define IMFMediaEngineEx_SetBalance(This,balance) (This)->lpVtbl->SetBalance(This,balance)
#define IMFMediaEngineEx_IsPlaybackRateSupported(This,rate) (This)->lpVtbl->IsPlaybackRateSupported(This,rate)
#define IMFMediaEngineEx_FrameStep(This,forward) (This)->lpVtbl->FrameStep(This,forward)
#define IMFMediaEngineEx_GetResourceCharacteristics(This,flags) (This)->lpVtbl->GetResourceCharacteristics(This,flags)
#define IMFMediaEngineEx_GetPresentationAttribute(This,attribute,value) (This)->lpVtbl->GetPresentationAttribute(This,attribute,value)
#define IMFMediaEngineEx_GetNumberOfStreams(This,stream_count) (This)->lpVtbl->GetNumberOfStreams(This,stream_count)
#define IMFMediaEngineEx_GetStreamAttribute(This,stream_index,attribute,value) (This)->lpVtbl->GetStreamAttribute(This,stream_index,attribute,value)
#define IMFMediaEngineEx_GetStreamSelection(This,stream_index,enabled) (This)->lpVtbl->GetStreamSelection(This,stream_index,enabled)
#define IMFMediaEngineEx_SetStreamSelection(This,stream_index,enabled) (This)->lpVtbl->SetStreamSelection(This,stream_index,enabled)
#define IMFMediaEngineEx_ApplyStreamSelections(This) (This)->lpVtbl->ApplyStreamSelections(This)
#define IMFMediaEngineEx_IsProtected(This,protected) (This)->lpVtbl->IsProtected(This,protected)
#define IMFMediaEngineEx_InsertVideoEffect(This,effect,is_optional) (This)->lpVtbl->InsertVideoEffect(This,effect,is_optional)
#define IMFMediaEngineEx_InsertAudioEffect(This,effect,is_optional) (This)->lpVtbl->InsertAudioEffect(This,effect,is_optional)
#define IMFMediaEngineEx_RemoveAllEffects(This) (This)->lpVtbl->RemoveAllEffects(This)
#define IMFMediaEngineEx_SetTimelineMarkerTimer(This,timeout) (This)->lpVtbl->SetTimelineMarkerTimer(This,timeout)
#define IMFMediaEngineEx_GetTimelineMarkerTimer(This,timeout) (This)->lpVtbl->GetTimelineMarkerTimer(This,timeout)
#define IMFMediaEngineEx_CancelTimelineMarkerTimer(This) (This)->lpVtbl->CancelTimelineMarkerTimer(This)
#define IMFMediaEngineEx_IsStereo3D(This) (This)->lpVtbl->IsStereo3D(This)
#define IMFMediaEngineEx_GetStereo3DFramePackingMode(This,mode) (This)->lpVtbl->GetStereo3DFramePackingMode(This,mode)
#define IMFMediaEngineEx_SetStereo3DFramePackingMode(This,mode) (This)->lpVtbl->SetStereo3DFramePackingMode(This,mode)
#define IMFMediaEngineEx_GetStereo3DRenderMode(This,output_type) (This)->lpVtbl->GetStereo3DRenderMode(This,output_type)
#define IMFMediaEngineEx_SetStereo3DRenderMode(This,output_type) (This)->lpVtbl->SetStereo3DRenderMode(This,output_type)
#define IMFMediaEngineEx_EnableWindowlessSwapchainMode(This,enable) (This)->lpVtbl->EnableWindowlessSwapchainMode(This,enable)
#define IMFMediaEngineEx_GetVideoSwapchainHandle(This,swapchain) (This)->lpVtbl->GetVideoSwapchainHandle(This,swapchain)
#define IMFMediaEngineEx_EnableHorizontalMirrorMode(This,enable) (This)->lpVtbl->EnableHorizontalMirrorMode(This,enable)
#define IMFMediaEngineEx_GetAudioStreamCategory(This,category) (This)->lpVtbl->GetAudioStreamCategory(This,category)
#define IMFMediaEngineEx_SetAudioStreamCategory(This,category) (This)->lpVtbl->SetAudioStreamCategory(This,category)
#define IMFMediaEngineEx_GetAudioEndpointRole(This,role) (This)->lpVtbl->GetAudioEndpointRole(This,role)
#define IMFMediaEngineEx_SetAudioEndpointRole(This,role) (This)->lpVtbl->SetAudioEndpointRole(This,role)
#define IMFMediaEngineEx_GetRealTimeMode(This,enabled) (This)->lpVtbl->GetRealTimeMode(This,enabled)
#define IMFMediaEngineEx_SetRealTimeMode(This,enable) (This)->lpVtbl->SetRealTimeMode(This,enable)
#define IMFMediaEngineEx_SetCurrentTimeEx(This,seektime,mode) (This)->lpVtbl->SetCurrentTimeEx(This,seektime,mode)
#define IMFMediaEngineEx_EnableTimeUpdateTimer(This,enable) (This)->lpVtbl->EnableTimeUpdateTimer(This,enable)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IMFMediaEngineEx_QueryInterface(IMFMediaEngineEx* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IMFMediaEngineEx_AddRef(IMFMediaEngineEx* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IMFMediaEngineEx_Release(IMFMediaEngineEx* This) {
    return This->lpVtbl->Release(This);
}
/*** IMFMediaEngine methods ***/
static FORCEINLINE HRESULT IMFMediaEngineEx_GetError(IMFMediaEngineEx* This,IMFMediaError **error) {
    return This->lpVtbl->GetError(This,error);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetErrorCode(IMFMediaEngineEx* This,MF_MEDIA_ENGINE_ERR error) {
    return This->lpVtbl->SetErrorCode(This,error);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetSourceElements(IMFMediaEngineEx* This,IMFMediaEngineSrcElements *elements) {
    return This->lpVtbl->SetSourceElements(This,elements);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetSource(IMFMediaEngineEx* This,BSTR url) {
    return This->lpVtbl->SetSource(This,url);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetCurrentSource(IMFMediaEngineEx* This,BSTR *url) {
    return This->lpVtbl->GetCurrentSource(This,url);
}
static FORCEINLINE USHORT IMFMediaEngineEx_GetNetworkState(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetNetworkState(This);
}
static FORCEINLINE MF_MEDIA_ENGINE_PRELOAD IMFMediaEngineEx_GetPreload(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetPreload(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetPreload(IMFMediaEngineEx* This,MF_MEDIA_ENGINE_PRELOAD preload) {
    return This->lpVtbl->SetPreload(This,preload);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetBuffered(IMFMediaEngineEx* This,IMFMediaTimeRange **buffered) {
    return This->lpVtbl->GetBuffered(This,buffered);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_Load(IMFMediaEngineEx* This) {
    return This->lpVtbl->Load(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_CanPlayType(IMFMediaEngineEx* This,BSTR type,MF_MEDIA_ENGINE_CANPLAY *answer) {
    return This->lpVtbl->CanPlayType(This,type,answer);
}
static FORCEINLINE USHORT IMFMediaEngineEx_GetReadyState(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetReadyState(This);
}
static FORCEINLINE BOOL IMFMediaEngineEx_IsSeeking(IMFMediaEngineEx* This) {
    return This->lpVtbl->IsSeeking(This);
}
static FORCEINLINE double IMFMediaEngineEx_GetCurrentTime(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetCurrentTime(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetCurrentTime(IMFMediaEngineEx* This,double time) {
    return This->lpVtbl->SetCurrentTime(This,time);
}
static FORCEINLINE double IMFMediaEngineEx_GetStartTime(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetStartTime(This);
}
static FORCEINLINE double IMFMediaEngineEx_GetDuration(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetDuration(This);
}
static FORCEINLINE BOOL IMFMediaEngineEx_IsPaused(IMFMediaEngineEx* This) {
    return This->lpVtbl->IsPaused(This);
}
static FORCEINLINE double IMFMediaEngineEx_GetDefaultPlaybackRate(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetDefaultPlaybackRate(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetDefaultPlaybackRate(IMFMediaEngineEx* This,double rate) {
    return This->lpVtbl->SetDefaultPlaybackRate(This,rate);
}
static FORCEINLINE double IMFMediaEngineEx_GetPlaybackRate(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetPlaybackRate(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetPlaybackRate(IMFMediaEngineEx* This,double rate) {
    return This->lpVtbl->SetPlaybackRate(This,rate);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetPlayed(IMFMediaEngineEx* This,IMFMediaTimeRange **played) {
    return This->lpVtbl->GetPlayed(This,played);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetSeekable(IMFMediaEngineEx* This,IMFMediaTimeRange **seekable) {
    return This->lpVtbl->GetSeekable(This,seekable);
}
static FORCEINLINE BOOL IMFMediaEngineEx_IsEnded(IMFMediaEngineEx* This) {
    return This->lpVtbl->IsEnded(This);
}
static FORCEINLINE BOOL IMFMediaEngineEx_GetAutoPlay(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetAutoPlay(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetAutoPlay(IMFMediaEngineEx* This,BOOL autoplay) {
    return This->lpVtbl->SetAutoPlay(This,autoplay);
}
static FORCEINLINE BOOL IMFMediaEngineEx_GetLoop(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetLoop(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetLoop(IMFMediaEngineEx* This,BOOL loop) {
    return This->lpVtbl->SetLoop(This,loop);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_Play(IMFMediaEngineEx* This) {
    return This->lpVtbl->Play(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_Pause(IMFMediaEngineEx* This) {
    return This->lpVtbl->Pause(This);
}
static FORCEINLINE BOOL IMFMediaEngineEx_GetMuted(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetMuted(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetMuted(IMFMediaEngineEx* This,BOOL muted) {
    return This->lpVtbl->SetMuted(This,muted);
}
static FORCEINLINE double IMFMediaEngineEx_GetVolume(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetVolume(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetVolume(IMFMediaEngineEx* This,double volume) {
    return This->lpVtbl->SetVolume(This,volume);
}
static FORCEINLINE BOOL IMFMediaEngineEx_HasVideo(IMFMediaEngineEx* This) {
    return This->lpVtbl->HasVideo(This);
}
static FORCEINLINE BOOL IMFMediaEngineEx_HasAudio(IMFMediaEngineEx* This) {
    return This->lpVtbl->HasAudio(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetNativeVideoSize(IMFMediaEngineEx* This,DWORD *cx,DWORD *cy) {
    return This->lpVtbl->GetNativeVideoSize(This,cx,cy);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetVideoAspectRatio(IMFMediaEngineEx* This,DWORD *cx,DWORD *cy) {
    return This->lpVtbl->GetVideoAspectRatio(This,cx,cy);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_Shutdown(IMFMediaEngineEx* This) {
    return This->lpVtbl->Shutdown(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_TransferVideoFrame(IMFMediaEngineEx* This,IUnknown *surface,const MFVideoNormalizedRect *src,const RECT *dst,const MFARGB *color) {
    return This->lpVtbl->TransferVideoFrame(This,surface,src,dst,color);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_OnVideoStreamTick(IMFMediaEngineEx* This,LONGLONG *time) {
    return This->lpVtbl->OnVideoStreamTick(This,time);
}
/*** IMFMediaEngineEx methods ***/
static FORCEINLINE HRESULT IMFMediaEngineEx_SetSourceFromByteStream(IMFMediaEngineEx* This,IMFByteStream *bytestream,BSTR url) {
    return This->lpVtbl->SetSourceFromByteStream(This,bytestream,url);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetStatistics(IMFMediaEngineEx* This,MF_MEDIA_ENGINE_STATISTIC stat_id,PROPVARIANT *stat) {
    return This->lpVtbl->GetStatistics(This,stat_id,stat);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_UpdateVideoStream(IMFMediaEngineEx* This,const MFVideoNormalizedRect *src,const RECT *dst,const MFARGB *border_color) {
    return This->lpVtbl->UpdateVideoStream(This,src,dst,border_color);
}
static FORCEINLINE double IMFMediaEngineEx_GetBalance(IMFMediaEngineEx* This) {
    return This->lpVtbl->GetBalance(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetBalance(IMFMediaEngineEx* This,double balance) {
    return This->lpVtbl->SetBalance(This,balance);
}
static FORCEINLINE BOOL IMFMediaEngineEx_IsPlaybackRateSupported(IMFMediaEngineEx* This,double rate) {
    return This->lpVtbl->IsPlaybackRateSupported(This,rate);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_FrameStep(IMFMediaEngineEx* This,BOOL forward) {
    return This->lpVtbl->FrameStep(This,forward);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetResourceCharacteristics(IMFMediaEngineEx* This,DWORD *flags) {
    return This->lpVtbl->GetResourceCharacteristics(This,flags);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetPresentationAttribute(IMFMediaEngineEx* This,REFGUID attribute,PROPVARIANT *value) {
    return This->lpVtbl->GetPresentationAttribute(This,attribute,value);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetNumberOfStreams(IMFMediaEngineEx* This,DWORD *stream_count) {
    return This->lpVtbl->GetNumberOfStreams(This,stream_count);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetStreamAttribute(IMFMediaEngineEx* This,DWORD stream_index,REFGUID attribute,PROPVARIANT *value) {
    return This->lpVtbl->GetStreamAttribute(This,stream_index,attribute,value);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetStreamSelection(IMFMediaEngineEx* This,DWORD stream_index,BOOL *enabled) {
    return This->lpVtbl->GetStreamSelection(This,stream_index,enabled);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetStreamSelection(IMFMediaEngineEx* This,DWORD stream_index,BOOL enabled) {
    return This->lpVtbl->SetStreamSelection(This,stream_index,enabled);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_ApplyStreamSelections(IMFMediaEngineEx* This) {
    return This->lpVtbl->ApplyStreamSelections(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_IsProtected(IMFMediaEngineEx* This,BOOL *protected) {
    return This->lpVtbl->IsProtected(This,protected);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_InsertVideoEffect(IMFMediaEngineEx* This,IUnknown *effect,BOOL is_optional) {
    return This->lpVtbl->InsertVideoEffect(This,effect,is_optional);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_InsertAudioEffect(IMFMediaEngineEx* This,IUnknown *effect,BOOL is_optional) {
    return This->lpVtbl->InsertAudioEffect(This,effect,is_optional);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_RemoveAllEffects(IMFMediaEngineEx* This) {
    return This->lpVtbl->RemoveAllEffects(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetTimelineMarkerTimer(IMFMediaEngineEx* This,double timeout) {
    return This->lpVtbl->SetTimelineMarkerTimer(This,timeout);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetTimelineMarkerTimer(IMFMediaEngineEx* This,double *timeout) {
    return This->lpVtbl->GetTimelineMarkerTimer(This,timeout);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_CancelTimelineMarkerTimer(IMFMediaEngineEx* This) {
    return This->lpVtbl->CancelTimelineMarkerTimer(This);
}
static FORCEINLINE BOOL IMFMediaEngineEx_IsStereo3D(IMFMediaEngineEx* This) {
    return This->lpVtbl->IsStereo3D(This);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetStereo3DFramePackingMode(IMFMediaEngineEx* This,MF_MEDIA_ENGINE_S3D_PACKING_MODE *mode) {
    return This->lpVtbl->GetStereo3DFramePackingMode(This,mode);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetStereo3DFramePackingMode(IMFMediaEngineEx* This,MF_MEDIA_ENGINE_S3D_PACKING_MODE mode) {
    return This->lpVtbl->SetStereo3DFramePackingMode(This,mode);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetStereo3DRenderMode(IMFMediaEngineEx* This,MF3DVideoOutputType *output_type) {
    return This->lpVtbl->GetStereo3DRenderMode(This,output_type);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetStereo3DRenderMode(IMFMediaEngineEx* This,MF3DVideoOutputType output_type) {
    return This->lpVtbl->SetStereo3DRenderMode(This,output_type);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_EnableWindowlessSwapchainMode(IMFMediaEngineEx* This,BOOL enable) {
    return This->lpVtbl->EnableWindowlessSwapchainMode(This,enable);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetVideoSwapchainHandle(IMFMediaEngineEx* This,HANDLE *swapchain) {
    return This->lpVtbl->GetVideoSwapchainHandle(This,swapchain);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_EnableHorizontalMirrorMode(IMFMediaEngineEx* This,BOOL enable) {
    return This->lpVtbl->EnableHorizontalMirrorMode(This,enable);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetAudioStreamCategory(IMFMediaEngineEx* This,UINT32 *category) {
    return This->lpVtbl->GetAudioStreamCategory(This,category);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetAudioStreamCategory(IMFMediaEngineEx* This,UINT32 category) {
    return This->lpVtbl->SetAudioStreamCategory(This,category);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetAudioEndpointRole(IMFMediaEngineEx* This,UINT32 *role) {
    return This->lpVtbl->GetAudioEndpointRole(This,role);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetAudioEndpointRole(IMFMediaEngineEx* This,UINT32 role) {
    return This->lpVtbl->SetAudioEndpointRole(This,role);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_GetRealTimeMode(IMFMediaEngineEx* This,BOOL *enabled) {
    return This->lpVtbl->GetRealTimeMode(This,enabled);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetRealTimeMode(IMFMediaEngineEx* This,BOOL enable) {
    return This->lpVtbl->SetRealTimeMode(This,enable);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_SetCurrentTimeEx(IMFMediaEngineEx* This,double seektime,MF_MEDIA_ENGINE_SEEK_MODE mode) {
    return This->lpVtbl->SetCurrentTimeEx(This,seektime,mode);
}
static FORCEINLINE HRESULT IMFMediaEngineEx_EnableTimeUpdateTimer(IMFMediaEngineEx* This,BOOL enable) {
    return This->lpVtbl->EnableTimeUpdateTimer(This,enable);
}
#endif
#endif

#endif


#endif  /* __IMFMediaEngineEx_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IMFMediaEngineClassFactory interface
 */
#ifndef __IMFMediaEngineClassFactory_INTERFACE_DEFINED__
#define __IMFMediaEngineClassFactory_INTERFACE_DEFINED__

DEFINE_GUID(IID_IMFMediaEngineClassFactory, 0x4d645ace, 0x26aa, 0x4688, 0x9b,0xe1, 0xdf,0x35,0x16,0x99,0x0b,0x93);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("4d645ace-26aa-4688-9be1-df3516990b93")
IMFMediaEngineClassFactory : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE CreateInstance(
        DWORD flags,
        IMFAttributes *attributes,
        IMFMediaEngine **engine) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateTimeRange(
        IMFMediaTimeRange **range) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateError(
        IMFMediaError **error) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IMFMediaEngineClassFactory, 0x4d645ace, 0x26aa, 0x4688, 0x9b,0xe1, 0xdf,0x35,0x16,0x99,0x0b,0x93)
#endif
#else
typedef struct IMFMediaEngineClassFactoryVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IMFMediaEngineClassFactory *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IMFMediaEngineClassFactory *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IMFMediaEngineClassFactory *This);

    /*** IMFMediaEngineClassFactory methods ***/
    HRESULT (STDMETHODCALLTYPE *CreateInstance)(
        IMFMediaEngineClassFactory *This,
        DWORD flags,
        IMFAttributes *attributes,
        IMFMediaEngine **engine);

    HRESULT (STDMETHODCALLTYPE *CreateTimeRange)(
        IMFMediaEngineClassFactory *This,
        IMFMediaTimeRange **range);

    HRESULT (STDMETHODCALLTYPE *CreateError)(
        IMFMediaEngineClassFactory *This,
        IMFMediaError **error);

    END_INTERFACE
} IMFMediaEngineClassFactoryVtbl;

interface IMFMediaEngineClassFactory {
    CONST_VTBL IMFMediaEngineClassFactoryVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IMFMediaEngineClassFactory_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMFMediaEngineClassFactory_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMFMediaEngineClassFactory_Release(This) (This)->lpVtbl->Release(This)
/*** IMFMediaEngineClassFactory methods ***/
#define IMFMediaEngineClassFactory_CreateInstance(This,flags,attributes,engine) (This)->lpVtbl->CreateInstance(This,flags,attributes,engine)
#define IMFMediaEngineClassFactory_CreateTimeRange(This,range) (This)->lpVtbl->CreateTimeRange(This,range)
#define IMFMediaEngineClassFactory_CreateError(This,error) (This)->lpVtbl->CreateError(This,error)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IMFMediaEngineClassFactory_QueryInterface(IMFMediaEngineClassFactory* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IMFMediaEngineClassFactory_AddRef(IMFMediaEngineClassFactory* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IMFMediaEngineClassFactory_Release(IMFMediaEngineClassFactory* This) {
    return This->lpVtbl->Release(This);
}
/*** IMFMediaEngineClassFactory methods ***/
static FORCEINLINE HRESULT IMFMediaEngineClassFactory_CreateInstance(IMFMediaEngineClassFactory* This,DWORD flags,IMFAttributes *attributes,IMFMediaEngine **engine) {
    return This->lpVtbl->CreateInstance(This,flags,attributes,engine);
}
static FORCEINLINE HRESULT IMFMediaEngineClassFactory_CreateTimeRange(IMFMediaEngineClassFactory* This,IMFMediaTimeRange **range) {
    return This->lpVtbl->CreateTimeRange(This,range);
}
static FORCEINLINE HRESULT IMFMediaEngineClassFactory_CreateError(IMFMediaEngineClassFactory* This,IMFMediaError **error) {
    return This->lpVtbl->CreateError(This,error);
}
#endif
#endif

#endif


#endif  /* __IMFMediaEngineClassFactory_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IMFMediaEngineNotify interface
 */
#ifndef __IMFMediaEngineNotify_INTERFACE_DEFINED__
#define __IMFMediaEngineNotify_INTERFACE_DEFINED__

DEFINE_GUID(IID_IMFMediaEngineNotify, 0xfee7c112, 0xe776, 0x42b5, 0x9b,0xbf, 0x00,0x48,0x52,0x4e,0x2b,0xd5);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("fee7c112-e776-42b5-9bbf-0048524e2bd5")
IMFMediaEngineNotify : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE EventNotify(
        DWORD event,
        DWORD_PTR param1,
        DWORD param2) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IMFMediaEngineNotify, 0xfee7c112, 0xe776, 0x42b5, 0x9b,0xbf, 0x00,0x48,0x52,0x4e,0x2b,0xd5)
#endif
#else
typedef struct IMFMediaEngineNotifyVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IMFMediaEngineNotify *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IMFMediaEngineNotify *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IMFMediaEngineNotify *This);

    /*** IMFMediaEngineNotify methods ***/
    HRESULT (STDMETHODCALLTYPE *EventNotify)(
        IMFMediaEngineNotify *This,
        DWORD event,
        DWORD_PTR param1,
        DWORD param2);

    END_INTERFACE
} IMFMediaEngineNotifyVtbl;

interface IMFMediaEngineNotify {
    CONST_VTBL IMFMediaEngineNotifyVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IMFMediaEngineNotify_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMFMediaEngineNotify_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMFMediaEngineNotify_Release(This) (This)->lpVtbl->Release(This)
/*** IMFMediaEngineNotify methods ***/
#define IMFMediaEngineNotify_EventNotify(This,event,param1,param2) (This)->lpVtbl->EventNotify(This,event,param1,param2)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IMFMediaEngineNotify_QueryInterface(IMFMediaEngineNotify* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IMFMediaEngineNotify_AddRef(IMFMediaEngineNotify* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IMFMediaEngineNotify_Release(IMFMediaEngineNotify* This) {
    return This->lpVtbl->Release(This);
}
/*** IMFMediaEngineNotify methods ***/
static FORCEINLINE HRESULT IMFMediaEngineNotify_EventNotify(IMFMediaEngineNotify* This,DWORD event,DWORD_PTR param1,DWORD param2) {
    return This->lpVtbl->EventNotify(This,event,param1,param2);
}
#endif
#endif

#endif


#endif  /* __IMFMediaEngineNotify_INTERFACE_DEFINED__ */

/* Begin additional prototypes for all interfaces */


/* End additional prototypes */

#ifdef __cplusplus
}
#endif

#endif /* __mfmediaengine_h__ */
