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