qedit: Implement IMediaDet::get_StreamTypeB().
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9650f5a7db
commit
15ea804a17
|
@ -301,11 +301,21 @@ static HRESULT WINAPI MediaDet_get_StreamType(IMediaDet *iface, GUID *majortype)
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI MediaDet_get_StreamTypeB(IMediaDet* iface, BSTR *pVal)
|
static HRESULT WINAPI MediaDet_get_StreamTypeB(IMediaDet *iface, BSTR *bstr)
|
||||||
{
|
{
|
||||||
MediaDetImpl *This = impl_from_IMediaDet(iface);
|
MediaDetImpl *detector = impl_from_IMediaDet(iface);
|
||||||
FIXME("(%p)->(%p): not implemented!\n", This, pVal);
|
HRESULT hr;
|
||||||
return E_NOTIMPL;
|
GUID guid;
|
||||||
|
|
||||||
|
TRACE("detector %p, bstr %p.\n", detector, bstr);
|
||||||
|
|
||||||
|
if (SUCCEEDED(hr = IMediaDet_get_StreamType(iface, &guid)))
|
||||||
|
{
|
||||||
|
if (!(*bstr = SysAllocStringLen(NULL, CHARS_IN_GUID - 1)))
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
|
StringFromGUID2(&guid, *bstr, CHARS_IN_GUID);
|
||||||
|
}
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI MediaDet_get_StreamLength(IMediaDet* iface, double *pVal)
|
static HRESULT WINAPI MediaDet_get_StreamLength(IMediaDet* iface, double *pVal)
|
||||||
|
|
|
@ -193,6 +193,7 @@ static void test_mediadet(void)
|
||||||
LONG nstrms = 0;
|
LONG nstrms = 0;
|
||||||
LONG strm;
|
LONG strm;
|
||||||
GUID guid;
|
GUID guid;
|
||||||
|
BSTR bstr;
|
||||||
AM_MEDIA_TYPE mt;
|
AM_MEDIA_TYPE mt;
|
||||||
double fps;
|
double fps;
|
||||||
int flags;
|
int flags;
|
||||||
|
@ -249,6 +250,12 @@ static void test_mediadet(void)
|
||||||
hr = IMediaDet_get_StreamType(pM, NULL);
|
hr = IMediaDet_get_StreamType(pM, NULL);
|
||||||
ok(hr == E_POINTER, "Got hr %#x.\n", hr);
|
ok(hr == E_POINTER, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
|
hr = IMediaDet_get_StreamTypeB(pM, &bstr);
|
||||||
|
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
|
hr = IMediaDet_get_StreamTypeB(pM, NULL);
|
||||||
|
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
filename = SysAllocString(test_avi_filename);
|
filename = SysAllocString(test_avi_filename);
|
||||||
hr = IMediaDet_put_Filename(pM, filename);
|
hr = IMediaDet_put_Filename(pM, filename);
|
||||||
ok(hr == S_OK, "IMediaDet_put_Filename failed: %08x\n", hr);
|
ok(hr == S_OK, "IMediaDet_put_Filename failed: %08x\n", hr);
|
||||||
|
@ -269,6 +276,12 @@ static void test_mediadet(void)
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
ok(IsEqualGUID(&guid, &MEDIATYPE_Video), "Got major type %s.\n", debugstr_guid(&guid));
|
ok(IsEqualGUID(&guid, &MEDIATYPE_Video), "Got major type %s.\n", debugstr_guid(&guid));
|
||||||
|
|
||||||
|
hr = IMediaDet_get_StreamTypeB(pM, &bstr);
|
||||||
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
|
ok(!wcscmp(bstr, L"{73646976-0000-0010-8000-00AA00389B71}"),
|
||||||
|
"Got major type %s.\n", debugstr_w(bstr));
|
||||||
|
SysFreeString(bstr);
|
||||||
|
|
||||||
/* Even before get_OutputStreams. */
|
/* Even before get_OutputStreams. */
|
||||||
hr = IMediaDet_put_CurrentStream(pM, 1);
|
hr = IMediaDet_put_CurrentStream(pM, 1);
|
||||||
ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08x\n", hr);
|
ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08x\n", hr);
|
||||||
|
@ -326,6 +339,12 @@ static void test_mediadet(void)
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
ok(IsEqualGUID(&guid, &MEDIATYPE_Video), "Got major type %s.\n", debugstr_guid(&guid));
|
ok(IsEqualGUID(&guid, &MEDIATYPE_Video), "Got major type %s.\n", debugstr_guid(&guid));
|
||||||
|
|
||||||
|
hr = IMediaDet_get_StreamTypeB(pM, &bstr);
|
||||||
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
|
ok(!wcscmp(bstr, L"{73646976-0000-0010-8000-00AA00389B71}"),
|
||||||
|
"Got major type %s.\n", debugstr_w(bstr));
|
||||||
|
SysFreeString(bstr);
|
||||||
|
|
||||||
hr = IMediaDet_get_FrameRate(pM, NULL);
|
hr = IMediaDet_get_FrameRate(pM, NULL);
|
||||||
ok(hr == E_POINTER, "IMediaDet_get_FrameRate failed: %08x\n", hr);
|
ok(hr == E_POINTER, "IMediaDet_get_FrameRate failed: %08x\n", hr);
|
||||||
|
|
||||||
|
@ -389,6 +408,12 @@ static void test_mediadet(void)
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
ok(IsEqualGUID(&guid, &MEDIATYPE_Audio), "Got major type %s.\n", debugstr_guid(&guid));
|
ok(IsEqualGUID(&guid, &MEDIATYPE_Audio), "Got major type %s.\n", debugstr_guid(&guid));
|
||||||
|
|
||||||
|
hr = IMediaDet_get_StreamTypeB(pM, &bstr);
|
||||||
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
|
ok(!wcscmp(bstr, L"{73647561-0000-0010-8000-00AA00389B71}"),
|
||||||
|
"Got major type %s.\n", debugstr_w(bstr));
|
||||||
|
SysFreeString(bstr);
|
||||||
|
|
||||||
hr = IMediaDet_get_FrameRate(pM, &fps);
|
hr = IMediaDet_get_FrameRate(pM, &fps);
|
||||||
ok(hr == VFW_E_INVALIDMEDIATYPE, "IMediaDet_get_FrameRate failed: %08x\n", hr);
|
ok(hr == VFW_E_INVALIDMEDIATYPE, "IMediaDet_get_FrameRate failed: %08x\n", hr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue