2 * Copyright (C) 2002 Lionel Ulmer
3 * Copyright (C) 2004 Alexandre Julliard
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 cpp_quote("#if 0") /* FIXME: these files are not included on Windows */
25 interface IMediaControl;
26 interface IBasicAudio;
27 interface IBasicVideo;
28 interface IVideoWindow;
29 interface IMediaEvent;
30 interface IMediaEventEx;
32 typedef long OAFilterState;
33 typedef LONG_PTR OAHWND;
34 typedef LONG_PTR OAEVENT;
36 /*****************************************************************************
37 * IMediaControl interface
41 uuid(56a868b1-0ad4-11ce-b03a-0020af0ba770),
42 pointer_default(unique)
44 interface IMediaControl : IDispatch
49 HRESULT GetState( [in] LONG msTimeout, [out] OAFilterState *pfs );
50 HRESULT RenderFile( [in] BSTR strFilename );
51 HRESULT AddSourceFilter( [in] BSTR strFilename, [out] IDispatch **ppUnk );
52 [propget] HRESULT FilterCollection( [out] IDispatch **ppUnk );
53 [propget] HRESULT RegFilterCollection( [out] IDispatch **ppUnk );
54 HRESULT StopWhenReady();
58 /*****************************************************************************
59 * IBasicAudio interface
63 uuid(56a868b3-0ad4-11ce-b03a-0020af0ba770),
64 pointer_default(unique)
66 interface IBasicAudio : IDispatch
68 [propput] HRESULT Volume( [in] long lVolume );
69 [propget] HRESULT Volume( [out] long *plVolume );
70 [propput] HRESULT Balance( [in] long lBalance );
71 [propget] HRESULT Balance( [out] long *plBalance );
75 /*****************************************************************************
76 * IVideoWindow interface
80 uuid(56a868b4-0ad4-11ce-b03a-0020af0ba770),
81 pointer_default(unique)
83 interface IVideoWindow : IDispatch
85 [propput] HRESULT Caption( [in] BSTR strCaption );
86 [propget] HRESULT Caption( [out] BSTR *strCaption );
87 [propput] HRESULT WindowStyle( [in] long WindowStyle );
88 [propget] HRESULT WindowStyle( [out] long *WindowStyle );
89 [propput] HRESULT WindowStyleEx( [in] long WindowStyleEx );
90 [propget] HRESULT WindowStyleEx( [out] long *WindowStyleEx );
91 [propput] HRESULT AutoShow( [in] long AutoShow );
92 [propget] HRESULT AutoShow( [out] long *AutoShow );
93 [propput] HRESULT WindowState( [in] long WindowState );
94 [propget] HRESULT WindowState( [out] long *WindowState );
95 [propput] HRESULT BackgroundPalette( [in] long BackgroundPalette );
96 [propget] HRESULT BackgroundPalette( [out] long *pBackgroundPalette );
97 [propput] HRESULT Visible( [in] long Visible );
98 [propget] HRESULT Visible( [out] long *pVisible );
99 [propput] HRESULT Left( [in] long Left );
100 [propget] HRESULT Left( [out] long *pLeft );
101 [propput] HRESULT Width( [in] long Width );
102 [propget] HRESULT Width( [out] long *pWidth );
103 [propput] HRESULT Top( [in] long Top );
104 [propget] HRESULT Top( [out] long *pTop );
105 [propput] HRESULT Height( [in] long Height );
106 [propget] HRESULT Height( [out] long *pHeight );
107 [propput] HRESULT Owner( [in] OAHWND Owner );
108 [propget] HRESULT Owner( [out] OAHWND *Owner );
109 [propput] HRESULT MessageDrain( [in] OAHWND Drain );
110 [propget] HRESULT MessageDrain( [out] OAHWND *Drain );
111 [propget] HRESULT BorderColor( [out] long *Color );
112 [propput] HRESULT BorderColor( [in] long Color );
113 [propget] HRESULT FullScreenMode( [out] long *FullScreenMode );
114 [propput] HRESULT FullScreenMode( [in] long FullScreenMode );
115 HRESULT SetWindowForeground( [in] long Focus );
116 HRESULT NotifyOwnerMessage( [in] OAHWND hwnd, [in] long uMsg, [in] LONG_PTR wParam, [in] LONG_PTR lParam );
117 HRESULT SetWindowPosition( [in] long Left, [in] long Top, [in] long Width, [in] long Height );
118 HRESULT GetWindowPosition( [out] long *pLeft, [out] long *pTop, [out] long *pWidth, [out] long *pHeight );
119 HRESULT GetMinIdealImageSize( [out] long *pWidth, [out] long *pHeight );
120 HRESULT GetMaxIdealImageSize( [out] long *pWidth, [out] long *pHeight );
121 HRESULT GetRestorePosition( [out] long *pLeft, [out] long *pTop, [out] long *pWidth, [out] long *pHeight );
122 HRESULT HideCursor( [in] long HideCursor );
123 HRESULT IsCursorHidden( [out] long *CursorHidden );
127 /*****************************************************************************
128 * IBasicVideo interface
132 uuid(56a868b5-0ad4-11ce-b03a-0020af0ba770),
133 pointer_default(unique)
135 interface IBasicVideo : IDispatch
137 [propget] HRESULT AvgTimePerFrame( [out] REFTIME *pAvgTimePerFrame );
138 [propget] HRESULT BitRate( [out] long *pBitRate );
139 [propget] HRESULT BitErrorRate( [out] long *pBitErrorRate );
140 [propget] HRESULT VideoWidth( [out] long *pVideoWidth );
141 [propget] HRESULT VideoHeight( [out] long *pVideoHeight );
142 [propput] HRESULT SourceLeft( [in] long SourceLeft );
143 [propget] HRESULT SourceLeft( [out] long *pSourceLeft );
144 [propput] HRESULT SourceWidth( [in] long SourceWidth );
145 [propget] HRESULT SourceWidth( [out] long *pSourceWidth );
146 [propput] HRESULT SourceTop( [in] long SourceTop );
147 [propget] HRESULT SourceTop( [out] long *pSourceTop );
148 [propput] HRESULT SourceHeight( [in] long SourceHeight );
149 [propget] HRESULT SourceHeight( [out] long *pSourceHeight );
150 [propput] HRESULT DestinationLeft( [in] long DestinationLeft );
151 [propget] HRESULT DestinationLeft( [out] long *pDestinationLeft );
152 [propput] HRESULT DestinationWidth( [in] long DestinationWidth );
153 [propget] HRESULT DestinationWidth( [out] long *pDestinationWidth );
154 [propput] HRESULT DestinationTop( [in] long DestinationTop );
155 [propget] HRESULT DestinationTop( [out] long *pDestinationTop );
156 [propput] HRESULT DestinationHeight( [in] long DestinationHeight );
157 [propget] HRESULT DestinationHeight( [out] long *pDestinationHeight );
158 HRESULT SetSourcePosition( [in] long Left, [in] long Top, [in] long Width, [in] long Height );
159 HRESULT GetSourcePosition( [out] long *pLeft, [out] long *pTop, [out] long *pWidth, [out] long *pHeight );
160 HRESULT SetDefaultSourcePosition();
161 HRESULT SetDestinationPosition( [in] long Left, [in] long Top, [in] long Width, [in] long Height );
162 HRESULT GetDestinationPosition( [out] long *pLeft, [out] long *pTop, [out] long *pWidth, [out] long *pHeight );
163 HRESULT SetDefaultDestinationPosition();
164 HRESULT GetVideoSize( [out] long *pWidth, [out] long *pHeight );
165 HRESULT GetVideoPaletteEntries( [in] long StartIndex,
167 [out] long *pRetrieved,
168 [out, size_is(Entries), length_is(*pRetrieved)] long *pPalette );
169 HRESULT GetCurrentImage( [in, out] long *pBufferSize,
170 [out, size_is(*pBufferSize), length_is(*pBufferSize)] long *pDIBImage );
171 HRESULT IsUsingDefaultSource();
172 HRESULT IsUsingDefaultDestination();
176 /*****************************************************************************
177 * IMediaEvent interface
181 uuid(56a868b6-0ad4-11ce-b03a-0020af0ba770),
182 pointer_default(unique)
184 interface IMediaEvent : IDispatch
186 HRESULT GetEventHandle( [out] OAEVENT *hEvent );
187 HRESULT GetEvent( [out] long *lEventCode, [out] LONG_PTR *lParam1, [out] LONG_PTR *lParam2, [in] long msTimeout );
188 HRESULT WaitForCompletion( [in] long msTimeout, [out] long *pEvCode );
189 HRESULT CancelDefaultHandling( [in] long lEvCode );
190 HRESULT RestoreDefaultHandling( [in] long lEvCode );
191 HRESULT FreeEventParams( [in] long lEvCode, [in] LONG_PTR lParam1, [in] LONG_PTR lParam2 );
195 /*****************************************************************************
196 * IMediaEventEx interface
200 uuid(56a868c0-0ad4-11ce-b03a-0020af0ba770),
201 pointer_default(unique)
203 interface IMediaEventEx : IMediaEvent
205 HRESULT SetNotifyWindow( [in] OAHWND hwnd, [in] long lMsg, [in] LONG_PTR lInstanceData );
206 HRESULT SetNotifyFlags( [in] long lNoNotifyFlags );
207 HRESULT GetNotifyFlags( [out] long *lplNoNotifyFlags );