joy.cpl: Fix pulsing buttons in joystick button state display.
[wine/zf.git] / include / mfplay.idl
blob415a6f52414b57b418f17696354ff40ef0fe78fb
1 /*
2 * Copyright 2019 Nikolay Sivov for CodeWeavers
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.
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.
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
19 import "unknwn.idl";
20 import "propsys.idl";
21 import "evr.idl";
23 typedef [v1_enum] enum _MFP_CREATION_OPTIONS
25 MFP_OPTION_NONE = 0,
26 MFP_OPTION_FREE_THREADED_CALLBACK = 0x1,
27 MFP_OPTION_NO_MMCSS = 0x2,
28 MFP_OPTION_NO_REMOTE_DESKTOP_OPTIMIZATION = 0x4,
29 } MFP_CREATION_OPTIONS;
31 typedef [v1_enum] enum MFP_MEDIAPLAYER_STATE
33 MFP_MEDIAPLAYER_STATE_EMPTY = 0,
34 MFP_MEDIAPLAYER_STATE_STOPPED,
35 MFP_MEDIAPLAYER_STATE_PLAYING,
36 MFP_MEDIAPLAYER_STATE_PAUSED,
37 MFP_MEDIAPLAYER_STATE_SHUTDOWN,
38 } MFP_MEDIAPLAYER_STATE;
40 typedef enum MFP_EVENT_TYPE
42 MFP_EVENT_TYPE_PLAY = 0,
43 MFP_EVENT_TYPE_PAUSE,
44 MFP_EVENT_TYPE_STOP,
45 MFP_EVENT_TYPE_POSITION_SET,
46 MFP_EVENT_TYPE_RATE_SET,
47 MFP_EVENT_TYPE_MEDIAITEM_CREATED,
48 MFP_EVENT_TYPE_MEDIAITEM_SET,
49 MFP_EVENT_TYPE_FRAME_STEP,
50 MFP_EVENT_TYPE_MEDIAITEM_CLEARED,
51 MFP_EVENT_TYPE_MF,
52 MFP_EVENT_TYPE_ERROR,
53 MFP_EVENT_TYPE_PLAYBACK_ENDED,
54 MFP_EVENT_TYPE_ACQUIRE_USER_CREDENTIAL,
55 } MFP_EVENT_TYPE;
57 interface IMFPMediaPlayer;
58 interface IMFPMediaItem;
60 typedef struct MFP_EVENT_HEADER
62 MFP_EVENT_TYPE eEventType;
63 HRESULT hrEvent;
64 IMFPMediaPlayer *pMediaPlayer;
65 MFP_MEDIAPLAYER_STATE eState;
66 IPropertyStore *pPropertyStore;
67 } MFP_EVENT_HEADER;
70 object,
71 uuid(766c8ffb-5fdb-4fea-a28d-b912996f51bd),
72 local,
74 interface IMFPMediaPlayerCallback : IUnknown
76 void OnMediaPlayerEvent([in] MFP_EVENT_HEADER *event_header);
80 object,
81 uuid(a714590a-58af-430a-85bf-44f5ec838d85),
82 local,
84 interface IMFPMediaPlayer : IUnknown
86 HRESULT Play();
88 HRESULT Pause();
90 HRESULT Stop();
92 HRESULT FrameStep();
94 HRESULT SetPosition(
95 [in] REFGUID position_type,
96 [in] const PROPVARIANT *position);
98 HRESULT GetPosition(
99 [in] REFGUID position_type,
100 [out] PROPVARIANT *position);
102 HRESULT GetDuration(
103 [in] REFGUID position_type,
104 [out] PROPVARIANT *duration);
106 HRESULT SetRate(
107 [in] float rate);
109 HRESULT GetRate(
110 [out] float *rate);
112 HRESULT GetSupportedRates(
113 [in] BOOL forward,
114 [out] float *slowest_rate,
115 [out] float *fastest_rate);
117 HRESULT GetState(
118 [out] MFP_MEDIAPLAYER_STATE *state);
120 HRESULT CreateMediaItemFromURL(
121 [in] const WCHAR *url,
122 [in] BOOL sync,
123 [in] DWORD_PTR user_data,
124 [out] IMFPMediaItem **item);
126 HRESULT CreateMediaItemFromObject(
127 [in] IUnknown *object,
128 [in] BOOL sync,
129 [in] DWORD_PTR user_data,
130 [out] IMFPMediaItem **item);
132 HRESULT SetMediaItem(
133 [in] IMFPMediaItem *item);
135 HRESULT ClearMediaItem();
137 HRESULT GetMediaItem(
138 [out] IMFPMediaItem **item);
140 HRESULT GetVolume(
141 [out] float *volume);
143 HRESULT SetVolume(
144 [in] float volume);
146 HRESULT GetBalance(
147 [out] float *balance);
149 HRESULT SetBalance(
150 [in] float balance);
152 HRESULT GetMute(
153 [out] BOOL *mute);
155 HRESULT SetMute(
156 [in] BOOL mute);
158 HRESULT GetNativeVideoSize(
159 [out] SIZE *video,
160 [out] SIZE *arvideo);
162 HRESULT GetIdealVideoSize(
163 [out] SIZE *min_size,
164 [out] SIZE *max_size);
166 HRESULT SetVideoSourceRect(
167 [in] MFVideoNormalizedRect const *rect);
169 HRESULT GetVideoSourceRect(
170 [out] MFVideoNormalizedRect *rect);
172 HRESULT SetAspectRatioMode(
173 [in] DWORD mode);
175 HRESULT GetAspectRatioMode(
176 [out] DWORD *mode);
178 HRESULT GetVideoWindow(
179 [out] HWND *hwnd);
181 HRESULT UpdateVideo();
183 HRESULT SetBorderColor(
184 [in] COLORREF color);
186 HRESULT GetBorderColor(
187 [out] COLORREF *color);
189 HRESULT InsertEffect(
190 [in] IUnknown *effect,
191 [in] BOOL optional);
193 HRESULT RemoveEffect(
194 [in] IUnknown *effect);
196 HRESULT RemoveAllEffects();
198 HRESULT Shutdown();
201 cpp_quote("HRESULT WINAPI MFPCreateMediaPlayer(const WCHAR *url, BOOL start_playback, MFP_CREATION_OPTIONS options, ")
202 cpp_quote(" IMFPMediaPlayerCallback *callback, HWND hwnd, IMFPMediaPlayer **player);")