wbemprox: Implement Win32_LogicalDisk.VolumeSerialNumber.
[wine.git] / include / mmstream.idl
blob9730ee2bf846dd8b3bba367a2b693aeff18b9a02
1 /*
2 * Copyright 2004 Christian Costa
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";
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)")
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)")
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);")
41 cpp_quote("#if 0")
42 typedef void* PAPCFUNC;
43 cpp_quote("#endif")
45 typedef LONGLONG STREAM_TIME;
47 typedef GUID MSPID;
48 typedef REFGUID REFMSPID;
50 typedef enum {
51 STREAMTYPE_READ = 0,
52 STREAMTYPE_WRITE = 1,
53 STREAMTYPE_TRANSFORM = 2
54 } STREAM_TYPE;
56 typedef enum {
57 STREAMSTATE_STOP = 0,
58 STREAMSTATE_RUN = 1
59 } STREAM_STATE;
62 typedef enum {
63 COMPSTAT_NOUPDATEOK = 0x00000001,
64 COMPSTAT_WAIT = 0x00000002,
65 COMPSTAT_ABORT = 0x00000004
66 } COMPLETION_STATUS_FLAGS;
68 enum {
69 MMSSF_HASCLOCK = 0x00000001,
70 MMSSF_SUPPORTSEEK = 0x00000002,
71 MMSSF_ASYNCHRONOUS = 0x00000004
74 enum {
75 SSUPDATE_ASYNC = 0x00000001,
76 SSUPDATE_CONTINUOUS = 0x00000002
79 interface IMultiMediaStream;
80 interface IMediaStream;
81 interface IStreamSample;
85 object,
86 local,
87 uuid(B502D1BC-9A57-11d0-8FDE-00C04FD9189D),
88 pointer_default(unique)
90 interface IMultiMediaStream : IUnknown {
92 HRESULT GetInformation(
93 [out, optional] DWORD *pdwFlags,
94 [out, optional] STREAM_TYPE *pStreamType);
96 HRESULT GetMediaStream(
97 [in] REFMSPID idPurpose,
98 [out] IMediaStream **ppMediaStream);
100 HRESULT EnumMediaStreams(
101 [in] long Index,
102 [out] IMediaStream **ppMediaStream);
104 HRESULT GetState(
105 [out] STREAM_STATE *pCurrentState);
107 HRESULT SetState(
108 [in] STREAM_STATE NewState);
110 HRESULT GetTime(
111 [out] STREAM_TIME *pCurrentTime);
113 HRESULT GetDuration(
114 [out] STREAM_TIME *pDuration);
116 HRESULT Seek(
117 [in] STREAM_TIME SeekTime);
119 HRESULT GetEndOfStreamEventHandle(
120 [out] HANDLE *phEOS);
125 object,
126 uuid(B502D1BD-9A57-11d0-8FDE-00C04FD9189D),
127 pointer_default(unique)
129 interface IMediaStream : IUnknown {
131 HRESULT GetMultiMediaStream(
132 [out] IMultiMediaStream **ppMultiMediaStream);
134 HRESULT GetInformation(
135 [out, optional] MSPID *pPurposeId,
136 [out, optional] STREAM_TYPE *pType);
138 HRESULT SetSameFormat(
139 [in] IMediaStream *pStreamThatHasDesiredFormat,
140 [in] DWORD dwFlags);
142 HRESULT AllocateSample(
143 [in] DWORD dwFlags,
144 [out] IStreamSample **ppSample);
146 HRESULT CreateSharedSample(
147 [in] IStreamSample *pExistingSample,
148 [in] DWORD dwFlags,
149 [out] IStreamSample **ppNewSample);
151 HRESULT SendEndOfStream(DWORD dwFlags);
156 object,
157 local,
158 uuid(B502D1BE-9A57-11d0-8FDE-00C04FD9189D),
159 pointer_default(unique)
161 interface IStreamSample : IUnknown {
163 HRESULT GetMediaStream(
164 [in] IMediaStream **ppMediaStream);
166 HRESULT GetSampleTimes(
167 [out, optional] STREAM_TIME * pStartTime,
168 [out, optional] STREAM_TIME * pEndTime,
169 [out, optional] STREAM_TIME * pCurrentTime);
171 HRESULT SetSampleTimes(
172 [in, optional] const STREAM_TIME *pStartTime,
173 [in, optional] const STREAM_TIME *pEndTime);
175 HRESULT Update(
176 [in] DWORD dwFlags,
177 [in, optional] HANDLE hEvent,
178 [in, optional] PAPCFUNC pfnAPC,
179 [in, optional] DWORD dwAPCData);
181 HRESULT CompletionStatus(
182 [in] DWORD dwFlags,
183 [in, optional] DWORD dwMilliseconds);