Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _INC_MFPLAY
      7 #define _INC_MFPLAY
      8 #include <evr.h>
      9 
     10 #if (WINVER >= 0x0601)
     11 
     12 typedef enum _MFP_CREATION_OPTIONS {
     13   MFP_OPTION_NONE                             = 0,
     14   MFP_OPTION_FREE_THREADED_CALLBACK           = 0x00000001,
     15   MFP_OPTION_NO_MMCSS                         = 0x00000002,
     16   MFP_OPTION_NO_REMOTE_DESKTOP_OPTIMIZATION   = 0x00000004
     17 } _MFP_CREATION_OPTIONS;
     18 
     19 typedef enum _MFP_MEDIAITEM_CHARACTERISTICS {
     20   MFP_MEDIAITEM_IS_LIVE         = 0x00000001,
     21   MFP_MEDIAITEM_CAN_SEEK        = 0x00000002,
     22   MFP_MEDIAITEM_CAN_PAUSE       = 0x00000004,
     23   MFP_MEDIAITEM_HAS_SLOW_SEEK   = 0x00000008
     24 } _MFP_MEDIAITEM_CHARACTERISTICS;
     25 
     26 typedef enum _MFP_CREDENTIAL_FLAGS {
     27   MFP_CREDENTIAL_PROMPT           = 0x00000001,
     28   MFP_CREDENTIAL_SAVE             = 0x00000002,
     29   MFP_CREDENTIAL_DO_NOT_CACHE     = 0x00000004,
     30   MFP_CREDENTIAL_CLEAR_TEXT       = 0x00000008,
     31   MFP_CREDENTIAL_PROXY            = 0x00000010,
     32   MFP_CREDENTIAL_LOGGED_ON_USER   = 0x00000020
     33 } _MFP_CREDENTIAL_FLAGS;
     34 
     35 typedef enum MFP_EVENT_TYPE {
     36   MFP_EVENT_TYPE_PLAY                      = 0,
     37   MFP_EVENT_TYPE_PAUSE                     = 1,
     38   MFP_EVENT_TYPE_STOP                      = 2,
     39   MFP_EVENT_TYPE_POSITION_SET              = 3,
     40   MFP_EVENT_TYPE_RATE_SET                  = 4,
     41   MFP_EVENT_TYPE_MEDIAITEM_CREATED         = 5,
     42   MFP_EVENT_TYPE_MEDIAITEM_SET             = 6,
     43   MFP_EVENT_TYPE_FRAME_STEP                = 7,
     44   MFP_EVENT_TYPE_MEDIAITEM_CLEARED         = 8,
     45   MFP_EVENT_TYPE_MF                        = 9,
     46   MFP_EVENT_TYPE_ERROR                     = 10,
     47   MFP_EVENT_TYPE_PLAYBACK_ENDED            = 11,
     48   MFP_EVENT_TYPE_ACQUIRE_USER_CREDENTIAL   = 12
     49 } MFP_EVENT_TYPE;
     50 
     51 typedef enum MFP_MEDIAPLAYER_STATE {
     52   MFP_MEDIAPLAYER_STATE_EMPTY      = 0x00000000,
     53   MFP_MEDIAPLAYER_STATE_STOPPED    = 0x00000001,
     54   MFP_MEDIAPLAYER_STATE_PLAYING    = 0x00000002,
     55   MFP_MEDIAPLAYER_STATE_PAUSED     = 0x00000003,
     56   MFP_MEDIAPLAYER_STATE_SHUTDOWN   = 0x00000004
     57 } MFP_MEDIAPLAYER_STATE;
     58 
     59 #ifdef __GNUC__
     60 #warning COM interfaces layout in this header has not been verified.
     61 #warning COM interfaces with incorrect layout may not work at all.
     62 #warning IMFPMediaItem is unverified.
     63 #endif
     64 
     65 #undef  INTERFACE
     66 #define INTERFACE IMFPMediaItem
     67 DECLARE_INTERFACE_(IMFPMediaItem,IUnknown)
     68 {
     69     BEGIN_INTERFACE
     70 
     71     /* IUnknown methods */
     72     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
     73     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
     74     STDMETHOD_(ULONG, Release)(THIS) PURE;
     75 
     76     /* IMFPMediaItem methods */
     77     STDMETHOD_(HRESULT,GetCharacteristics)(THIS_ MFP_MEDIAITEM_CHARACTERISTICS *pCharacteristics) PURE;
     78     STDMETHOD_(HRESULT,GetDuration)(THIS_ REFGUID guidPositionType,PROPVARIANT *pvDurationValue) PURE;
     79     STDMETHOD_(HRESULT,GetMediaPlayer)(THIS_ IMFPMediaPlayer **ppMediaPlayer) PURE;
     80     STDMETHOD_(HRESULT,GetMetadata)(THIS_ IPropertyStore **ppMetadataStore) PURE;
     81     STDMETHOD_(HRESULT,GetNumberOfStreams)(THIS_ DWORD *pdwStreamCount) PURE;
     82     STDMETHOD_(HRESULT,GetObject)(THIS_ IUnknown **ppIUnknown) PURE;
     83     STDMETHOD_(HRESULT,GetPresentationAttribute)(THIS_ REFGUID guidMFAttribute,PROPVARIANT *pvValue) PURE;
     84     STDMETHOD_(HRESULT,GetStartStopPosition)(THIS_ GUID *pguidStartPositionType,PROPVARIANT *pvStartValue,GUID *pguidStopPositionType,PROPVARIANT *pvStopValue) PURE;
     85     STDMETHOD_(HRESULT,GetStreamAttribute)(THIS_ DWORD dwStreamIndex,REFGUID guidMFAttribute,PROPVARIANT *pvValue) PURE;
     86     STDMETHOD_(HRESULT,GetStreamSelection)(THIS_ DWORD dwStreamIndex,WINBOOL *pfEnabled) PURE;
     87     STDMETHOD_(HRESULT,GetURL)(THIS_ LPWSTR *ppwszURL) PURE;
     88     STDMETHOD_(HRESULT,GetUserData)(THIS_ DWORD_PTR *pdwUserData) PURE;
     89     STDMETHOD_(HRESULT,HasAudio)(THIS_ WINBOOL *pfHasAudio,WINBOOL *pfSelected) PURE;
     90     STDMETHOD_(HRESULT,HasVideo)(THIS_ WINBOOL *pfHasVideo,WINBOOL *pfSelected) PURE;
     91     STDMETHOD_(HRESULT,IsProtected)(THIS_ WINBOOL *pfProtected) PURE;
     92     STDMETHOD_(HRESULT,SetStartStopPosition)(THIS_ const GUID *pguidStartPositionType,const PROPVARIANT *pvStartValue,const GUID *pguidStopPositionType,const PROPVARIANT *pvStopValue) PURE;
     93     STDMETHOD_(HRESULT,SetStreamSelection)(THIS_ DWORD dwStreamIndex,WINBOOL fEnabled) PURE;
     94     STDMETHOD_(HRESULT,SetStreamSink)(THIS_ DWORD dwStreamIndex,IUnknown *pMediaSink) PURE;
     95     STDMETHOD_(HRESULT,SetUserData)(THIS_ DWORD_PTR dwUserData) PURE;
     96 
     97     END_INTERFACE
     98 };
     99 #ifdef COBJMACROS
    100 #define IMFPMediaItem_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
    101 #define IMFPMediaItem_AddRef(This) (This)->lpVtbl->AddRef(This)
    102 #define IMFPMediaItem_Release(This) (This)->lpVtbl->Release(This)
    103 #define IMFPMediaItem_GetCharacteristics(This,pCharacteristics) (This)->lpVtbl->GetCharacteristics(This,pCharacteristics)
    104 #define IMFPMediaItem_GetDuration(This,guidPositionType,pvDurationValue) (This)->lpVtbl->GetDuration(This,guidPositionType,pvDurationValue)
    105 #define IMFPMediaItem_GetMediaPlayer(This,ppMediaPlayer) (This)->lpVtbl->GetMediaPlayer(This,ppMediaPlayer)
    106 #define IMFPMediaItem_GetMetadata(This,ppMetadataStore) (This)->lpVtbl->GetMetadata(This,ppMetadataStore)
    107 #define IMFPMediaItem_GetNumberOfStreams(This,pdwStreamCount) (This)->lpVtbl->GetNumberOfStreams(This,pdwStreamCount)
    108 #define IMFPMediaItem_GetObject(This,ppIUnknown) (This)->lpVtbl->GetObject(This,ppIUnknown)
    109 #define IMFPMediaItem_GetPresentationAttribute(This,guidMFAttribute,pvValue) (This)->lpVtbl->GetPresentationAttribute(This,guidMFAttribute,pvValue)
    110 #define IMFPMediaItem_GetStartStopPosition(This,pguidStartPositionType,pvStartValue,pguidStopPositionType,pvStopValue) (This)->lpVtbl->GetStartStopPosition(This,pguidStartPositionType,pvStartValue,pguidStopPositionType,pvStopValue)
    111 #define IMFPMediaItem_GetStreamAttribute(This,dwStreamIndex,guidMFAttribute,pvValue) (This)->lpVtbl->GetStreamAttribute(This,dwStreamIndex,guidMFAttribute,pvValue)
    112 #define IMFPMediaItem_GetStreamSelection(This,dwStreamIndex,pfEnabled) (This)->lpVtbl->GetStreamSelection(This,dwStreamIndex,pfEnabled)
    113 #define IMFPMediaItem_GetURL(This,ppwszURL) (This)->lpVtbl->GetURL(This,ppwszURL)
    114 #define IMFPMediaItem_GetUserData(This,pdwUserData) (This)->lpVtbl->GetUserData(This,pdwUserData)
    115 #define IMFPMediaItem_HasAudio(This,pfHasAudio,pfSelected) (This)->lpVtbl->HasAudio(This,pfHasAudio,pfSelected)
    116 #define IMFPMediaItem_HasVideo(This,pfHasVideo,pfSelected) (This)->lpVtbl->HasVideo(This,pfHasVideo,pfSelected)
    117 #define IMFPMediaItem_IsProtected(This,pfProtected) (This)->lpVtbl->IsProtected(This,pfProtected)
    118 #define IMFPMediaItem_SetStartStopPosition(This,pguidStartPositionType,pvStartValue,pguidStopPositionType,pvStopValue) (This)->lpVtbl->SetStartStopPosition(This,pguidStartPositionType,pvStartValue,pguidStopPositionType,pvStopValue)
    119 #define IMFPMediaItem_SetStreamSelection(This,dwStreamIndex,fEnabled) (This)->lpVtbl->SetStreamSelection(This,dwStreamIndex,fEnabled)
    120 #define IMFPMediaItem_SetStreamSink(This,dwStreamIndex,pMediaSink) (This)->lpVtbl->SetStreamSink(This,dwStreamIndex,pMediaSink)
    121 #define IMFPMediaItem_SetUserData(This,dwUserData) (This)->lpVtbl->SetUserData(This,dwUserData)
    122 #endif /*COBJMACROS*/
    123 
    124 #ifdef __GNUC__
    125 #warning COM interfaces layout in this header has not been verified.
    126 #warning COM interfaces with incorrect layout may not work at all.
    127 #warning IMFPMediaPlayer is unverified.
    128 #endif
    129 
    130 #undef  INTERFACE
    131 #define INTERFACE IMFPMediaPlayer
    132 DECLARE_INTERFACE_(IMFPMediaPlayer,IUnknown)
    133 {
    134     BEGIN_INTERFACE
    135 
    136     /* IUnknown methods */
    137     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    138     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    139     STDMETHOD_(ULONG, Release)(THIS) PURE;
    140 
    141     /* IMFPMediaPlayer methods */
    142     STDMETHOD_(HRESULT,ClearMediaItem)(THIS) PURE;
    143     STDMETHOD_(HRESULT,CreateMediaItemFromObject)(THIS_ IUnknown *pIUnknownObj,BOOL fSync,DWORD_PTR dwUserData,IMFPMediaItem **ppMediaItem) PURE;
    144     STDMETHOD_(HRESULT,CreateMediaItemFromURL)(THIS_ LPCWSTR pwszURL,BOOL fSync,DWORD_PTR dwUserData,IMFPMediaItem **ppMediaItem) PURE;
    145     STDMETHOD_(HRESULT,FrameStep)(THIS) PURE;
    146     STDMETHOD_(HRESULT,GetAspectRatioMode)(THIS_ DWORD *pdwAspectRatioMode) PURE;
    147     STDMETHOD_(HRESULT,GetBalance)(THIS_ float *pflBalance) PURE;
    148     STDMETHOD_(HRESULT,GetBorderColor)(THIS_ COLORREF *pClr) PURE;
    149     STDMETHOD_(HRESULT,GetDuration)(THIS_ REFGUID guidPositionType,PROPVARIANT *pvDurationValue) PURE;
    150     STDMETHOD_(HRESULT,GetIdealVideoSize)(THIS_ SIZE *pszMin,SIZE *pszMax) PURE;
    151     STDMETHOD_(HRESULT,GetMediaItem)(THIS_ IMFPMediaItem **ppIMFPMediaItem) PURE;
    152     STDMETHOD_(HRESULT,GetMute)(THIS_ WINBOOL *pfMute) PURE;
    153     STDMETHOD_(HRESULT,GetNativeVideoSize)(THIS_ SIZE *pszVideo,SIZE *pszARVideo) PURE;
    154     STDMETHOD_(HRESULT,GetPosition)(THIS_ REFGUID guidPositionType,PROPVARIANT *pvPositionValue) PURE;
    155     STDMETHOD_(HRESULT,GetRate)(THIS_ float *pflRate) PURE;
    156     STDMETHOD_(HRESULT,GetState)(THIS_ MFP_MEDIAPLAYER_STATE *peState) PURE;
    157     STDMETHOD_(HRESULT,GetSupportedRates)(THIS_ WINBOOL fForwardDirection,float *pflSlowestRate,float *pflFastestRate) PURE;
    158     STDMETHOD_(HRESULT,GetVideoSourceRect)(THIS_ MFVideoNormalizedRect *pnrcSource) PURE;
    159     STDMETHOD_(HRESULT,GetVideoWindow)(THIS_ HWND *phwndVideo) PURE;
    160     STDMETHOD_(HRESULT,GetVolume)(THIS_ float *pflVolume) PURE;
    161     STDMETHOD_(HRESULT,InsertEffect)(THIS_ IUnknown *pEffect,WINBOOL fOptional) PURE;
    162     STDMETHOD_(HRESULT,Pause)(THIS) PURE;
    163     STDMETHOD_(HRESULT,Play)(THIS) PURE;
    164     STDMETHOD_(HRESULT,RemoveAllEffects)(THIS) PURE;
    165     STDMETHOD_(HRESULT,RemoveEffect)(THIS_ IUnknown *pEffect) PURE;
    166     STDMETHOD(SetAspectRatioMode)(THIS_ DWORD dwAspectRatioMode) PURE;
    167     STDMETHOD_(HRESULT,SetBalance)(THIS_ float flBalance) PURE;
    168     STDMETHOD_(HRESULT,SetBorderColor)(THIS_ COLORREF Clr) PURE;
    169     STDMETHOD_(HRESULT,SetMediaItem)(THIS_ IMFPMediaItem *pIMFPMediaItem) PURE;
    170     STDMETHOD_(HRESULT,SetMute)(THIS_ WINBOOL fMute) PURE;
    171     STDMETHOD_(HRESULT,SetPosition)(THIS_ REFGUID guidPositionType,const PROPVARIANT *pvPositionValue) PURE;
    172     STDMETHOD_(HRESULT,SetRate)(THIS_ float flRate) PURE;
    173     STDMETHOD_(HRESULT,SetVideoSourceRect)(THIS_ const MFVideoNormalizedRect *pnrcSource) PURE;
    174     STDMETHOD_(HRESULT,SetVolume)(THIS_ float flVolume) PURE;
    175     STDMETHOD_(HRESULT,Shutdown)(THIS) PURE;
    176     STDMETHOD_(HRESULT,Stop)(THIS) PURE;
    177     STDMETHOD_(HRESULT,UpdateVideo)(THIS) PURE;
    178 
    179     END_INTERFACE
    180 };
    181 #ifdef COBJMACROS
    182 #define IMFPMediaPlayer_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
    183 #define IMFPMediaPlayer_AddRef(This) (This)->lpVtbl->AddRef(This)
    184 #define IMFPMediaPlayer_Release(This) (This)->lpVtbl->Release(This)
    185 #define IMFPMediaPlayer_ClearMediaItem() (This)->lpVtbl->ClearMediaItem(This)
    186 #define IMFPMediaPlayer_CreateMediaItemFromObject(This,pIUnknownObj,fSync,dwUserData,ppMediaItem) (This)->lpVtbl->CreateMediaItemFromObject(This,pIUnknownObj,fSync,dwUserData,ppMediaItem)
    187 #define IMFPMediaPlayer_CreateMediaItemFromURL(This,pwszURL,fSync,dwUserData,ppMediaItem) (This)->lpVtbl->CreateMediaItemFromURL(This,pwszURL,fSync,dwUserData,ppMediaItem)
    188 #define IMFPMediaPlayer_FrameStep() (This)->lpVtbl->FrameStep(This)
    189 #define IMFPMediaPlayer_GetAspectRatioMode(This,pdwAspectRatioMode) (This)->lpVtbl->GetAspectRatioMode(This,pdwAspectRatioMode)
    190 #define IMFPMediaPlayer_GetBalance(This,pflBalance) (This)->lpVtbl->GetBalance(This,pflBalance)
    191 #define IMFPMediaPlayer_GetBorderColor(This,pClr) (This)->lpVtbl->GetBorderColor(This,pClr)
    192 #define IMFPMediaPlayer_GetDuration(This,guidPositionType,pvDurationValue) (This)->lpVtbl->GetDuration(This,guidPositionType,pvDurationValue)
    193 #define IMFPMediaPlayer_GetIdealVideoSize(This,pszMin,pszMax) (This)->lpVtbl->GetIdealVideoSize(This,pszMin,pszMax)
    194 #define IMFPMediaPlayer_GetMediaItem(This,ppIMFPMediaItem) (This)->lpVtbl->GetMediaItem(This,ppIMFPMediaItem)
    195 #define IMFPMediaPlayer_GetMute(This,pfMute) (This)->lpVtbl->GetMute(This,pfMute)
    196 #define IMFPMediaPlayer_GetNativeVideoSize(This,pszVideo,pszARVideo) (This)->lpVtbl->GetNativeVideoSize(This,pszVideo,pszARVideo)
    197 #define IMFPMediaPlayer_GetPosition(This,guidPositionType,pvPositionValue) (This)->lpVtbl->GetPosition(This,guidPositionType,pvPositionValue)
    198 #define IMFPMediaPlayer_GetRate(This,pflRate) (This)->lpVtbl->GetRate(This,pflRate)
    199 #define IMFPMediaPlayer_GetState(This,peState) (This)->lpVtbl->GetState(This,peState)
    200 #define IMFPMediaPlayer_GetSupportedRates(This,fForwardDirection,pflSlowestRate,pflFastestRate) (This)->lpVtbl->GetSupportedRates(This,fForwardDirection,pflSlowestRate,pflFastestRate)
    201 #define IMFPMediaPlayer_GetVideoSourceRect(This,pnrcSource) (This)->lpVtbl->GetVideoSourceRect(This,pnrcSource)
    202 #define IMFPMediaPlayer_GetVideoWindow(This,phwndVideo) (This)->lpVtbl->GetVideoWindow(This,phwndVideo)
    203 #define IMFPMediaPlayer_GetVolume(This,pflVolume) (This)->lpVtbl->GetVolume(This,pflVolume)
    204 #define IMFPMediaPlayer_InsertEffect(This,pEffect,fOptional) (This)->lpVtbl->InsertEffect(This,pEffect,fOptional)
    205 #define IMFPMediaPlayer_Pause() (This)->lpVtbl->Pause(This)
    206 #define IMFPMediaPlayer_Play() (This)->lpVtbl->Play(This)
    207 #define IMFPMediaPlayer_RemoveAllEffects() (This)->lpVtbl->RemoveAllEffects(This)
    208 #define IMFPMediaPlayer_RemoveEffect(This,pEffect) (This)->lpVtbl->RemoveEffect(This,pEffect)
    209 #define IMFPMediaPlayer_SetAspectRatioMode(This,dwAspectRatioMode) (This)->lpVtbl->SetAspectRatioMode(This,dwAspectRatioMode)
    210 #define IMFPMediaPlayer_SetBalance(This,flBalance) (This)->lpVtbl->SetBalance(This,flBalance)
    211 #define IMFPMediaPlayer_SetBorderColor(This,Clr) (This)->lpVtbl->SetBorderColor(This,Clr)
    212 #define IMFPMediaPlayer_SetMediaItem(This,pIMFPMediaItem) (This)->lpVtbl->SetMediaItem(This,pIMFPMediaItem)
    213 #define IMFPMediaPlayer_SetMute(This,fMute) (This)->lpVtbl->SetMute(This,fMute)
    214 #define IMFPMediaPlayer_SetPosition(This,guidPositionType,pvPositionValue) (This)->lpVtbl->SetPosition(This,guidPositionType,pvPositionValue)
    215 #define IMFPMediaPlayer_SetRate(This,flRate) (This)->lpVtbl->SetRate(This,flRate)
    216 #define IMFPMediaPlayer_SetVideoSourceRect(This,pnrcSource) (This)->lpVtbl->SetVideoSourceRect(This,pnrcSource)
    217 #define IMFPMediaPlayer_SetVolume(This,flVolume) (This)->lpVtbl->SetVolume(This,flVolume)
    218 #define IMFPMediaPlayer_Shutdown() (This)->lpVtbl->Shutdown(This)
    219 #define IMFPMediaPlayer_Stop() (This)->lpVtbl->Stop(This)
    220 #define IMFPMediaPlayer_UpdateVideo() (This)->lpVtbl->UpdateVideo(This)
    221 #endif /*COBJMACROS*/
    222 
    223 #ifdef __GNUC__
    224 #warning COM interfaces layout in this header has not been verified.
    225 #warning COM interfaces with incorrect layout may not work at all.
    226 #warning IMFPMediaPlayerCallback is unverified.
    227 #endif
    228 
    229 #undef  INTERFACE
    230 #define INTERFACE IMFPMediaPlayerCallback
    231 DECLARE_INTERFACE_(IMFPMediaPlayerCallback,IUnknown)
    232 {
    233     BEGIN_INTERFACE
    234 
    235     /* IUnknown methods */
    236     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    237     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    238     STDMETHOD_(ULONG, Release)(THIS) PURE;
    239 
    240     /* IMFPMediaPlayerCallback methods */
    241     STDMETHOD(OnMediaPlayerEvent)(THIS_ MFP_EVENT_HEADER *pEventHeader) PURE;
    242 
    243     END_INTERFACE
    244 };
    245 #ifdef COBJMACROS
    246 #define IMFPMediaPlayerCallback_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
    247 #define IMFPMediaPlayerCallback_AddRef(This) (This)->lpVtbl->AddRef(This)
    248 #define IMFPMediaPlayerCallback_Release(This) (This)->lpVtbl->Release(This)
    249 #define IMFPMediaPlayerCallback_OnMediaPlayerEvent(This,pEventHeader) (This)->lpVtbl->OnMediaPlayerEvent(This,pEventHeader)
    250 #endif /*COBJMACROS*/
    251 
    252 typedef struct MFP_EVENT_HEADER {
    253   MFP_EVENT_TYPE        eEventType;
    254   HRESULT               hrEvent;
    255   IMFPMediaPlayer       *pMediaPlayer;
    256   MFP_MEDIAPLAYER_STATE eState;
    257   IPropertyStore        *pPropertyStore;
    258 } MFP_EVENT_HEADER;
    259 
    260 typedef struct MFP_PLAY_EVENT {
    261   MFP_EVENT_HEADER header;
    262   IMFPMediaItem    *pMediaItem;
    263 } MFP_PLAY_EVENT;
    264 
    265 typedef struct MFP_PAUSE_EVENT {
    266   MFP_EVENT_HEADER header;
    267   IMFPMediaItem    *pMediaItem;
    268 } MFP_PAUSE_EVENT;
    269 
    270 typedef struct MFP_STOP_EVENT {
    271   MFP_EVENT_HEADER header;
    272   IMFPMediaItem    *pMediaItem;
    273 } MFP_STOP_EVENT;
    274 
    275 typedef struct MFP_POSITION_SET_EVENT {
    276   MFP_EVENT_HEADER header;
    277   IMFPMediaItem    *pMediaItem;
    278 } MFP_POSITION_SET_EVENT;
    279 
    280 typedef struct MFP_RATE_SET_EVENT {
    281   MFP_EVENT_HEADER header;
    282   IMFPMediaItem    *pMediaItem;
    283   float            flRate;
    284 } MFP_RATE_SET_EVENT;
    285 
    286 typedef struct MFP_MEDIAITEM_CREATED_EVENT {
    287   MFP_EVENT_HEADER header;
    288   IMFPMediaItem    *pMediaItem;
    289   DWORD_PTR        dwUserData;
    290 } MFP_MEDIAITEM_CREATED_EVENT;
    291 
    292 typedef struct MFP_MEDIAITEM_SET_EVENT {
    293   MFP_EVENT_HEADER header;
    294   IMFPMediaItem    *pMediaItem;
    295 } MFP_MEDIAITEM_SET_EVENT;
    296 
    297 typedef struct MFP_FRAME_STEP_EVENT {
    298   MFP_EVENT_HEADER header;
    299   IMFPMediaItem    *pMediaItem;
    300 } MFP_FRAME_STEP_EVENT;
    301 
    302 typedef struct MFP_MEDIAITEM_CLEARED_EVENT {
    303   MFP_EVENT_HEADER header;
    304   IMFPMediaItem    *pMediaItem;
    305 } MFP_MEDIAITEM_CLEARED_EVENT;
    306 
    307 typedef struct MFP_MF_EVENT {
    308   MFP_EVENT_HEADER header;
    309   MediaEventType   MFEventType;
    310   IMFMediaEvent    *pMFMediaEvent;
    311   IMFPMediaItem    *pMediaItem;
    312 } MFP_MF_EVENT;
    313 
    314 typedef struct MFP_ERROR_EVENT {
    315   MFP_EVENT_HEADER header;
    316 } MFP_ERROR_EVENT;
    317 
    318 typedef struct MFP_PLAYBACK_ENDED_EVENT {
    319   MFP_EVENT_HEADER header;
    320   IMFPMediaItem    *pMediaItem;
    321 } MFP_PLAYBACK_ENDED_EVENT;
    322 
    323 typedef struct MFP_ACQUIRE_USER_CREDENTIAL_EVENT {
    324   MFP_EVENT_HEADER     header;
    325   DWORD_PTR            dwUserData;
    326   BOOL                 fProceedWithAuthentication;
    327   HRESULT              hrAuthenticationStatus;
    328   LPCWSTR              pwszURL;
    329   LPCWSTR              pwszSite;
    330   LPCWSTR              pwszRealm;
    331   LPCWSTR              pwszPackage;
    332   LONG                 nRetries;
    333   MFP_CREDENTIAL_FLAGS flags;
    334   IMFNetCredential     *pCredential;
    335 } MFP_ACQUIRE_USER_CREDENTIAL_EVENT;
    336 
    337 typedef UINT32 MFP_CREATION_OPTIONS;
    338 typedef UINT32 MFP_MEDIAITEM_CHARACTERISTICS;
    339 
    340 #ifdef __cplusplus
    341 extern "C" {
    342 #endif
    343 
    344 HRESULT WINAPI MFPCreateMediaPlayer(LPCWSTR pwszURL,WINBOOL fStartPlayback,MFP_CREATION_OPTIONS creationOptions,IMFPMediaPlayerCallback *pCallback,HWND hWnd,IMFPMediaPlayer **ppMediaPlayer);
    345 
    346 #ifdef __cplusplus
    347 }
    348 #endif
    349 
    350 #endif /*(WINVER >= 0x0601)*/
    351 
    352 #endif /*_INC_MFPLAY*/
    353