Commit e852186a authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

qcap/audiorecord: Implement IKsPropertySet::Get(&AMPROPSETID_Pin, AMPROPERTY_PIN_CATEGORY).

Needed by the Microsoft Silverlight configuration tool. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36230
parent 76fcbd14
...@@ -361,9 +361,33 @@ static HRESULT WINAPI property_set_Set(IKsPropertySet *iface, const GUID *set, D ...@@ -361,9 +361,33 @@ static HRESULT WINAPI property_set_Set(IKsPropertySet *iface, const GUID *set, D
static HRESULT WINAPI property_set_Get(IKsPropertySet *iface, const GUID *set, DWORD id, static HRESULT WINAPI property_set_Get(IKsPropertySet *iface, const GUID *set, DWORD id,
void *instance, DWORD instance_size, void *data, DWORD size, DWORD *ret_size) void *instance, DWORD instance_size, void *data, DWORD size, DWORD *ret_size)
{ {
FIXME("iface %p, set %s, id %lu, instance %p, instance_size %lu, data %p, size %lu, ret_size %p.\n", struct audio_record *filter = impl_from_IKsPropertySet(iface);
iface, debugstr_guid(set), id, instance, instance_size, data, size, ret_size);
return E_NOTIMPL; TRACE("filter %p, set %s, id %lu, instance %p, instance_size %lu, data %p, size %lu, ret_size %p.\n",
filter, debugstr_guid(set), id, instance, instance_size, data, size, ret_size);
if (!IsEqualGUID(set, &AMPROPSETID_Pin))
{
FIXME("Unknown set %s, returning E_PROP_SET_UNSUPPORTED.\n", debugstr_guid(set));
return E_PROP_SET_UNSUPPORTED;
}
if (id != AMPROPERTY_PIN_CATEGORY)
{
FIXME("Unknown id %lu, returning E_PROP_ID_UNSUPPORTED.\n", id);
return E_PROP_ID_UNSUPPORTED;
}
if (instance || instance_size)
FIXME("Unexpected instance data %p, size %lu.\n", instance, instance_size);
*ret_size = sizeof(GUID);
if (size < sizeof(GUID))
return E_UNEXPECTED;
*(GUID *)data = PIN_CATEGORY_CAPTURE;
return S_OK;
} }
static HRESULT WINAPI property_set_QuerySupported(IKsPropertySet *iface, static HRESULT WINAPI property_set_QuerySupported(IKsPropertySet *iface,
......
...@@ -951,6 +951,36 @@ static void test_connect_pin(IBaseFilter *filter) ...@@ -951,6 +951,36 @@ static void test_connect_pin(IBaseFilter *filter)
ok(!ref, "Got outstanding refcount %ld.\n", ref); ok(!ref, "Got outstanding refcount %ld.\n", ref);
} }
static void test_property_set(IBaseFilter *filter)
{
IKsPropertySet *set;
GUID category;
IPin *source;
DWORD size;
HRESULT hr;
IBaseFilter_FindPin(filter, L"Capture", &source);
IPin_QueryInterface(source, &IID_IKsPropertySet, (void **)&set);
size = 0xdeadbeef;
memset(&category, 0xcc, sizeof(category));
hr = IKsPropertySet_Get(set, &AMPROPSETID_Pin, AMPROPERTY_PIN_CATEGORY,
NULL, 0, &category, sizeof(category) - 1, &size);
ok(hr == E_UNEXPECTED, "Got hr %#lx.\n", hr);
ok(size == sizeof(GUID), "Got size %lu.\n", size);
size = 0xdeadbeef;
memset(&category, 0xcc, sizeof(category));
hr = IKsPropertySet_Get(set, &AMPROPSETID_Pin, AMPROPERTY_PIN_CATEGORY,
NULL, 0, &category, sizeof(category) + 1, &size);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(IsEqualGUID(&category, &PIN_CATEGORY_CAPTURE), "Got category %s.\n", debugstr_guid(&category));
ok(size == sizeof(GUID), "Got size %lu.\n", size);
IKsPropertySet_Release(set);
IPin_Release(source);
}
static void test_stream_config(IBaseFilter *filter) static void test_stream_config(IBaseFilter *filter)
{ {
AUDIO_STREAM_CONFIG_CAPS caps; AUDIO_STREAM_CONFIG_CAPS caps;
...@@ -1116,6 +1146,7 @@ START_TEST(audiorecord) ...@@ -1116,6 +1146,7 @@ START_TEST(audiorecord)
test_pin_info(filter); test_pin_info(filter);
test_media_types(filter); test_media_types(filter);
test_connect_pin(filter); test_connect_pin(filter);
test_property_set(filter);
/* This calls SetFormat() and hence should be run last. */ /* This calls SetFormat() and hence should be run last. */
test_stream_config(filter); test_stream_config(filter);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment