148 ok(
hr ==
S_OK,
"CoCreateInstance failed: %08x\n",
hr);
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);
163 &IID_IMediaDet, (
LPVOID*)&pM);
164 ok(
hr ==
S_OK,
"CoCreateInstance failed with %x\n",
hr);
165 ok(pM !=
NULL,
"pM is NULL\n");
170 ok(
hr ==
S_OK,
"IMediaDet_get_Filename failed: %08x\n",
hr);
176 ok(
hr ==
S_OK,
"IMediaDet_get_Filename failed: %08x\n",
hr);
180 hr = IMediaDet_get_OutputStreams(pM, &nstrms);
182 ok(nstrms == -1,
"IMediaDet_get_OutputStreams: nstrms is %i\n", nstrms);
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);
190 hr = IMediaDet_get_CurrentStream(pM,
NULL);
194 hr = IMediaDet_put_CurrentStream(pM, 0);
197 hr = IMediaDet_put_CurrentStream(pM, -1);
200 hr = IMediaDet_get_StreamMediaType(pM, &mt);
203 hr = IMediaDet_get_StreamMediaType(pM,
NULL);
204 ok(
hr ==
E_POINTER,
"IMediaDet_get_StreamMediaType failed: %08x\n",
hr);
208 ok(
hr ==
S_OK,
"IMediaDet_put_Filename failed: %08x\n",
hr);
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);
218 hr = IMediaDet_get_StreamMediaType(pM, &mt);
219 ok(
hr ==
S_OK,
"IMediaDet_get_StreamMediaType failed: %08x\n",
hr);
223 hr = IMediaDet_put_CurrentStream(pM, 1);
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);
232 ok(
hr ==
S_OK,
"IMediaDet_get_Filename failed: %08x\n",
hr);
234 "IMediaDet_get_Filename\n");
237 hr = IMediaDet_get_Filename(pM,
NULL);
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);
245 hr = IMediaDet_get_CurrentStream(pM,
NULL);
248 hr = IMediaDet_put_CurrentStream(pM, -1);
251 hr = IMediaDet_put_CurrentStream(pM, 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);
260 hr = IMediaDet_put_CurrentStream(pM, 0);
261 ok(
hr ==
S_OK,
"IMediaDet_put_CurrentStream failed: %08x\n",
hr);
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);
269 hr = IMediaDet_get_StreamMediaType(pM, &mt);
270 ok(
hr ==
S_OK,
"IMediaDet_get_StreamMediaType failed: %08x\n",
hr);
272 "IMediaDet_get_StreamMediaType\n");
275 hr = IMediaDet_get_FrameRate(pM,
NULL);
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);
282 hr = IMediaDet_Release(pM);
283 ok(
hr == 0,
"IMediaDet_Release returned: %x\n",
hr);
289 &IID_IMediaDet, (
LPVOID*)&pM);
290 ok(
hr ==
S_OK,
"CoCreateInstance failed with %x\n",
hr);
291 ok(pM !=
NULL,
"pM is NULL\n");
295 ok(
hr ==
S_OK,
"IMediaDet_put_Filename failed: %08x\n",
hr);
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);
304 ok(
hr ==
S_OK,
"IMediaDet_get_Filename failed: %08x\n",
hr);
306 "IMediaDet_get_Filename\n");
313 for (
i = 0;
i < 2; ++
i)
315 hr = IMediaDet_put_CurrentStream(pM,
i);
316 ok(
hr ==
S_OK,
"IMediaDet_put_CurrentStream failed: %08x\n",
hr);
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);
324 hr = IMediaDet_get_StreamMediaType(pM, &mt);
325 ok(
hr ==
S_OK,
"IMediaDet_get_StreamMediaType failed: %08x\n",
hr);
334 hr = IMediaDet_get_FrameRate(pM, &fps);
340 ok(
flags == 3,
"IMediaDet_get_StreamMediaType: flags are %i\n",
flags);
342 hr = IMediaDet_put_CurrentStream(pM, 2);
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);
350 hr = IMediaDet_Release(pM);
351 ok(
hr == 0,
"IMediaDet_Release returned: %x\n",
hr);
VOID WINAPI CoTaskMemFree(LPVOID ptr)
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BSTR WINAPI SysAllocString(LPCOLESTR str)
#define VFW_E_INVALIDMEDIATYPE
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
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 DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)