| 1 |
/* |
| 2 |
* Copyright 2019 Jactry Zeng for CodeWeavers |
| 3 |
* |
| 4 |
* This library is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU Lesser General Public |
| 6 |
* License as published by the Free Software Foundation; either |
| 7 |
* version 2.1 of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Lesser General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Lesser General Public |
| 15 |
* License along with this library; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
| 17 |
*/ |
| 18 |
|
| 19 |
import "mfidl.idl"; |
| 20 |
|
| 21 |
cpp_quote("EXTERN_GUID(CLSID_MFMediaEngineClassFactory, 0xb44392da, 0x499b, 0x446b, 0xa4, 0xcb, 0x00, 0x5f, 0xea, 0xd0, 0xe6, 0xd5);") |
| 22 |
|
| 23 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_AUDIO_CATEGORY, 0xc8d4c51d, 0x350e, 0x41f2, 0xba, 0x46, 0xfa, 0xeb, 0xbb, 0x08, 0x57, 0xf6);") |
| 24 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_AUDIO_ENDPOINT_ROLE, 0xd2cb93d1, 0x116a, 0x44f2, 0x93, 0x85, 0xf7, 0xd0, 0xfd, 0xa2, 0xfb, 0x46);") |
| 25 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE, 0x4e0212e2, 0xe18f, 0x41e1, 0x95, 0xe5, 0xc0, 0xe7, 0xe9, 0x23, 0x5b, 0xc3);") |
| 26 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE9, 0x052c2d39, 0x40c0, 0x4188, 0xab, 0x86, 0xf8, 0x28, 0x27, 0x3b, 0x75, 0x22);") |
| 27 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE10, 0x11a47afd, 0x6589, 0x4124, 0xb3, 0x12, 0x61, 0x58, 0xec, 0x51, 0x7f, 0xc3);") |
| 28 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE11, 0x1cf1315f, 0xce3f, 0x4035, 0x93, 0x91, 0x16, 0x14, 0x2f, 0x77, 0x51, 0x89);") |
| 29 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE_EDGE, 0xa6f3e465, 0x3aca, 0x442c, 0xa3, 0xf0, 0xad, 0x6d, 0xda, 0xd8, 0x39, 0xae);") |
| 30 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_CALLBACK, 0xc60381b8, 0x83a4, 0x41f8, 0xa3, 0xd0, 0xde, 0x05, 0x07, 0x68, 0x49, 0xa9);") |
| 31 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_COMPATIBILITY_MODE, 0x3ef26ad4, 0xdc54, 0x45de, 0xb9, 0xaf, 0x76, 0xc8, 0xc6, 0x6b, 0xfa, 0x8e);") |
| 32 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_COMPATIBILITY_MODE_WIN10, 0x5b25e089, 0x6ca7, 0x4139, 0xa2, 0xcb, 0xfc, 0xaa, 0xb3, 0x95, 0x52, 0xa3);") |
| 33 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_COMPATIBILITY_MODE_WWA_EDGE, 0x15b29098, 0x9f01, 0x4e4d, 0xb6, 0x5a, 0xc0, 0x6c, 0x6c, 0x89, 0xda, 0x2a);") |
| 34 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_CONTENT_PROTECTION_FLAGS, 0xe0350223, 0x5aaf, 0x4d76, 0xa7, 0xc3, 0x06, 0xde, 0x70, 0x89, 0x4d, 0xb4);") |
| 35 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_CONTENT_PROTECTION_MANAGER, 0xfdd6dfaa, 0xbd85, 0x4af3, 0x9e, 0x0f, 0xa0, 0x1d, 0x53, 0x9d, 0x87, 0x6a);") |
| 36 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_CONTINUE_ON_CODEC_ERROR, 0xdbcdb7f9, 0x48e4, 0x4295, 0xb7, 0x0d, 0xd5, 0x18, 0x23, 0x4e, 0xeb, 0x38);") |
| 37 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_COREWINDOW, 0xfccae4dc, 0x0b7f, 0x41c2, 0x9f, 0x96, 0x46, 0x59, 0x94, 0x8a, 0xcd, 0xdc);") |
| 38 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_DXGI_MANAGER, 0x065702da, 0x1094, 0x486d, 0x86, 0x17, 0xee, 0x7c, 0xc4, 0xee, 0x46, 0x48);") |
| 39 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_EME_CALLBACK, 0x494553a7, 0xa481, 0x4cb7, 0xbe, 0xc5, 0x38, 0x09, 0x03, 0x51, 0x37, 0x31);") |
| 40 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_EXTENSION, 0x3109fd46, 0x060d, 0x4b62, 0x8d, 0xcf, 0xfa, 0xff, 0x81, 0x13, 0x18, 0xd2);") |
| 41 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_MEDIA_PLAYER_MODE, 0x3ddd8d45, 0x5aa1, 0x4112, 0x82, 0xe5, 0x36, 0xf6, 0xa2, 0x19, 0x7e, 0x6e);") |
| 42 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_NEEDKEY_CALLBACK, 0x7ea80843, 0xb6e4, 0x432c, 0x8e, 0xa4, 0x78, 0x48, 0xff, 0xe4, 0x22, 0x0e);") |
| 43 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_OPM_HWND, 0xa0be8ee7, 0x0572, 0x4f2c, 0xa8, 0x01, 0x2a, 0x15, 0x1b, 0xd3, 0xe7, 0x26);") |
| 44 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_PLAYBACK_HWND, 0xd988879b, 0x67c9, 0x4d92, 0xba, 0xa7, 0x6e, 0xad, 0xd4, 0x46, 0x03, 0x9d);") |
| 45 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_PLAYBACK_VISUAL, 0x6debd26f, 0x6ab9, 0x4d7e, 0xb0, 0xee, 0xc6, 0x1a, 0x73, 0xff, 0xad, 0x15);") |
| 46 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_SOURCE_RESOLVER_CONFIG_STORE, 0x0ac0c497, 0xb3c4, 0x48c9, 0x9c, 0xde, 0xbb, 0x8c, 0xa2, 0x44, 0x2c, 0xa3);") |
| 47 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_STREAM_CONTAINS_ALPHA_CHANNEL, 0x5cbfaf44, 0xd2b2, 0x4cfb, 0x80, 0xa7, 0xd4, 0x29, 0xc7, 0x4c, 0x78, 0x9d);") |
| 48 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_SYNCHRONOUS_CLOSE, 0xc3c2e12f, 0x7e0e, 0x4e43, 0xb9, 0x1c, 0xdc, 0x99, 0x2c, 0xcd, 0xfa, 0x5e);") |
| 49 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_TELEMETRY_APPLICATION_ID, 0x1e7b273b, 0xa7e4, 0x402a, 0x8f, 0x51, 0xc4, 0x8e, 0x88, 0xa2, 0xca, 0xbc);") |
| 50 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_TRACK_ID, 0x65bea312, 0x4043, 0x4815, 0x8e, 0xab, 0x44, 0xdc, 0xe2, 0xef, 0x8f, 0x2a);") |
| 51 |
cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_VIDEO_OUTPUT_FORMAT, 0x5066893c, 0x8cf9, 0x42bc, 0x8b, 0x8a, 0x47, 0x22, 0x12, 0xe5, 0x27, 0x26);") |
| 52 |
|
| 53 |
typedef enum MF_MEDIA_ENGINE_NETWORK |
| 54 |
{ |
| 55 |
MF_MEDIA_ENGINE_NETWORK_EMPTY, |
| 56 |
MF_MEDIA_ENGINE_NETWORK_IDLE, |
| 57 |
MF_MEDIA_ENGINE_NETWORK_LOADING, |
| 58 |
MF_MEDIA_ENGINE_NETWORK_NO_SOURCE |
| 59 |
} MF_MEDIA_ENGINE_NETWORK; |
| 60 |
|
| 61 |
typedef enum MF_MEDIA_ENGINE_ERR |
| 62 |
{ |
| 63 |
MF_MEDIA_ENGINE_ERR_NOERROR, |
| 64 |
MF_MEDIA_ENGINE_ERR_ABORTED, |
| 65 |
MF_MEDIA_ENGINE_ERR_NETWORK, |
| 66 |
MF_MEDIA_ENGINE_ERR_DECODE, |
| 67 |
MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED, |
| 68 |
MF_MEDIA_ENGINE_ERR_ENCRYPTED |
| 69 |
} MF_MEDIA_ENGINE_ERR; |
| 70 |
|
| 71 |
typedef enum MF_MEDIA_ENGINE_PRELOAD |
| 72 |
{ |
| 73 |
MF_MEDIA_ENGINE_PRELOAD_MISSING, |
| 74 |
MF_MEDIA_ENGINE_PRELOAD_EMPTY, |
| 75 |
MF_MEDIA_ENGINE_PRELOAD_NONE, |
| 76 |
MF_MEDIA_ENGINE_PRELOAD_METADATA, |
| 77 |
MF_MEDIA_ENGINE_PRELOAD_AUTOMATIC |
| 78 |
} MF_MEDIA_ENGINE_PRELOAD; |
| 79 |
|
| 80 |
typedef enum MF_MEDIA_ENGINE_CANPLAY |
| 81 |
{ |
| 82 |
MF_MEDIA_ENGINE_CANPLAY_NOT_SUPPORTED, |
| 83 |
MF_MEDIA_ENGINE_CANPLAY_MAYBE, |
| 84 |
MF_MEDIA_ENGINE_CANPLAY_PROBABLY, |
| 85 |
} MF_MEDIA_ENGINE_CANPLAY; |
| 86 |
|
| 87 |
cpp_quote("#ifndef _MFVideoNormalizedRect_") |
| 88 |
cpp_quote("#define _MFVideoNormalizedRect_") |
| 89 |
typedef struct MFVideoNormalizedRect |
| 90 |
{ |
| 91 |
float left; |
| 92 |
float top; |
| 93 |
float right; |
| 94 |
float bottom; |
| 95 |
} MFVideoNormalizedRect; |
| 96 |
cpp_quote("#endif") |
| 97 |
|
| 98 |
typedef enum MF_MEDIA_ENGINE_CREATEFLAGS |
| 99 |
{ |
| 100 |
MF_MEDIA_ENGINE_AUDIOONLY = 0x1, |
| 101 |
MF_MEDIA_ENGINE_WAITFORSTABLE_STATE = 0x2, |
| 102 |
MF_MEDIA_ENGINE_FORCEMUTE = 0x4, |
| 103 |
MF_MEDIA_ENGINE_REAL_TIME_MODE = 0x8, |
| 104 |
MF_MEDIA_ENGINE_DISABLE_LOCAL_PLUGINS = 0x10, |
| 105 |
MF_MEDIA_ENGINE_CREATEFLAGS_MASK = 0x1f |
| 106 |
} MF_MEDIA_ENGINE_CREATEFLAGS; |
| 107 |
|
| 108 |
typedef enum MF_MEDIA_ENGINE_EVENT |
| 109 |
{ |
| 110 |
MF_MEDIA_ENGINE_EVENT_LOADSTART = 1, |
| 111 |
MF_MEDIA_ENGINE_EVENT_PROGRESS = 2, |
| 112 |
MF_MEDIA_ENGINE_EVENT_SUSPEND = 3, |
| 113 |
MF_MEDIA_ENGINE_EVENT_ABORT = 4, |
| 114 |
MF_MEDIA_ENGINE_EVENT_ERROR = 5, |
| 115 |
MF_MEDIA_ENGINE_EVENT_EMPTIED = 6, |
| 116 |
MF_MEDIA_ENGINE_EVENT_STALLED = 7, |
| 117 |
MF_MEDIA_ENGINE_EVENT_PLAY = 8, |
| 118 |
MF_MEDIA_ENGINE_EVENT_PAUSE = 9, |
| 119 |
MF_MEDIA_ENGINE_EVENT_LOADEDMETADATA = 10, |
| 120 |
MF_MEDIA_ENGINE_EVENT_LOADEDDATA = 11, |
| 121 |
MF_MEDIA_ENGINE_EVENT_WAITING = 12, |
| 122 |
MF_MEDIA_ENGINE_EVENT_PLAYING = 13, |
| 123 |
MF_MEDIA_ENGINE_EVENT_CANPLAY = 14, |
| 124 |
MF_MEDIA_ENGINE_EVENT_CANPLAYTHROUGH = 15, |
| 125 |
MF_MEDIA_ENGINE_EVENT_SEEKING = 16, |
| 126 |
MF_MEDIA_ENGINE_EVENT_SEEKED = 17, |
| 127 |
MF_MEDIA_ENGINE_EVENT_TIMEUPDATE = 18, |
| 128 |
MF_MEDIA_ENGINE_EVENT_ENDED = 19, |
| 129 |
MF_MEDIA_ENGINE_EVENT_RATECHANGE = 20, |
| 130 |
MF_MEDIA_ENGINE_EVENT_DURATIONCHANGE = 21, |
| 131 |
MF_MEDIA_ENGINE_EVENT_VOLUMECHANGE = 22, |
| 132 |
MF_MEDIA_ENGINE_EVENT_FORMATCHANGE = 1000, |
| 133 |
MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS = 1001, |
| 134 |
MF_MEDIA_ENGINE_EVENT_TIMELINE_MARKER = 1002, |
| 135 |
MF_MEDIA_ENGINE_EVENT_BALANCECHANGE = 1003, |
| 136 |
MF_MEDIA_ENGINE_EVENT_DOWNLOADCOMPLETE = 1004, |
| 137 |
MF_MEDIA_ENGINE_EVENT_BUFFERINGSTARTED = 1005, |
| 138 |
MF_MEDIA_ENGINE_EVENT_BUFFERINGENDED = 1006, |
| 139 |
MF_MEDIA_ENGINE_EVENT_FRAMESTEPCOMPLETED = 1007, |
| 140 |
MF_MEDIA_ENGINE_EVENT_NOTIFYSTABLESTATE = 1008, |
| 141 |
MF_MEDIA_ENGINE_EVENT_FIRSTFRAMEREADY = 1009, |
| 142 |
MF_MEDIA_ENGINE_EVENT_TRACKSCHANGE = 1010, |
| 143 |
MF_MEDIA_ENGINE_EVENT_OPMINFO = 1011, |
| 144 |
MF_MEDIA_ENGINE_EVENT_RESOURCELOST = 1012, |
| 145 |
MF_MEDIA_ENGINE_EVENT_DELAYLOADEVENT_CHANGED = 1013, |
| 146 |
MF_MEDIA_ENGINE_EVENT_STREAMRENDERINGERROR = 1014, |
| 147 |
MF_MEDIA_ENGINE_EVENT_SUPPORTEDRATES_CHANGED = 1015, |
| 148 |
MF_MEDIA_ENGINE_EVENT_AUDIOENDPOINTCHANGE = 1016, |
| 149 |
} MF_MEDIA_ENGINE_EVENT; |
| 150 |
|
| 151 |
typedef enum MF_MEDIA_ENGINE_READY |
| 152 |
{ |
| 153 |
MF_MEDIA_ENGINE_READY_HAVE_NOTHING, |
| 154 |
MF_MEDIA_ENGINE_READY_HAVE_METADATA, |
| 155 |
MF_MEDIA_ENGINE_READY_HAVE_CURRENT_DATA, |
| 156 |
MF_MEDIA_ENGINE_READY_HAVE_FUTURE_DATA, |
| 157 |
MF_MEDIA_ENGINE_READY_HAVE_ENOUGH_DATA, |
| 158 |
} MF_MEDIA_ENGINE_READY; |
| 159 |
|
| 160 |
[ |
| 161 |
object, |
| 162 |
uuid(fc0e10d2-ab2a-4501-a951-06bb1075184c), |
| 163 |
local, |
| 164 |
pointer_default(unique) |
| 165 |
] |
| 166 |
interface IMFMediaError : IUnknown |
| 167 |
{ |
| 168 |
USHORT GetErrorCode(); |
| 169 |
HRESULT GetExtendedErrorCode(); |
| 170 |
HRESULT SetErrorCode([in] MF_MEDIA_ENGINE_ERR error); |
| 171 |
HRESULT SetExtendedErrorCode([in] HRESULT error); |
| 172 |
} |
| 173 |
|
| 174 |
[ |
| 175 |
object, |
| 176 |
uuid(7a5e5354-b114-4c72-b991-3131d75032ea), |
| 177 |
local, |
| 178 |
pointer_default(unique) |
| 179 |
] |
| 180 |
interface IMFMediaEngineSrcElements : IUnknown |
| 181 |
{ |
| 182 |
DWORD GetLength(); |
| 183 |
HRESULT GetURL([in] DWORD index, [out] BSTR *url); |
| 184 |
HRESULT GetType([in] DWORD index, [out] BSTR *type); |
| 185 |
HRESULT GetMedia([in] DWORD index, [out] BSTR *media); |
| 186 |
HRESULT AddElement([in] BSTR url, [in] BSTR type, [in] BSTR media); |
| 187 |
HRESULT RemoveAllElements(); |
| 188 |
} |
| 189 |
|
| 190 |
[ |
| 191 |
object, |
| 192 |
uuid(db71a2fc-078a-414e-9df9-8c2531b0aa6c), |
| 193 |
local, |
| 194 |
pointer_default(unique) |
| 195 |
] |
| 196 |
interface IMFMediaTimeRange : IUnknown |
| 197 |
{ |
| 198 |
DWORD GetLength(); |
| 199 |
HRESULT GetStart([in] DWORD index, [out] double *start); |
| 200 |
HRESULT GetEnd([in] DWORD index, [out] double *end); |
| 201 |
BOOL ContainsTime([in] double time); |
| 202 |
HRESULT AddRange([in] double start, [in] double end); |
| 203 |
HRESULT Clear(); |
| 204 |
} |
| 205 |
|
| 206 |
[ |
| 207 |
object, |
| 208 |
uuid(98a1b0bb-03eb-4935-ae7c-93c1fa0e1c93), |
| 209 |
local, |
| 210 |
pointer_default(unique) |
| 211 |
] |
| 212 |
interface IMFMediaEngine : IUnknown |
| 213 |
{ |
| 214 |
HRESULT GetError([out] IMFMediaError **error); |
| 215 |
HRESULT SetErrorCode([in] MF_MEDIA_ENGINE_ERR error); |
| 216 |
HRESULT SetSourceElements([in] IMFMediaEngineSrcElements *elements); |
| 217 |
HRESULT SetSource([in] BSTR url); |
| 218 |
HRESULT GetCurrentSource([out] BSTR *url); |
| 219 |
USHORT GetNetworkState(); |
| 220 |
MF_MEDIA_ENGINE_PRELOAD GetPreload(); |
| 221 |
HRESULT SetPreload([in] MF_MEDIA_ENGINE_PRELOAD preload); |
| 222 |
HRESULT GetBuffered([out] IMFMediaTimeRange **buffered); |
| 223 |
HRESULT Load(); |
| 224 |
HRESULT CanPlayType([in] BSTR type, [out] MF_MEDIA_ENGINE_CANPLAY *answer); |
| 225 |
USHORT GetReadyState(); |
| 226 |
BOOL IsSeeking(); |
| 227 |
cpp_quote("#undef GetCurrentTime") |
| 228 |
double GetCurrentTime(); |
| 229 |
HRESULT SetCurrentTime([in] double time); |
| 230 |
double GetStartTime(); |
| 231 |
double GetDuration(); |
| 232 |
BOOL IsPaused(); |
| 233 |
double GetDefaultPlaybackRate(); |
| 234 |
HRESULT SetDefaultPlaybackRate([in] double rate); |
| 235 |
double GetPlaybackRate(); |
| 236 |
HRESULT SetPlaybackRate([in] double rate); |
| 237 |
HRESULT GetPlayed([out] IMFMediaTimeRange **played); |
| 238 |
HRESULT GetSeekable([out] IMFMediaTimeRange **seekable); |
| 239 |
BOOL IsEnded(); |
| 240 |
BOOL GetAutoPlay(); |
| 241 |
HRESULT SetAutoPlay([in] BOOL autoplay); |
| 242 |
BOOL GetLoop(); |
| 243 |
HRESULT SetLoop([in] BOOL loop); |
| 244 |
HRESULT Play(); |
| 245 |
HRESULT Pause(); |
| 246 |
BOOL GetMuted(); |
| 247 |
HRESULT SetMuted([in] BOOL muted); |
| 248 |
double GetVolume(); |
| 249 |
HRESULT SetVolume([in] double volume); |
| 250 |
BOOL HasVideo(); |
| 251 |
BOOL HasAudio(); |
| 252 |
HRESULT GetNativeVideoSize([out] DWORD *cx, [out] DWORD *cy); |
| 253 |
HRESULT GetVideoAspectRatio([out] DWORD *cx, [out] DWORD *cy); |
| 254 |
HRESULT Shutdown(); |
| 255 |
HRESULT TransferVideoFrame([in] IUnknown *surface, [in] const MFVideoNormalizedRect *src, |
| 256 |
[in] const RECT *dst, [in] const MFARGB *color); |
| 257 |
HRESULT OnVideoStreamTick([out] LONGLONG *time); |
| 258 |
} |
| 259 |
|
| 260 |
typedef enum MF_MEDIA_ENGINE_STATISTIC |
| 261 |
{ |
| 262 |
MF_MEDIA_ENGINE_STATISTIC_FRAMES_RENDERED, |
| 263 |
MF_MEDIA_ENGINE_STATISTIC_FRAMES_DROPPED, |
| 264 |
MF_MEDIA_ENGINE_STATISTIC_BYTES_DOWNLOADED, |
| 265 |
MF_MEDIA_ENGINE_STATISTIC_BUFFER_PROGRESS, |
| 266 |
MF_MEDIA_ENGINE_STATISTIC_FRAMES_PER_SECOND, |
| 267 |
MF_MEDIA_ENGINE_STATISTIC_PLAYBACK_JITTER, |
| 268 |
MF_MEDIA_ENGINE_STATISTIC_FRAMES_CORRUPTED, |
| 269 |
MF_MEDIA_ENGINE_STATISTIC_TOTAL_FRAME_DELAY, |
| 270 |
} MF_MEDIA_ENGINE_STATISTIC; |
| 271 |
|
| 272 |
typedef enum MF_MEDIA_ENGINE_S3D_PACKING_MODE |
| 273 |
{ |
| 274 |
MF_MEDIA_ENGINE_S3D_PACKING_MODE_NONE, |
| 275 |
MF_MEDIA_ENGINE_S3D_PACKING_MODE_SIDE_BY_SIDE, |
| 276 |
MF_MEDIA_ENGINE_S3D_PACKING_MODE_TOP_BOTTOM |
| 277 |
} MF_MEDIA_ENGINE_S3D_PACKING_MODE; |
| 278 |
|
| 279 |
typedef enum MF_MEDIA_ENGINE_SEEK_MODE |
| 280 |
{ |
| 281 |
MF_MEDIA_ENGINE_SEEK_MODE_NORMAL, |
| 282 |
MF_MEDIA_ENGINE_SEEK_MODE_APPROXIMATE, |
| 283 |
} MF_MEDIA_ENGINE_SEEK_MODE; |
| 284 |
|
| 285 |
[ |
| 286 |
object, |
| 287 |
uuid(83015ead-b1e6-40d0-a98a-37145ffe1ad1), |
| 288 |
local, |
| 289 |
pointer_default(unique) |
| 290 |
] |
| 291 |
interface IMFMediaEngineEx : IMFMediaEngine |
| 292 |
{ |
| 293 |
HRESULT SetSourceFromByteStream([in] IMFByteStream *bytestream, [in] BSTR url); |
| 294 |
HRESULT GetStatistics([in] MF_MEDIA_ENGINE_STATISTIC stat_id, [out] PROPVARIANT *stat); |
| 295 |
HRESULT UpdateVideoStream([in] const MFVideoNormalizedRect *src, |
| 296 |
[in] const RECT *dst, [in] const MFARGB *border_color); |
| 297 |
double GetBalance(); |
| 298 |
HRESULT SetBalance([in] double balance); |
| 299 |
BOOL IsPlaybackRateSupported([in] double rate); |
| 300 |
HRESULT FrameStep([in] BOOL forward); |
| 301 |
HRESULT GetResourceCharacteristics([out] DWORD *flags); |
| 302 |
HRESULT GetPresentationAttribute([in] REFGUID attribute, [out] PROPVARIANT *value); |
| 303 |
HRESULT GetNumberOfStreams([out] DWORD *stream_count); |
| 304 |
HRESULT GetStreamAttribute([in] DWORD stream_index, [in] REFGUID attribute, [out] PROPVARIANT *value); |
| 305 |
HRESULT GetStreamSelection([in] DWORD stream_index, [out] BOOL *enabled); |
| 306 |
HRESULT SetStreamSelection([in] DWORD stream_index, [in] BOOL enabled); |
| 307 |
HRESULT ApplyStreamSelections(); |
| 308 |
HRESULT IsProtected([out] BOOL *is_protected); |
| 309 |
HRESULT InsertVideoEffect([in] IUnknown *effect, [in] BOOL is_optional); |
| 310 |
HRESULT InsertAudioEffect([in] IUnknown *effect, [in] BOOL is_optional); |
| 311 |
HRESULT RemoveAllEffects(); |
| 312 |
HRESULT SetTimelineMarkerTimer([in] double timeout); |
| 313 |
HRESULT GetTimelineMarkerTimer([out] double *timeout); |
| 314 |
HRESULT CancelTimelineMarkerTimer(); |
| 315 |
BOOL IsStereo3D(); |
| 316 |
HRESULT GetStereo3DFramePackingMode([out] MF_MEDIA_ENGINE_S3D_PACKING_MODE *mode); |
| 317 |
HRESULT SetStereo3DFramePackingMode([in] MF_MEDIA_ENGINE_S3D_PACKING_MODE mode); |
| 318 |
HRESULT GetStereo3DRenderMode([out] MF3DVideoOutputType *output_type); |
| 319 |
HRESULT SetStereo3DRenderMode([in] MF3DVideoOutputType output_type); |
| 320 |
HRESULT EnableWindowlessSwapchainMode([in] BOOL enable); |
| 321 |
HRESULT GetVideoSwapchainHandle([out] HANDLE *swapchain); |
| 322 |
HRESULT EnableHorizontalMirrorMode([in] BOOL enable); |
| 323 |
HRESULT GetAudioStreamCategory([out] UINT32 *category); |
| 324 |
HRESULT SetAudioStreamCategory([in] UINT32 category); |
| 325 |
HRESULT GetAudioEndpointRole([out] UINT32 *role); |
| 326 |
HRESULT SetAudioEndpointRole([in] UINT32 role); |
| 327 |
HRESULT GetRealTimeMode([out] BOOL *enabled); |
| 328 |
HRESULT SetRealTimeMode([in] BOOL enable); |
| 329 |
HRESULT SetCurrentTimeEx([in] double seektime, [in] MF_MEDIA_ENGINE_SEEK_MODE mode); |
| 330 |
HRESULT EnableTimeUpdateTimer([in] BOOL enable); |
| 331 |
} |
| 332 |
|
| 333 |
[ |
| 334 |
object, |
| 335 |
uuid(4d645ace-26aa-4688-9be1-df3516990b93), |
| 336 |
local, |
| 337 |
pointer_default(unique) |
| 338 |
] |
| 339 |
interface IMFMediaEngineClassFactory : IUnknown |
| 340 |
{ |
| 341 |
HRESULT CreateInstance([in] DWORD flags, [in] IMFAttributes *attributes, [out] IMFMediaEngine **engine); |
| 342 |
HRESULT CreateTimeRange([out] IMFMediaTimeRange **range); |
| 343 |
HRESULT CreateError([out] IMFMediaError **error); |
| 344 |
} |
| 345 |
|
| 346 |
[ |
| 347 |
object, |
| 348 |
uuid(a7901327-05dd-4469-a7b7-0e01979e361d), |
| 349 |
local, |
| 350 |
pointer_default(unique) |
| 351 |
] |
| 352 |
interface IMFMediaSourceExtensionNotify : IUnknown |
| 353 |
{ |
| 354 |
void OnSourceOpen(); |
| 355 |
void OnSourceEnded(); |
| 356 |
void OnSourceClose(); |
| 357 |
}; |
| 358 |
|
| 359 |
[ |
| 360 |
object, |
| 361 |
uuid(87e47623-2ceb-45d6-9b88-d8520c4dcbbc), |
| 362 |
local, |
| 363 |
pointer_default(unique) |
| 364 |
] |
| 365 |
interface IMFSourceBufferNotify : IUnknown |
| 366 |
{ |
| 367 |
void OnUpdateStart(); |
| 368 |
void OnAbort(); |
| 369 |
void OnError([in] HRESULT hr); |
| 370 |
void OnUpdate(); |
| 371 |
void OnUpdateEnd(); |
| 372 |
}; |
| 373 |
|
| 374 |
[ |
| 375 |
object, |
| 376 |
uuid(e2cd3a4b-af25-4d3d-9110-da0e6f8ee877), |
| 377 |
local, |
| 378 |
pointer_default(unique) |
| 379 |
] |
| 380 |
interface IMFSourceBuffer : IUnknown |
| 381 |
{ |
| 382 |
BOOL GetUpdating(); |
| 383 |
HRESULT GetBuffered([out] IMFMediaTimeRange **buffered); |
| 384 |
double GetTimeStampOffset(); |
| 385 |
HRESULT SetTimeStampOffset([in] double offset); |
| 386 |
double GetAppendWindowStart(); |
| 387 |
HRESULT SetAppendWindowStart([in] double time); |
| 388 |
double GetAppendWindowEnd(); |
| 389 |
HRESULT SetAppendWindowEnd([in] double time); |
| 390 |
HRESULT Append([in] const BYTE *data,[in] DWORD len); |
| 391 |
HRESULT AppendByteStream([in] IMFByteStream *stream, [in] DWORDLONG *max_len); |
| 392 |
HRESULT Abort(); |
| 393 |
HRESULT Remove([in] double start, [in] double end); |
| 394 |
}; |
| 395 |
|
| 396 |
[ |
| 397 |
object, |
| 398 |
uuid(249981f8-8325-41f3-b80c-3b9e3aad0cbe), |
| 399 |
local, |
| 400 |
pointer_default(unique) |
| 401 |
] |
| 402 |
interface IMFSourceBufferList : IUnknown |
| 403 |
{ |
| 404 |
DWORD GetLength(); |
| 405 |
IMFSourceBuffer *GetSourceBuffer([in] DWORD index); |
| 406 |
}; |
| 407 |
|
| 408 |
typedef enum MF_MSE_READY |
| 409 |
{ |
| 410 |
MF_MSE_READY_CLOSED = 1, |
| 411 |
MF_MSE_READY_OPEN, |
| 412 |
MF_MSE_READY_ENDED, |
| 413 |
} MF_MSE_READY; |
| 414 |
|
| 415 |
typedef enum MF_MSE_ERROR |
| 416 |
{ |
| 417 |
MF_MSE_ERROR_NOERROR, |
| 418 |
MF_MSE_ERROR_NETWORK, |
| 419 |
MF_MSE_ERROR_DECODE, |
| 420 |
MF_MSE_ERROR_UNKNOWN_ERROR |
| 421 |
} MF_MSE_ERROR; |
| 422 |
|
| 423 |
[ |
| 424 |
object, |
| 425 |
uuid(e467b94e-a713-4562-a802-816a42e9008a), |
| 426 |
local, |
| 427 |
pointer_default(unique) |
| 428 |
] |
| 429 |
interface IMFMediaSourceExtension : IUnknown |
| 430 |
{ |
| 431 |
IMFSourceBufferList *GetSourceBuffers(); |
| 432 |
IMFSourceBufferList *GetActiveSourceBuffers(); |
| 433 |
MF_MSE_READY GetReadyState(); |
| 434 |
double GetDuration(); |
| 435 |
HRESULT SetDuration([in] double duration); |
| 436 |
HRESULT AddSourceBuffer([in] BSTR type, [in] IMFSourceBufferNotify *notify, [out] IMFSourceBuffer **source_buffer); |
| 437 |
HRESULT RemoveSourceBuffer([in] IMFSourceBuffer *source_buffer); |
| 438 |
HRESULT SetEndOfStream([in] MF_MSE_ERROR error); |
| 439 |
BOOL IsTypeSupported([in] BSTR type); |
| 440 |
IMFSourceBuffer *GetSourceBuffer([in] DWORD stream_index); |
| 441 |
}; |
| 442 |
|
| 443 |
[ |
| 444 |
object, |
| 445 |
uuid(fee7c112-e776-42b5-9bbf-0048524e2bd5), |
| 446 |
local, |
| 447 |
pointer_default(unique) |
| 448 |
] |
| 449 |
interface IMFMediaEngineNotify : IUnknown |
| 450 |
{ |
| 451 |
HRESULT EventNotify([in] DWORD event, [in] DWORD_PTR param1, [in] DWORD param2); |
| 452 |
} |
| 453 |
|
| 454 |
[ |
| 455 |
object, |
| 456 |
uuid(7a3bac98-0e76-49fb-8c20-8a86fd98eaf2), |
| 457 |
local, |
| 458 |
pointer_default(unique) |
| 459 |
] |
| 460 |
interface IMFMediaEngineAudioEndpointId : IUnknown |
| 461 |
{ |
| 462 |
HRESULT SetAudioEndpointId([in] LPCWSTR id); |
| 463 |
HRESULT GetAudioEndpointId([out] LPWSTR *id); |
| 464 |
} |
| 465 |
|
| 466 |
[ |
| 467 |
object, |
| 468 |
uuid(2f69d622-20b5-41e9-afdf-89ced1dda04e), |
| 469 |
local, |
| 470 |
pointer_default(unique) |
| 471 |
] |
| 472 |
interface IMFMediaEngineExtension : IUnknown |
| 473 |
{ |
| 474 |
HRESULT CanPlayType([in] BOOL audio_only, [in] BSTR mime_type, [out] MF_MEDIA_ENGINE_CANPLAY *answer); |
| 475 |
HRESULT BeginCreateObject([in] BSTR url, [in] IMFByteStream *bytestream, [in] MF_OBJECT_TYPE type, |
| 476 |
[out] IUnknown **cancel_cookie, [in] IMFAsyncCallback *callback, [in] IUnknown *state); |
| 477 |
HRESULT CancelObjectCreation([in] IUnknown *cancel_cookie); |
| 478 |
HRESULT EndCreateObject([in] IMFAsyncResult *result, [out] IUnknown **object); |
| 479 |
} |
| 480 |
|
| 481 |
[ |
| 482 |
object, |
| 483 |
uuid(6a0083f9-8947-4c1d-9ce0-cdee22b23135), |
| 484 |
local, |
| 485 |
pointer_default(unique) |
| 486 |
] |
| 487 |
interface IMFMediaKeySessionNotify : IUnknown |
| 488 |
{ |
| 489 |
void KeyMessage([in] BSTR destination_url, [in] const BYTE *message, [in] DWORD message_len); |
| 490 |
void KeyAdded(); |
| 491 |
void KeyError([in] USHORT code, [in] DWORD system_code); |
| 492 |
} |
| 493 |
|
| 494 |
[ |
| 495 |
object, |
| 496 |
uuid(24fa67d5-d1d0-4dc5-995c-c0efdc191fb5), |
| 497 |
local, |
| 498 |
pointer_default(unique) |
| 499 |
] |
| 500 |
interface IMFMediaKeySession : IUnknown |
| 501 |
{ |
| 502 |
HRESULT GetError([out] USHORT *code, [out] DWORD *system_code); |
| 503 |
HRESULT get_KeySystem([out] BSTR *key_system); |
| 504 |
HRESULT get_SessionId([out] BSTR *session_id); |
| 505 |
HRESULT Update([in] const BYTE *key, [in] DWORD key_len); |
| 506 |
HRESULT Close(); |
| 507 |
} |
| 508 |
|
| 509 |
[ |
| 510 |
object, |
| 511 |
uuid(7a5645d2-43bd-47fd-87b7-dcd24cc7d692), |
| 512 |
pointer_default(unique) |
| 513 |
] |
| 514 |
interface IMFCdmSuspendNotify : IUnknown |
| 515 |
{ |
| 516 |
HRESULT Begin(); |
| 517 |
HRESULT End(); |
| 518 |
} |
| 519 |
|
| 520 |
[ |
| 521 |
object, |
| 522 |
uuid(5cb31c05-61ff-418f-afda-caaf41421a38), |
| 523 |
local, |
| 524 |
pointer_default(unique) |
| 525 |
] |
| 526 |
interface IMFMediaKeys : IUnknown |
| 527 |
{ |
| 528 |
HRESULT CreateSession([in] BSTR mime_type, [in] const BYTE *init_data, [in] DWORD init_data_len, |
| 529 |
[in] const BYTE *custom_data, [in] DWORD custom_data_len, |
| 530 |
[in] IMFMediaKeySessionNotify *notify, [out] IMFMediaKeySession **session); |
| 531 |
HRESULT get_KeySystem([out] BSTR *key_system); |
| 532 |
HRESULT Shutdown(); |
| 533 |
HRESULT GetSuspendNotify([out] IMFCdmSuspendNotify **notify); |
| 534 |
} |
| 535 |
|
| 536 |
[ |
| 537 |
object, |
| 538 |
uuid(c56156c6-ea5b-48a5-9df8-fbe035d0929e), |
| 539 |
local, |
| 540 |
pointer_default(unique) |
| 541 |
] |
| 542 |
interface IMFMediaEngineClassFactoryEx : IMFMediaEngineClassFactory |
| 543 |
{ |
| 544 |
HRESULT CreateMediaSourceExtension([in] DWORD flags, [in] IMFAttributes *attr, [out] IMFMediaSourceExtension **mse); |
| 545 |
HRESULT CreateMediaKeys([in] BSTR key_system, [in] BSTR cdm_store_path, [out] IMFMediaKeys **keys); |
| 546 |
HRESULT IsTypeSupported([in] BSTR type, [in] BSTR key_system, [out] BOOL *is_supported); |
| 547 |
} |
| 548 |
|
| 549 |
[ |
| 550 |
object, |
| 551 |
uuid(09083cef-867f-4bf6-8776-dee3a7b42fca), |
| 552 |
local, |
| 553 |
pointer_default(unique) |
| 554 |
] |
| 555 |
interface IMFMediaEngineClassFactory2 : IUnknown |
| 556 |
{ |
| 557 |
HRESULT CreateMediaKeys2([in] BSTR key_system, [in] BSTR default_cdm_store_path, |
| 558 |
[in] BSTR inprivate_cdm_store_path, [out] IMFMediaKeys **keys); |
| 559 |
} |