132{
141 double fps;
144
145
148 ok(
hr ==
S_OK,
"CoCreateInstance failed: %08x\n",
hr);
149
150 hr = IUnknown_QueryInterface(unk_obj.
inner_unk, &IID_IMediaDet, (
void**)&pM);
151 ok(
hr ==
S_OK,
"QueryInterface for IID_IMediaDet failed: %08x\n",
hr);
152 refcount = IMediaDet_AddRef(pM);
153 ok(refcount == unk_obj.
ref,
"MediaDet just pretends to support COM aggregation\n");
154 refcount = IMediaDet_Release(pM);
155 ok(refcount == unk_obj.
ref,
"MediaDet just pretends to support COM aggregation\n");
156 refcount = IMediaDet_Release(pM);
157 ok(refcount == 19,
"Refcount should be back at 19 but is %u\n", refcount);
158
160
161
163 &IID_IMediaDet, (
LPVOID*)&pM);
164 ok(
hr ==
S_OK,
"CoCreateInstance failed with %x\n",
hr);
165 ok(pM !=
NULL,
"pM is NULL\n");
166
169
170 ok(
hr ==
S_OK,
"IMediaDet_get_Filename failed: %08x\n",
hr);
172
175
176 ok(
hr ==
S_OK,
"IMediaDet_get_Filename failed: %08x\n",
hr);
178
179 nstrms = -1;
180 hr = IMediaDet_get_OutputStreams(pM, &nstrms);
182 ok(nstrms == -1,
"IMediaDet_get_OutputStreams: nstrms is %i\n", nstrms);
183
184 strm = -1;
185
186 hr = IMediaDet_get_CurrentStream(pM, &strm);
187 ok(
hr ==
S_OK,
"IMediaDet_get_CurrentStream failed: %08x\n",
hr);
188 ok(strm == 0,
"IMediaDet_get_CurrentStream: strm is %i\n", strm);
189
190 hr = IMediaDet_get_CurrentStream(pM,
NULL);
192
193
194 hr = IMediaDet_put_CurrentStream(pM, 0);
196
197 hr = IMediaDet_put_CurrentStream(pM, -1);
199
200 hr = IMediaDet_get_StreamMediaType(pM, &mt);
202
203 hr = IMediaDet_get_StreamMediaType(pM,
NULL);
204 ok(
hr ==
E_POINTER,
"IMediaDet_get_StreamMediaType failed: %08x\n",
hr);
205
208 ok(
hr ==
S_OK,
"IMediaDet_put_Filename failed: %08x\n",
hr);
210
211 strm = -1;
212
213 hr = IMediaDet_get_CurrentStream(pM, &strm);
214 ok(
hr ==
S_OK,
"IMediaDet_get_CurrentStream failed: %08x\n",
hr);
215 ok(strm == 0,
"IMediaDet_get_CurrentStream: strm is %i\n", strm);
216
218 hr = IMediaDet_get_StreamMediaType(pM, &mt);
219 ok(
hr ==
S_OK,
"IMediaDet_get_StreamMediaType failed: %08x\n",
hr);
221
222
223 hr = IMediaDet_put_CurrentStream(pM, 1);
225
226 hr = IMediaDet_get_OutputStreams(pM, &nstrms);
227 ok(
hr ==
S_OK,
"IMediaDet_get_OutputStreams failed: %08x\n",
hr);
228 ok(nstrms == 1,
"IMediaDet_get_OutputStreams: nstrms is %i\n", nstrms);
229
232 ok(
hr ==
S_OK,
"IMediaDet_get_Filename failed: %08x\n",
hr);
234 "IMediaDet_get_Filename\n");
236
237 hr = IMediaDet_get_Filename(pM,
NULL);
239
240 strm = -1;
241 hr = IMediaDet_get_CurrentStream(pM, &strm);
242 ok(
hr ==
S_OK,
"IMediaDet_get_CurrentStream failed: %08x\n",
hr);
243 ok(strm == 0,
"IMediaDet_get_CurrentStream: strm is %i\n", strm);
244
245 hr = IMediaDet_get_CurrentStream(pM,
NULL);
247
248 hr = IMediaDet_put_CurrentStream(pM, -1);
250
251 hr = IMediaDet_put_CurrentStream(pM, 1);
253
254
255 strm = -1;
256 hr = IMediaDet_get_CurrentStream(pM, &strm);
257 ok(
hr ==
S_OK,
"IMediaDet_get_CurrentStream failed: %08x\n",
hr);
258 ok(strm == 0,
"IMediaDet_get_CurrentStream: strm is %i\n", strm);
259
260 hr = IMediaDet_put_CurrentStream(pM, 0);
261 ok(
hr ==
S_OK,
"IMediaDet_put_CurrentStream failed: %08x\n",
hr);
262
263 strm = -1;
264 hr = IMediaDet_get_CurrentStream(pM, &strm);
265 ok(
hr ==
S_OK,
"IMediaDet_get_CurrentStream failed: %08x\n",
hr);
266 ok(strm == 0,
"IMediaDet_get_CurrentStream: strm is %i\n", strm);
267
269 hr = IMediaDet_get_StreamMediaType(pM, &mt);
270 ok(
hr ==
S_OK,
"IMediaDet_get_StreamMediaType failed: %08x\n",
hr);
272 "IMediaDet_get_StreamMediaType\n");
274
275 hr = IMediaDet_get_FrameRate(pM,
NULL);
277
278 hr = IMediaDet_get_FrameRate(pM, &fps);
279 ok(
hr ==
S_OK,
"IMediaDet_get_FrameRate failed: %08x\n",
hr);
280 ok(fps == 10.0,
"IMediaDet_get_FrameRate: fps is %f\n", fps);
281
282 hr = IMediaDet_Release(pM);
283 ok(
hr == 0,
"IMediaDet_Release returned: %x\n",
hr);
284
286
287
289 &IID_IMediaDet, (
LPVOID*)&pM);
290 ok(
hr ==
S_OK,
"CoCreateInstance failed with %x\n",
hr);
291 ok(pM !=
NULL,
"pM is NULL\n");
292
295 ok(
hr ==
S_OK,
"IMediaDet_put_Filename failed: %08x\n",
hr);
297
298 hr = IMediaDet_get_OutputStreams(pM, &nstrms);
299 ok(
hr ==
S_OK,
"IMediaDet_get_OutputStreams failed: %08x\n",
hr);
300 ok(nstrms == 2,
"IMediaDet_get_OutputStreams: nstrms is %i\n", nstrms);
301
304 ok(
hr ==
S_OK,
"IMediaDet_get_Filename failed: %08x\n",
hr);
306 "IMediaDet_get_Filename\n");
308
309
310
312
313 for (
i = 0;
i < 2; ++
i)
314 {
315 hr = IMediaDet_put_CurrentStream(pM,
i);
316 ok(
hr ==
S_OK,
"IMediaDet_put_CurrentStream failed: %08x\n",
hr);
317
318 strm = -1;
319 hr = IMediaDet_get_CurrentStream(pM, &strm);
320 ok(
hr ==
S_OK,
"IMediaDet_get_CurrentStream failed: %08x\n",
hr);
321 ok(strm ==
i,
"IMediaDet_get_CurrentStream: strm is %i\n", strm);
322
324 hr = IMediaDet_get_StreamMediaType(pM, &mt);
325 ok(
hr ==
S_OK,
"IMediaDet_get_StreamMediaType failed: %08x\n",
hr);
327 ? 1
329 ? 2
330 : 0));
331
333 {
334 hr = IMediaDet_get_FrameRate(pM, &fps);
336 }
337
339 }
340 ok(
flags == 3,
"IMediaDet_get_StreamMediaType: flags are %i\n",
flags);
341
342 hr = IMediaDet_put_CurrentStream(pM, 2);
344
345 strm = -1;
346 hr = IMediaDet_get_CurrentStream(pM, &strm);
347 ok(
hr ==
S_OK,
"IMediaDet_get_CurrentStream failed: %08x\n",
hr);
348 ok(strm == 1,
"IMediaDet_get_CurrentStream: strm is %i\n", strm);
349
350 hr = IMediaDet_Release(pM);
351 ok(
hr == 0,
"IMediaDet_Release returned: %x\n",
hr);
352
354}
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
VOID WINAPI CoTaskMemFree(LPVOID ptr)
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define IsEqualGUID(rguid1, rguid2)
#define VFW_E_INVALIDMEDIATYPE