user32: Don't flush window surfaces while waiting for a sent message reply.
[wine] / include / mmstream.idl
1 /*
2  * Copyright 2004 Christian Costa
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 "unknwn.idl";
20
21 cpp_quote("#define MS_ERROR_CODE(x)                  MAKE_HRESULT(1, FACILITY_ITF, (x) + 0x400)")
22 cpp_quote("#define MS_SUCCESS_CODE(x)                MAKE_HRESULT(0, FACILITY_ITF, x)")
23 cpp_quote("#define MS_S_PENDING                      MS_SUCCESS_CODE(1)")
24 cpp_quote("#define MS_S_NOUPDATE                     MS_SUCCESS_CODE(2)")
25 cpp_quote("#define MS_S_ENDOFSTREAM                  MS_SUCCESS_CODE(3)")
26
27 cpp_quote("#define MS_E_SAMPLEALLOC                  MS_ERROR_CODE(1)")
28 cpp_quote("#define MS_E_PURPOSEID                    MS_ERROR_CODE(2)")
29 cpp_quote("#define MS_E_NOSTREAM                     MS_ERROR_CODE(3)")
30 cpp_quote("#define MS_E_NOSEEKING                    MS_ERROR_CODE(4)")
31 cpp_quote("#define MS_E_INCOMPATIBLE                 MS_ERROR_CODE(5)")
32 cpp_quote("#define MS_E_BUSY                         MS_ERROR_CODE(6)")
33 cpp_quote("#define MS_E_NOTINIT                      MS_ERROR_CODE(7)")
34 cpp_quote("#define MS_E_SOURCEALREADYDEFINED         MS_ERROR_CODE(8)")
35 cpp_quote("#define MS_E_INVALIDSTREAMTYPE            MS_ERROR_CODE(9)")
36 cpp_quote("#define MS_E_NOTRUNNING                   MS_ERROR_CODE(10)")
37
38 cpp_quote("DEFINE_GUID(MSPID_PrimaryVideo,  0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
39 cpp_quote("DEFINE_GUID(MSPID_PrimaryAudio,  0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
40
41 cpp_quote("#if 0")
42 typedef void* PAPCFUNC;
43 cpp_quote("#endif")
44
45 typedef LONGLONG STREAM_TIME;
46
47 typedef GUID MSPID;
48 typedef REFGUID REFMSPID;
49
50 typedef enum {
51         STREAMTYPE_READ         = 0,
52         STREAMTYPE_WRITE        = 1,
53         STREAMTYPE_TRANSFORM    = 2
54 } STREAM_TYPE;
55
56 typedef enum {
57         STREAMSTATE_STOP        = 0,
58         STREAMSTATE_RUN         = 1
59 } STREAM_STATE;
60
61
62 typedef enum {
63         COMPSTAT_NOUPDATEOK                             = 0x00000001,
64         COMPSTAT_WAIT                                   = 0x00000002,
65         COMPSTAT_ABORT                                  = 0x00000004
66 } COMPLETION_STATUS_FLAGS;
67
68 enum {
69         MMSSF_HASCLOCK                                  = 0x00000001,
70         MMSSF_SUPPORTSEEK                               = 0x00000002,
71         MMSSF_ASYNCHRONOUS                              = 0x00000004
72 };
73
74 enum {
75         SSUPDATE_ASYNC                                  = 0x00000001,
76         SSUPDATE_CONTINUOUS                             = 0x00000002
77 };
78
79 interface IMultiMediaStream;
80 interface IMediaStream;
81 interface IStreamSample;
82
83
84 [
85 object,
86 local,
87 uuid(B502D1BC-9A57-11d0-8FDE-00C04FD9189D),
88 pointer_default(unique)
89 ]
90 interface IMultiMediaStream : IUnknown {
91
92         HRESULT GetInformation(
93                 [out, optional] DWORD *pdwFlags,
94                 [out, optional] STREAM_TYPE *pStreamType);
95
96         HRESULT GetMediaStream(
97                 [in] REFMSPID idPurpose,
98                 [out] IMediaStream **ppMediaStream);
99
100         HRESULT EnumMediaStreams(
101                 [in] long Index,
102                 [out] IMediaStream **ppMediaStream);
103
104         HRESULT GetState(
105                 [out] STREAM_STATE *pCurrentState);
106
107         HRESULT SetState(
108                 [in] STREAM_STATE NewState);
109
110         HRESULT GetTime(
111                 [out] STREAM_TIME *pCurrentTime);
112
113         HRESULT GetDuration(
114                 [out] STREAM_TIME *pDuration);
115
116         HRESULT Seek(
117                 [in] STREAM_TIME SeekTime);
118
119         HRESULT GetEndOfStreamEventHandle(
120                 [out] HANDLE *phEOS);
121 }
122
123
124 [
125 object,
126 uuid(B502D1BD-9A57-11d0-8FDE-00C04FD9189D),
127 pointer_default(unique)
128 ]
129 interface IMediaStream : IUnknown {
130         
131         HRESULT GetMultiMediaStream(
132                 [out] IMultiMediaStream **ppMultiMediaStream);
133
134         HRESULT GetInformation(
135                 [out, optional] MSPID *pPurposeId,
136                 [out, optional] STREAM_TYPE *pType);
137
138         HRESULT SetSameFormat(
139                 [in] IMediaStream *pStreamThatHasDesiredFormat,
140                 [in] DWORD dwFlags);
141
142         HRESULT AllocateSample(
143                 [in]  DWORD dwFlags,
144                 [out] IStreamSample **ppSample);
145
146         HRESULT CreateSharedSample(
147                 [in]  IStreamSample *pExistingSample,
148                 [in]  DWORD dwFlags,
149                 [out] IStreamSample **ppNewSample);
150
151         HRESULT SendEndOfStream(DWORD dwFlags);
152 }
153
154
155 [
156 object,
157 local,
158 uuid(B502D1BE-9A57-11d0-8FDE-00C04FD9189D),
159 pointer_default(unique)
160 ]
161 interface IStreamSample : IUnknown {
162         
163         HRESULT GetMediaStream(
164                 [in] IMediaStream **ppMediaStream);
165
166         HRESULT GetSampleTimes(
167                 [out, optional] STREAM_TIME * pStartTime,
168                 [out, optional] STREAM_TIME * pEndTime,
169                 [out, optional] STREAM_TIME * pCurrentTime);
170
171         HRESULT SetSampleTimes(
172                 [in, optional] const STREAM_TIME *pStartTime,
173                 [in, optional] const STREAM_TIME *pEndTime);
174
175         HRESULT Update(
176                 [in] DWORD dwFlags,
177                 [in, optional] HANDLE hEvent,
178                 [in, optional] PAPCFUNC pfnAPC,
179                 [in, optional] DWORD dwAPCData);
180
181         HRESULT CompletionStatus(
182                 [in] DWORD dwFlags,
183                 [in, optional] DWORD dwMilliseconds);
184 }