Commit 7770e0bb authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Use wide character string literals.

parent c947dab0
......@@ -33,8 +33,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
static const WCHAR wszOutputPinName[] = { 'O','u','t','p','u','t',0 };
static const AM_MEDIA_TYPE default_mt =
{
{0xe436eb83,0x524f,0x11ce,{0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70}}, /* MEDIATYPE_Stream */
......@@ -92,13 +90,6 @@ static inline AsyncReader *impl_from_IFileSourceFilter(IFileSourceFilter *iface)
static const IFileSourceFilterVtbl FileSource_Vtbl;
static const IAsyncReaderVtbl FileAsyncReader_Vtbl;
static const WCHAR mediatype_name[] = {
'M', 'e', 'd', 'i', 'a', ' ', 'T', 'y', 'p', 'e', 0 };
static const WCHAR subtype_name[] = {
'S', 'u', 'b', 't', 'y', 'p', 'e', 0 };
static const WCHAR source_filter_name[] = {
'S','o','u','r','c','e',' ','F','i','l','t','e','r',0};
static unsigned char byte_from_hex_char(WCHAR wHex)
{
switch (towlower(wHex))
......@@ -230,15 +221,15 @@ BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID
if (!RegOpenKeyExW(HKEY_CLASSES_ROOT, extensions_path, 0, KEY_READ, &key))
{
size = sizeof(guidstr);
if (majortype && !RegQueryValueExW(key, mediatype_name, NULL, NULL, (BYTE *)guidstr, &size))
if (majortype && !RegQueryValueExW(key, L"Media Type", NULL, NULL, (BYTE *)guidstr, &size))
CLSIDFromString(guidstr, majortype);
size = sizeof(guidstr);
if (subtype && !RegQueryValueExW(key, subtype_name, NULL, NULL, (BYTE *)guidstr, &size))
if (subtype && !RegQueryValueExW(key, L"Subtype", NULL, NULL, (BYTE *)guidstr, &size))
CLSIDFromString(guidstr, subtype);
size = sizeof(guidstr);
if (source_clsid && !RegQueryValueExW(key, source_filter_name, NULL, NULL, (BYTE *)guidstr, &size))
if (source_clsid && !RegQueryValueExW(key, L"Source Filter", NULL, NULL, (BYTE *)guidstr, &size))
CLSIDFromString(guidstr, source_clsid);
RegCloseKey(key);
......@@ -304,7 +295,7 @@ BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID
NULL, NULL, (BYTE *)pattern, &max_size))
break;
if (!wcscmp(value_name, source_filter_name))
if (!wcscmp(value_name, L"Source Filter"))
continue;
if (!process_pattern_string(pattern, file))
......@@ -315,7 +306,7 @@ BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID
if (subtype)
CLSIDFromString(subtype_str, subtype);
size = sizeof(source_clsid_str);
if (source_clsid && !RegQueryValueExW(subtype_key, source_filter_name,
if (source_clsid && !RegQueryValueExW(subtype_key, L"Source Filter",
NULL, NULL, (BYTE *)source_clsid_str, &size))
CLSIDFromString(source_clsid_str, source_clsid);
......@@ -467,7 +458,14 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
return HRESULT_FROM_WIN32(GetLastError());
}
strmbase_source_init(&This->source, &This->filter, wszOutputPinName, &source_ops);
free(This->pszFileName);
if (!(This->pszFileName = wcsdup(pszFileName)))
{
CloseHandle(hFile);
return E_OUTOFMEMORY;
}
strmbase_source_init(&This->source, &This->filter, L"Output", &source_ops);
BaseFilterImpl_IncrementPinVersion(&This->filter);
This->file = hFile;
......@@ -478,13 +476,9 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
InitializeCriticalSection(&This->sample_cs);
This->sample_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": FileAsyncReader.sample_cs");
CoTaskMemFree(This->pszFileName);
if (This->pmt)
DeleteMediaType(This->pmt);
This->pszFileName = CoTaskMemAlloc((lstrlenW(pszFileName) + 1) * sizeof(WCHAR));
lstrcpyW(This->pszFileName, pszFileName);
This->pmt = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
if (!pmt)
{
......@@ -513,8 +507,8 @@ static HRESULT WINAPI FileSource_GetCurFile(IFileSourceFilter * iface, LPOLESTR
/* copy file name & media type if available, otherwise clear the outputs */
if (This->pszFileName)
{
*ppszFileName = CoTaskMemAlloc((lstrlenW(This->pszFileName) + 1) * sizeof(WCHAR));
lstrcpyW(*ppszFileName, This->pszFileName);
*ppszFileName = CoTaskMemAlloc((wcslen(This->pszFileName) + 1) * sizeof(WCHAR));
wcscpy(*ppszFileName, This->pszFileName);
}
else
*ppszFileName = NULL;
......
......@@ -954,7 +954,6 @@ static HRESULT WINAPI FilterGraph2_SetDefaultSyncSource(IFilterGraph2 *iface)
static HRESULT GetFilterInfo(IMoniker* pMoniker, VARIANT* pvar)
{
static const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};
IPropertyBag * pPropBagCat = NULL;
HRESULT hr;
......@@ -963,7 +962,7 @@ static HRESULT GetFilterInfo(IMoniker* pMoniker, VARIANT* pvar)
hr = IMoniker_BindToStorage(pMoniker, NULL, NULL, &IID_IPropertyBag, (LPVOID*)&pPropBagCat);
if (SUCCEEDED(hr))
hr = IPropertyBag_Read(pPropBagCat, wszFriendlyName, pvar, NULL);
hr = IPropertyBag_Read(pPropBagCat, L"FriendlyName", pvar, NULL);
if (SUCCEEDED(hr))
TRACE("Moniker = %s\n", debugstr_w(V_BSTR(pvar)));
......@@ -1670,7 +1669,6 @@ static HRESULT WINAPI FilterGraph2_RenderFile(IFilterGraph2 *iface, LPCWSTR lpcw
LPCWSTR lpcwstrPlayList)
{
IFilterGraphImpl *This = impl_from_IFilterGraph2(iface);
static const WCHAR string[] = {'R','e','a','d','e','r',0};
IBaseFilter* preader = NULL;
IPin* ppinreader = NULL;
IEnumPins* penumpins = NULL;
......@@ -1684,7 +1682,7 @@ static HRESULT WINAPI FilterGraph2_RenderFile(IFilterGraph2 *iface, LPCWSTR lpcw
if (lpcwstrPlayList != NULL)
return E_INVALIDARG;
hr = IFilterGraph2_AddSourceFilter(iface, lpcwstrFile, string, &preader);
hr = IFilterGraph2_AddSourceFilter(iface, lpcwstrFile, L"Reader", &preader);
if (FAILED(hr))
return hr;
......
......@@ -72,16 +72,6 @@ static inline FilterMapper3Impl *impl_from_IUnknown( IUnknown *iface )
return CONTAINING_RECORD(iface, FilterMapper3Impl, IUnknown_inner);
}
/* CLSID property in media category Moniker */
static const WCHAR wszClsidName[] = {'C','L','S','I','D',0};
/* FriendlyName property in media category Moniker */
static const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};
/* Merit property in media category Moniker (CLSID_ActiveMovieCategories only) */
static const WCHAR wszMeritName[] = {'M','e','r','i','t',0};
/* FilterData property in media category Moniker (not CLSID_ActiveMovieCategories) */
static const WCHAR wszFilterDataName[] = {'F','i','l','t','e','r','D','a','t','a',0};
/* registry format for REGFILTER2 */
struct REG_RF
{
......@@ -786,7 +776,7 @@ static HRESULT WINAPI FilterMapper3_EnumMatchingFilters(
hrSub = IMoniker_BindToStorage(pMonikerCat, NULL, NULL, &IID_IPropertyBag, (LPVOID*)&pPropBagCat);
if (SUCCEEDED(hrSub))
hrSub = IPropertyBag_Read(pPropBagCat, wszMeritName, &var, NULL);
hrSub = IPropertyBag_Read(pPropBagCat, L"Merit", &var, NULL);
if (SUCCEEDED(hrSub) && (V_UI4(&var) >= dwMerit))
{
......@@ -800,12 +790,12 @@ static HRESULT WINAPI FilterMapper3_EnumMatchingFilters(
{
VARIANT temp;
V_VT(&temp) = VT_EMPTY;
IPropertyBag_Read(pPropBagCat, wszFriendlyName, &temp, NULL);
IPropertyBag_Read(pPropBagCat, L"FriendlyName", &temp, NULL);
TRACE("Considering category %s\n", debugstr_w(V_BSTR(&temp)));
VariantClear(&temp);
}
hrSub = IPropertyBag_Read(pPropBagCat, wszClsidName, &var, NULL);
hrSub = IPropertyBag_Read(pPropBagCat, L"CLSID", &var, NULL);
if (SUCCEEDED(hrSub))
hrSub = CLSIDFromString(V_BSTR(&var), &clsidCat);
......@@ -834,14 +824,14 @@ static HRESULT WINAPI FilterMapper3_EnumMatchingFilters(
{
VARIANT temp;
V_VT(&temp) = VT_EMPTY;
IPropertyBag_Read(pPropBag, wszFriendlyName, &temp, NULL);
IPropertyBag_Read(pPropBag, L"FriendlyName", &temp, NULL);
TRACE("Considering filter %s\n", debugstr_w(V_BSTR(&temp)));
VariantClear(&temp);
}
if (SUCCEEDED(hrSub))
{
hrSub = IPropertyBag_Read(pPropBag, wszFilterDataName, &var, NULL);
hrSub = IPropertyBag_Read(pPropBag, L"FilterData", &var, NULL);
}
if (SUCCEEDED(hrSub))
......@@ -1061,7 +1051,7 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters(
hrSub = IMoniker_BindToStorage(IMon, NULL, NULL, &IID_IPropertyBag, (LPVOID*)&pPropBagCat);
if (SUCCEEDED(hrSub))
hrSub = IPropertyBag_Read(pPropBagCat, wszClsidName, &var, NULL);
hrSub = IPropertyBag_Read(pPropBagCat, L"CLSID", &var, NULL);
if (SUCCEEDED(hrSub))
hrSub = CLSIDFromString(V_BSTR(&var), &clsid);
......@@ -1069,11 +1059,11 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters(
VariantClear(&var);
if (SUCCEEDED(hrSub))
hrSub = IPropertyBag_Read(pPropBagCat, wszFriendlyName, &var, NULL);
hrSub = IPropertyBag_Read(pPropBagCat, L"FriendlyName", &var, NULL);
if (SUCCEEDED(hrSub))
{
len = (lstrlenW(V_BSTR(&var))+1) * sizeof(WCHAR);
len = (wcslen(V_BSTR(&var)) + 1) * sizeof(WCHAR);
if (!(regfilters[idx].Name = CoTaskMemAlloc(len*2)))
hr = E_OUTOFMEMORY;
}
......
......@@ -323,14 +323,14 @@ DWORD WINAPI AMGetErrorTextA(HRESULT hr, LPSTR buffer, DWORD maxlen)
DWORD WINAPI AMGetErrorTextW(HRESULT hr, LPWSTR buffer, DWORD maxlen)
{
unsigned int len;
static const WCHAR format[] = {'E','r','r','o','r',':',' ','0','x','%','l','x',0};
WCHAR error[MAX_ERROR_TEXT_LEN];
FIXME("(%x,%p,%d) stub\n", hr, buffer, maxlen);
if (!buffer) return 0;
wsprintfW(error, format, hr);
if ((len = lstrlenW(error)) >= maxlen) return 0;
lstrcpyW(buffer, error);
swprintf(error, ARRAY_SIZE(error), L"Error: 0x%lx", hr);
if ((len = wcslen(error)) >= maxlen)
return 0;
wcscpy(buffer, error);
return len;
}
......@@ -180,7 +180,7 @@ static HRESULT unregister_filters(struct regsvr_filter const *list)
static struct regsvr_filter const filter_list[] = {
{ &CLSID_NullRenderer,
&CLSID_LegacyAmFilterCategory,
{'N','u','l','l',' ','R','e','n','d','e','r','e','r',0},
L"Null Renderer",
0x200000,
{ { REG_PINFLAG_B_RENDERER,
{ { &MEDIATYPE_NULL, &GUID_NULL },
......@@ -192,7 +192,7 @@ static struct regsvr_filter const filter_list[] = {
},
{ &CLSID_VideoRenderer,
&CLSID_LegacyAmFilterCategory,
{'V','i','d','e','o',' ','R','e','n','d','e','r','e','r',0},
L"Video Renderer",
0x800000,
{ { REG_PINFLAG_B_RENDERER,
{ { &MEDIATYPE_Video, &GUID_NULL },
......@@ -204,7 +204,7 @@ static struct regsvr_filter const filter_list[] = {
},
{ &CLSID_VideoRendererDefault,
&CLSID_LegacyAmFilterCategory,
{'V','i','d','e','o',' ','R','e','n','d','e','r','e','r',0},
L"Video Renderer",
0x800000,
{ { REG_PINFLAG_B_RENDERER,
{ { &MEDIATYPE_Video, &GUID_NULL },
......@@ -216,7 +216,7 @@ static struct regsvr_filter const filter_list[] = {
},
{ &CLSID_VideoMixingRenderer,
&CLSID_LegacyAmFilterCategory,
{'V','i','d','e','o',' ','M','i','x','i','n','g',' ','R','e','n','d','e','r','e','r',0},
L"Video Mixing Renderer",
0x200000,
{ { REG_PINFLAG_B_RENDERER,
{ { &MEDIATYPE_Video, &GUID_NULL },
......@@ -228,7 +228,7 @@ static struct regsvr_filter const filter_list[] = {
},
{ &CLSID_VideoMixingRenderer9,
&CLSID_LegacyAmFilterCategory,
{'V','i','d','e','o',' ','M','i','x','i','n','g',' ','R','e','n','d','e','r','e','r',' ','9',0},
L"Video Mixing Renderer 9",
0x200000,
{ { REG_PINFLAG_B_RENDERER,
{ { &MEDIATYPE_Video, &GUID_NULL },
......@@ -240,7 +240,7 @@ static struct regsvr_filter const filter_list[] = {
},
{ &CLSID_DSoundRender,
&CLSID_LegacyAmFilterCategory,
{'A','u','d','i','o',' ','R','e','n','d','e','r','e','r',0},
L"Audio Renderer",
0x800000,
{ { REG_PINFLAG_B_RENDERER,
{ { &MEDIATYPE_Audio, &MEDIASUBTYPE_PCM },
......@@ -253,7 +253,7 @@ static struct regsvr_filter const filter_list[] = {
},
{ &CLSID_AudioRender,
&CLSID_LegacyAmFilterCategory,
{'A','u','d','i','o',' ','R','e','n','d','e','r','e','r',0},
L"Audio Renderer",
0x800000,
{ { REG_PINFLAG_B_RENDERER,
{ { &MEDIATYPE_Audio, &MEDIASUBTYPE_PCM },
......@@ -266,7 +266,7 @@ static struct regsvr_filter const filter_list[] = {
},
{ &CLSID_AVIDec,
&CLSID_LegacyAmFilterCategory,
{'A','V','I',' ','D','e','c','o','m','p','r','e','s','s','o','r',0},
L"AVI Decompressor",
0x5ffff0,
{ { 0,
{ { &MEDIATYPE_Video, &GUID_NULL },
......@@ -283,7 +283,7 @@ static struct regsvr_filter const filter_list[] = {
},
{ &CLSID_AsyncReader,
&CLSID_LegacyAmFilterCategory,
{'F','i','l','e',' ','S','o','u','r','c','e',' ','(','A','s','y','n','c','.',')',0},
L"File Source (Async.)",
0x400000,
{ { REG_PINFLAG_B_OUTPUT,
{ { &MEDIATYPE_Stream, &GUID_NULL },
......@@ -295,7 +295,7 @@ static struct regsvr_filter const filter_list[] = {
},
{ &CLSID_ACMWrapper,
&CLSID_LegacyAmFilterCategory,
{'A','C','M',' ','W','r','a','p','p','e','r',0},
L"ACM Wrapper",
0x5ffff0,
{ { 0,
{ { &MEDIATYPE_Audio, &GUID_NULL },
......
......@@ -22,11 +22,6 @@
#include "dshow.h"
#include "wine/test.h"
static const WCHAR sink_id[] = {'I','n',0};
static const WCHAR source_id[] = {'O','u','t',0};
static const WCHAR sink_name[] = {'I','n','p','u','t',0};
static const WCHAR source_name[] = {'O','u','t','p','u','t',0};
static IBaseFilter *create_acm_wrapper(void)
{
IBaseFilter *filter = NULL;
......@@ -81,7 +76,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IReferenceClock, FALSE);
check_interface(filter, &IID_IVideoWindow, FALSE);
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"In", &pin);
check_interface(pin, &IID_IMemInputPin, TRUE);
check_interface(pin, &IID_IPin, TRUE);
......@@ -93,7 +88,7 @@ static void test_interfaces(void)
IPin_Release(pin);
IBaseFilter_FindPin(filter, source_id, &pin);
IBaseFilter_FindPin(filter, L"Out", &pin);
check_interface(pin, &IID_IPin, TRUE);
todo_wine check_interface(pin, &IID_IMediaPosition, TRUE);
......@@ -325,8 +320,6 @@ static void test_enum_pins(void)
static void test_find_pin(void)
{
static const WCHAR input_pinW[] = {'i','n','p','u','t',' ','p','i','n',0};
static const WCHAR output_pinW[] = {'o','u','t','p','u','t',' ','p','i','n',0};
IBaseFilter *filter = create_acm_wrapper();
IEnumPins *enum_pins;
IPin *pin, *pin2;
......@@ -336,7 +329,7 @@ static void test_find_pin(void)
hr = IBaseFilter_EnumPins(filter, &enum_pins);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"In", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -344,7 +337,7 @@ static void test_find_pin(void)
IPin_Release(pin);
IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, source_id, &pin);
hr = IBaseFilter_FindPin(filter, L"Out", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -352,13 +345,13 @@ static void test_find_pin(void)
IPin_Release(pin);
IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, sink_name, &pin);
hr = IBaseFilter_FindPin(filter, L"Input", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, source_name, &pin);
hr = IBaseFilter_FindPin(filter, L"Output", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, input_pinW, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, output_pinW, &pin);
hr = IBaseFilter_FindPin(filter, L"output pin", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
IEnumPins_Release(enum_pins);
......@@ -376,7 +369,7 @@ static void test_pin_info(void)
ULONG ref;
IPin *pin;
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"In", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ref = get_refcount(filter);
ok(ref == 2, "Got unexpected refcount %d.\n", ref);
......@@ -388,7 +381,7 @@ static void test_pin_info(void)
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
todo_wine
ok(!lstrcmpW(info.achName, sink_name), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"Input"), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
ok(ref == 3, "Got unexpected refcount %d.\n", ref);
ref = get_refcount(pin);
......@@ -401,7 +394,7 @@ todo_wine
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"In"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL);
......@@ -409,7 +402,7 @@ todo_wine
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, source_id, &pin);
hr = IBaseFilter_FindPin(filter, L"Out", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
check_interface(pin, &IID_IPin, TRUE);
......@@ -420,7 +413,7 @@ todo_wine
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir);
todo_wine
ok(!lstrcmpW(info.achName, source_name), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"Output"), "Got name %s.\n", wine_dbgstr_w(info.achName));
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
......@@ -429,7 +422,7 @@ todo_wine
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, source_id), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"Out"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL);
......
......@@ -23,11 +23,6 @@
#include "vfw.h"
#include "wine/test.h"
static const WCHAR sink_id[] = {'I','n',0};
static const WCHAR source_id[] = {'O','u','t',0};
static const WCHAR sink_name[] = {'X','F','o','r','m',' ','I','n',0};
static const WCHAR source_name[] = {'X','F','o','r','m',' ','O','u','t',0};
static const DWORD test_handler = mmioFOURCC('w','t','s','t');
static const GUID test_subtype = {mmioFOURCC('w','t','s','t'),0x0000,0x0010,{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}};
......@@ -106,7 +101,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IReferenceClock, FALSE);
check_interface(filter, &IID_IVideoWindow, FALSE);
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"In", &pin);
check_interface(pin, &IID_IMemInputPin, TRUE);
check_interface(pin, &IID_IPin, TRUE);
......@@ -118,7 +113,7 @@ static void test_interfaces(void)
IPin_Release(pin);
IBaseFilter_FindPin(filter, source_id, &pin);
IBaseFilter_FindPin(filter, L"Out", &pin);
check_interface(pin, &IID_IPin, TRUE);
todo_wine check_interface(pin, &IID_IMediaPosition, TRUE);
......@@ -350,8 +345,6 @@ static void test_enum_pins(void)
static void test_find_pin(void)
{
static const WCHAR input_pinW[] = {'i','n','p','u','t',' ','p','i','n',0};
static const WCHAR output_pinW[] = {'o','u','t','p','u','t',' ','p','i','n',0};
IBaseFilter *filter = create_avi_dec();
IEnumPins *enum_pins;
IPin *pin, *pin2;
......@@ -361,7 +354,7 @@ static void test_find_pin(void)
hr = IBaseFilter_EnumPins(filter, &enum_pins);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"In", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -369,7 +362,7 @@ static void test_find_pin(void)
IPin_Release(pin);
IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, source_id, &pin);
hr = IBaseFilter_FindPin(filter, L"Out", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -377,13 +370,13 @@ static void test_find_pin(void)
IPin_Release(pin);
IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, sink_name, &pin);
hr = IBaseFilter_FindPin(filter, L"XForm In", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, source_name, &pin);
hr = IBaseFilter_FindPin(filter, L"XForm Out", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, input_pinW, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, output_pinW, &pin);
hr = IBaseFilter_FindPin(filter, L"output pin", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
IEnumPins_Release(enum_pins);
......@@ -401,7 +394,7 @@ static void test_pin_info(void)
ULONG ref;
IPin *pin;
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"In", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ref = get_refcount(filter);
ok(ref == 2, "Got unexpected refcount %d.\n", ref);
......@@ -412,7 +405,7 @@ static void test_pin_info(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
todo_wine ok(!lstrcmpW(info.achName, sink_name), "Got name %s.\n", wine_dbgstr_w(info.achName));
todo_wine ok(!wcscmp(info.achName, L"XForm In"), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
ok(ref == 3, "Got unexpected refcount %d.\n", ref);
ref = get_refcount(pin);
......@@ -425,7 +418,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"In"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL);
......@@ -433,7 +426,7 @@ static void test_pin_info(void)
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, source_id, &pin);
hr = IBaseFilter_FindPin(filter, L"Out", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
check_interface(pin, &IID_IPin, TRUE);
......@@ -443,7 +436,7 @@ static void test_pin_info(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir);
todo_wine ok(!lstrcmpW(info.achName, source_name), "Got name %s.\n", wine_dbgstr_w(info.achName));
todo_wine ok(!wcscmp(info.achName, L"XForm Out"), "Got name %s.\n", wine_dbgstr_w(info.achName));
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
......@@ -452,7 +445,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, source_id), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"Out"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL);
......@@ -474,7 +467,7 @@ static void test_media_types(void)
ULONG ref;
IPin *pin;
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -528,7 +521,7 @@ static void test_media_types(void)
IPin_Release(pin);
IBaseFilter_FindPin(filter, source_id, &pin);
IBaseFilter_FindPin(filter, L"Out", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -552,7 +545,7 @@ static void test_enum_media_types(void)
HRESULT hr;
IPin *pin;
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -583,7 +576,7 @@ static void test_enum_media_types(void)
IEnumMediaTypes_Release(enum2);
IPin_Release(pin);
IBaseFilter_FindPin(filter, source_id, &pin);
IBaseFilter_FindPin(filter, L"Out", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......
......@@ -25,9 +25,6 @@
#include "wmcodecdsp.h"
#include "wine/test.h"
static const WCHAR sink_name[] = {'i','n','p','u','t',' ','p','i','n',0};
static const WCHAR source0_name[] = {'S','t','r','e','a','m',' ','0','0',0};
static IBaseFilter *create_avi_splitter(void)
{
IBaseFilter *filter = NULL;
......@@ -37,8 +34,6 @@ static IBaseFilter *create_avi_splitter(void)
return filter;
}
static const WCHAR avifile[] = {'t','e','s','t','.','a','v','i',0};
static WCHAR *load_resource(const WCHAR *name)
{
static WCHAR pathW[MAX_PATH];
......@@ -48,7 +43,7 @@ static WCHAR *load_resource(const WCHAR *name)
void *ptr;
GetTempPathW(ARRAY_SIZE(pathW), pathW);
lstrcatW(pathW, name);
wcscat(pathW, name);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n",
......@@ -73,7 +68,6 @@ static ULONG get_refcount(void *iface)
static IFilterGraph2 *connect_input(IBaseFilter *splitter, const WCHAR *filename)
{
static const WCHAR outputW[] = {'O','u','t','p','u','t',0};
IFileSourceFilter *filesource;
IFilterGraph2 *graph;
IBaseFilter *reader;
......@@ -90,8 +84,8 @@ static IFilterGraph2 *connect_input(IBaseFilter *splitter, const WCHAR *filename
IFilterGraph2_AddFilter(graph, reader, NULL);
IFilterGraph2_AddFilter(graph, splitter, NULL);
IBaseFilter_FindPin(splitter, sink_name, &sink);
IBaseFilter_FindPin(reader, outputW, &source);
IBaseFilter_FindPin(splitter, L"input pin", &sink);
IBaseFilter_FindPin(reader, L"Output", &source);
hr = IFilterGraph2_ConnectDirect(graph, source, sink, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -120,7 +114,7 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO
static void test_interfaces(void)
{
const WCHAR *filename = load_resource(avifile);
const WCHAR *filename = load_resource(L"test.avi");
IBaseFilter *filter = create_avi_splitter();
IFilterGraph2 *graph = connect_input(filter, filename);
IPin *pin;
......@@ -143,7 +137,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IReferenceClock, FALSE);
check_interface(filter, &IID_IVideoWindow, FALSE);
IBaseFilter_FindPin(filter, sink_name, &pin);
IBaseFilter_FindPin(filter, L"input pin", &pin);
check_interface(pin, &IID_IPin, TRUE);
check_interface(pin, &IID_IUnknown, TRUE);
......@@ -155,7 +149,7 @@ static void test_interfaces(void)
IPin_Release(pin);
IBaseFilter_FindPin(filter, source0_name, &pin);
IBaseFilter_FindPin(filter, L"Stream 00", &pin);
todo_wine check_interface(pin, &IID_IMediaPosition, TRUE);
check_interface(pin, &IID_IMediaSeeking, TRUE);
......@@ -269,7 +263,7 @@ static void test_aggregation(void)
static void test_enum_pins(void)
{
const WCHAR *filename = load_resource(avifile);
const WCHAR *filename = load_resource(L"test.avi");
IBaseFilter *filter = create_avi_splitter();
IEnumPins *enum1, *enum2;
IFilterGraph2 *graph;
......@@ -404,8 +398,7 @@ todo_wine
static void test_find_pin(void)
{
static const WCHAR inputW[] = {'I','n','p','u','t',0};
const WCHAR *filename = load_resource(avifile);
const WCHAR *filename = load_resource(L"test.avi");
IBaseFilter *filter = create_avi_splitter();
IFilterGraph2 *graph;
IEnumPins *enum_pins;
......@@ -414,14 +407,14 @@ static void test_find_pin(void)
ULONG ref;
BOOL ret;
hr = IBaseFilter_FindPin(filter, sink_name, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, source0_name, &pin);
hr = IBaseFilter_FindPin(filter, L"Stream 00", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, inputW, &pin);
hr = IBaseFilter_FindPin(filter, L"Input", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
graph = connect_input(filter, filename);
......@@ -432,7 +425,7 @@ static void test_find_pin(void)
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, source0_name, &pin);
hr = IBaseFilter_FindPin(filter, L"Stream 00", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine
ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin);
......@@ -442,7 +435,7 @@ todo_wine
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, sink_name, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine
ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin);
......@@ -459,7 +452,7 @@ todo_wine
static void test_pin_info(void)
{
const WCHAR *filename = load_resource(avifile);
const WCHAR *filename = load_resource(L"test.avi");
IBaseFilter *filter = create_avi_splitter();
ULONG ref, expect_ref;
IFilterGraph2 *graph;
......@@ -472,7 +465,7 @@ static void test_pin_info(void)
graph = connect_input(filter, filename);
hr = IBaseFilter_FindPin(filter, sink_name, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
expect_ref = get_refcount(filter);
ref = get_refcount(pin);
......@@ -482,7 +475,7 @@ static void test_pin_info(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, sink_name), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"input pin"), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
ok(ref == expect_ref + 1, "Got unexpected refcount %d.\n", ref);
ref = get_refcount(pin);
......@@ -495,12 +488,12 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, sink_name), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"input pin"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, source0_name, &pin);
hr = IBaseFilter_FindPin(filter, L"Stream 00", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
check_interface(pin, &IID_IPin, TRUE);
......@@ -510,7 +503,7 @@ static void test_pin_info(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, source0_name), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"Stream 00"), "Got name %s.\n", wine_dbgstr_w(info.achName));
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
......@@ -519,7 +512,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, source0_name), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"Stream 00"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
IPin_Release(pin);
......@@ -539,7 +532,7 @@ static void test_media_types(void)
{sizeof(BITMAPINFOHEADER), 32, 24, 1, 12, mmioFOURCC('I','4','2','0'), 32*24*12/8}
};
const WCHAR *filename = load_resource(avifile);
const WCHAR *filename = load_resource(L"test.avi");
IBaseFilter *filter = create_avi_splitter();
AM_MEDIA_TYPE mt = {{0}}, *pmt;
IEnumMediaTypes *enummt;
......@@ -549,7 +542,7 @@ static void test_media_types(void)
IPin *pin;
BOOL ret;
IBaseFilter_FindPin(filter, sink_name, &pin);
IBaseFilter_FindPin(filter, L"input pin", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -592,7 +585,7 @@ static void test_media_types(void)
IEnumMediaTypes_Release(enummt);
IPin_Release(pin);
IBaseFilter_FindPin(filter, source0_name, &pin);
IBaseFilter_FindPin(filter, L"Stream 00", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -657,7 +650,7 @@ static void test_media_types(void)
static void test_enum_media_types(void)
{
const WCHAR *filename = load_resource(avifile);
const WCHAR *filename = load_resource(L"test.avi");
IBaseFilter *filter = create_avi_splitter();
IFilterGraph2 *graph = connect_input(filter, filename);
IEnumMediaTypes *enum1, *enum2;
......@@ -667,7 +660,7 @@ static void test_enum_media_types(void)
IPin *pin;
BOOL ret;
IBaseFilter_FindPin(filter, sink_name, &pin);
IBaseFilter_FindPin(filter, L"input pin", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -698,7 +691,7 @@ static void test_enum_media_types(void)
IEnumMediaTypes_Release(enum2);
IPin_Release(pin);
IBaseFilter_FindPin(filter, source0_name, &pin);
IBaseFilter_FindPin(filter, L"Stream 00", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -786,7 +779,7 @@ static void test_filter_graph(void)
DWORD readbytes;
FILTER_STATE state;
WCHAR *filename = load_resource(avifile);
WCHAR *filename = load_resource(L"test.avi");
file = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, 0, NULL);
......
......@@ -26,7 +26,7 @@
#include "amaudio.h"
#include "wine/test.h"
static const WCHAR sink_id[] = {'A','u','d','i','o',' ','I','n','p','u','t',' ','p','i','n',' ','(','r','e','n','d','e','r','e','d',')',0};
static const WCHAR sink_id[] = L"Audio Input pin (rendered)";
static IBaseFilter *create_dsound_render(void)
{
......@@ -64,10 +64,9 @@ static ULONG WINAPI property_bag_Release(IPropertyBag *iface)
static HRESULT WINAPI property_bag_Read(IPropertyBag *iface, const WCHAR *name, VARIANT *var, IErrorLog *log)
{
static const WCHAR dsguidW[] = {'D','S','G','u','i','d',0};
WCHAR guidstr[39];
ok(!lstrcmpW(name, dsguidW), "Got unexpected name %s.\n", wine_dbgstr_w(name));
ok(!wcscmp(name, L"DSGuid"), "Got unexpected name %s.\n", wine_dbgstr_w(name));
ok(V_VT(var) == VT_BSTR, "Got unexpected type %u.\n", V_VT(var));
StringFromGUID2(&DSDEVID_DefaultPlayback, guidstr, ARRAY_SIZE(guidstr));
V_BSTR(var) = SysAllocString(guidstr);
......@@ -353,18 +352,16 @@ static void test_enum_pins(void)
static void test_find_pin(void)
{
static const WCHAR inW[] = {'I','n',0};
static const WCHAR input_pinW[] = {'i','n','p','u','t',' ','p','i','n',0};
IBaseFilter *filter = create_dsound_render();
IEnumPins *enum_pins;
IPin *pin, *pin2;
HRESULT hr;
ULONG ref;
hr = IBaseFilter_FindPin(filter, inW, &pin);
hr = IBaseFilter_FindPin(filter, L"In", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, input_pinW, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
......@@ -405,7 +402,7 @@ static void test_pin_info(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
ok(ref == 3, "Got unexpected refcount %d.\n", ref);
ref = get_refcount(pin);
......@@ -418,7 +415,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL);
......
......@@ -23,10 +23,6 @@
#include "dshow.h"
#include "wine/test.h"
static const WCHAR avifile[] = {'t','e','s','t','.','a','v','i',0};
static const WCHAR source_id[] = {'O','u','t','p','u','t',0};
static IBaseFilter *create_file_source(void)
{
IBaseFilter *filter = NULL;
......@@ -45,7 +41,7 @@ static WCHAR *load_resource(const WCHAR *name)
void *ptr;
GetTempPathW(ARRAY_SIZE(pathW), pathW);
lstrcatW(pathW, name);
wcscat(pathW, name);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n",
......@@ -97,7 +93,7 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO
static void test_interfaces(void)
{
const WCHAR *filename = load_resource(avifile);
const WCHAR *filename = load_resource(L"test.avi");
IBaseFilter *filter = create_file_source();
IPin *pin;
......@@ -118,7 +114,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IVideoWindow, FALSE);
load_file(filter, filename);
IBaseFilter_FindPin(filter, source_id, &pin);
IBaseFilter_FindPin(filter, L"Output", &pin);
check_interface(pin, &IID_IAsyncReader, TRUE);
check_interface(pin, &IID_IPin, TRUE);
......@@ -229,7 +225,6 @@ static void test_aggregation(void)
static void test_file_source_filter(void)
{
static const WCHAR prefix[] = {'w','i','n',0};
static const struct
{
const char *label;
......@@ -297,7 +292,7 @@ static void test_file_source_filter(void)
int i;
GetTempPathW(MAX_PATH, temp);
GetTempFileNameW(temp, prefix, 0, path);
GetTempFileNameW(temp, L"win", 0, path);
for (i = 0; i < ARRAY_SIZE(tests); i++)
{
......@@ -335,7 +330,7 @@ static void test_file_source_filter(void)
memset(&file_mt, 0x11, sizeof(file_mt));
hr = IFileSourceFilter_GetCurFile(filesource, &olepath, &file_mt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(olepath, path), "Expected path %s, got %s.\n",
ok(!wcscmp(olepath, path), "Expected path %s, got %s.\n",
wine_dbgstr_w(path), wine_dbgstr_w(olepath));
ok(IsEqualGUID(&file_mt.majortype, &MEDIATYPE_Stream), "Got major type %s.\n",
wine_dbgstr_guid(&file_mt.majortype));
......@@ -354,7 +349,7 @@ static void test_file_source_filter(void)
ok(!file_mt.pbFormat, "Got format %p.\n", file_mt.pbFormat);
CoTaskMemFree(olepath);
hr = IBaseFilter_FindPin(filter, source_id, &pin);
hr = IBaseFilter_FindPin(filter, L"Output", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IPin_EnumMediaTypes(pin, &enum_mt);
......@@ -423,7 +418,7 @@ static void test_file_source_filter(void)
mt.pUnk = NULL;
mt.cbFormat = 0;
mt.pbFormat = NULL;
filename = load_resource(avifile);
filename = load_resource(L"test.avi");
hr = IFileSourceFilter_Load(filesource, filename, &mt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -432,7 +427,7 @@ static void test_file_source_filter(void)
ok(!memcmp(&file_mt, &mt, sizeof(mt)), "Media types did not match.\n");
CoTaskMemFree(olepath);
hr = IBaseFilter_FindPin(filter, source_id, &pin);
hr = IBaseFilter_FindPin(filter, L"Output", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IPin_EnumMediaTypes(pin, &enum_mt);
......@@ -496,7 +491,7 @@ static void test_file_source_filter(void)
static void test_enum_pins(void)
{
const WCHAR *filename = load_resource(avifile);
const WCHAR *filename = load_resource(L"test.avi");
IBaseFilter *filter = create_file_source();
IEnumPins *enum1, *enum2;
IPin *pins[2];
......@@ -607,7 +602,7 @@ todo_wine
static void test_find_pin(void)
{
const WCHAR *filename = load_resource(avifile);
const WCHAR *filename = load_resource(L"test.avi");
IBaseFilter *filter = create_file_source();
IEnumPins *enumpins;
IPin *pin, *pin2;
......@@ -615,12 +610,12 @@ static void test_find_pin(void)
ULONG ref;
BOOL ret;
hr = IBaseFilter_FindPin(filter, source_id, &pin);
hr = IBaseFilter_FindPin(filter, L"Output", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
load_file(filter, filename);
hr = IBaseFilter_FindPin(filter, source_id, &pin);
hr = IBaseFilter_FindPin(filter, L"Output", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ref = get_refcount(filter);
ok(ref == 2, "Got unexpected refcount %d.\n", ref);
......@@ -645,7 +640,7 @@ static void test_find_pin(void)
static void test_pin_info(void)
{
const WCHAR *filename = load_resource(avifile);
const WCHAR *filename = load_resource(L"test.avi");
IBaseFilter *filter = create_file_source();
PIN_DIRECTION dir;
PIN_INFO info;
......@@ -657,7 +652,7 @@ static void test_pin_info(void)
load_file(filter, filename);
hr = IBaseFilter_FindPin(filter, source_id, &pin);
hr = IBaseFilter_FindPin(filter, L"Output", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ref = get_refcount(filter);
ok(ref == 2, "Got unexpected refcount %d.\n", ref);
......@@ -668,7 +663,7 @@ static void test_pin_info(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, source_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"Output"), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
ok(ref == 3, "Got unexpected refcount %d.\n", ref);
ref = get_refcount(pin);
......@@ -681,7 +676,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, source_id), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"Output"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
IPin_Release(pin);
......@@ -1001,7 +996,7 @@ static void test_async_reader(void)
int i;
GetTempPathW(ARRAY_SIZE(filename), filename);
lstrcatW(filename, avifile);
wcscat(filename, L"test.avi");
file = CreateFileW(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
ok(file != INVALID_HANDLE_VALUE, "Failed to create file, error %u.\n", GetLastError());
for (i = 0; i < 600; i++)
......@@ -1013,7 +1008,7 @@ static void test_async_reader(void)
IBaseFilter_QueryInterface(filter, &IID_IFileSourceFilter, (void **)&filesource);
IFileSourceFilter_Load(filesource, filename, NULL);
IBaseFilter_FindPin(filter, source_id, &pin);
IBaseFilter_FindPin(filter, L"Output", &pin);
hr = IPin_QueryInterface(pin, &IID_IAsyncReader, (void **)&reader);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -1077,7 +1072,7 @@ static void test_async_reader(void)
static void test_enum_media_types(void)
{
const WCHAR *filename = load_resource(avifile);
const WCHAR *filename = load_resource(L"test.avi");
IBaseFilter *filter = create_file_source();
IEnumMediaTypes *enum1, *enum2;
AM_MEDIA_TYPE *mts[3];
......@@ -1088,7 +1083,7 @@ static void test_enum_media_types(void)
load_file(filter, filename);
IBaseFilter_FindPin(filter, source_id, &pin);
IBaseFilter_FindPin(filter, L"Output", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......
......@@ -23,11 +23,6 @@
#include "mmreg.h"
#include "wine/test.h"
static const WCHAR mp3file[] = {'t','e','s','t','.','m','p','3',0};
static const WCHAR inputW[] = {'I','n','p','u','t',0};
static const WCHAR audioW[] = {'A','u','d','i','o',0};
static const GUID MEDIASUBTYPE_mp3 = {0x00000055,0x0000,0x0010,{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}};
static IBaseFilter *create_mpeg_splitter(void)
......@@ -48,7 +43,7 @@ static WCHAR *load_resource(const WCHAR *name)
void *ptr;
GetTempPathW(ARRAY_SIZE(pathW), pathW);
lstrcatW(pathW, name);
wcscat(pathW, name);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n",
......@@ -73,7 +68,6 @@ static ULONG get_refcount(void *iface)
static IFilterGraph2 *connect_input(IBaseFilter *splitter, const WCHAR *filename)
{
static const WCHAR outputW[] = {'O','u','t','p','u','t',0};
IFileSourceFilter *filesource;
IFilterGraph2 *graph;
IBaseFilter *reader;
......@@ -90,8 +84,8 @@ static IFilterGraph2 *connect_input(IBaseFilter *splitter, const WCHAR *filename
IFilterGraph2_AddFilter(graph, reader, NULL);
IFilterGraph2_AddFilter(graph, splitter, NULL);
IBaseFilter_FindPin(splitter, inputW, &sink);
IBaseFilter_FindPin(reader, outputW, &source);
IBaseFilter_FindPin(splitter, L"Input", &sink);
IBaseFilter_FindPin(reader, L"Output", &source);
hr = IFilterGraph2_ConnectDirect(graph, source, sink, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -120,7 +114,7 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO
static void test_interfaces(void)
{
const WCHAR *filename = load_resource(mp3file);
const WCHAR *filename = load_resource(L"test.mp3");
IBaseFilter *filter = create_mpeg_splitter();
IFilterGraph2 *graph = connect_input(filter, filename);
IPin *pin;
......@@ -144,7 +138,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IReferenceClock, FALSE);
check_interface(filter, &IID_IVideoWindow, FALSE);
IBaseFilter_FindPin(filter, inputW, &pin);
IBaseFilter_FindPin(filter, L"Input", &pin);
todo_wine check_interface(pin, &IID_IMemInputPin, TRUE);
check_interface(pin, &IID_IPin, TRUE);
......@@ -157,7 +151,7 @@ static void test_interfaces(void)
IPin_Release(pin);
IBaseFilter_FindPin(filter, audioW, &pin);
IBaseFilter_FindPin(filter, L"Audio", &pin);
check_interface(pin, &IID_IMediaSeeking, TRUE);
check_interface(pin, &IID_IPin, TRUE);
......@@ -271,7 +265,7 @@ static void test_aggregation(void)
static void test_enum_pins(void)
{
const WCHAR *filename = load_resource(mp3file);
const WCHAR *filename = load_resource(L"test.mp3");
IBaseFilter *filter = create_mpeg_splitter();
IEnumPins *enum1, *enum2;
IFilterGraph2 *graph;
......@@ -398,8 +392,7 @@ todo_wine
static void test_find_pin(void)
{
static const WCHAR input_pinW[] = {'i','n','p','u','t',' ','p','i','n',0};
const WCHAR *filename = load_resource(mp3file);
const WCHAR *filename = load_resource(L"test.mp3");
IBaseFilter *filter = create_mpeg_splitter();
IFilterGraph2 *graph;
IEnumPins *enum_pins;
......@@ -408,14 +401,14 @@ static void test_find_pin(void)
ULONG ref;
BOOL ret;
hr = IBaseFilter_FindPin(filter, input_pinW, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, inputW, &pin);
hr = IBaseFilter_FindPin(filter, L"Input", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, audioW, &pin);
hr = IBaseFilter_FindPin(filter, L"Audio", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
graph = connect_input(filter, filename);
......@@ -426,7 +419,7 @@ static void test_find_pin(void)
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, inputW, &pin);
hr = IBaseFilter_FindPin(filter, L"Input", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin);
IPin_Release(pin);
......@@ -435,7 +428,7 @@ static void test_find_pin(void)
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, audioW, &pin);
hr = IBaseFilter_FindPin(filter, L"Audio", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin);
IPin_Release(pin);
......@@ -451,7 +444,7 @@ static void test_find_pin(void)
static void test_pin_info(void)
{
const WCHAR *filename = load_resource(mp3file);
const WCHAR *filename = load_resource(L"test.mp3");
IBaseFilter *filter = create_mpeg_splitter();
ULONG ref, expect_ref;
IFilterGraph2 *graph;
......@@ -464,7 +457,7 @@ static void test_pin_info(void)
graph = connect_input(filter, filename);
hr = IBaseFilter_FindPin(filter, inputW, &pin);
hr = IBaseFilter_FindPin(filter, L"Input", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
expect_ref = get_refcount(filter);
ref = get_refcount(pin);
......@@ -474,7 +467,7 @@ static void test_pin_info(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, inputW), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"Input"), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
ok(ref == expect_ref + 1, "Got unexpected refcount %d.\n", ref);
ref = get_refcount(pin);
......@@ -487,19 +480,19 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, inputW), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"Input"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, audioW, &pin);
hr = IBaseFilter_FindPin(filter, L"Audio", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IPin_QueryPinInfo(pin, &info);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, audioW), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"Audio"), "Got name %s.\n", wine_dbgstr_w(info.achName));
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
......@@ -508,7 +501,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, audioW), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"Audio"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
IPin_Release(pin);
......@@ -533,7 +526,7 @@ static void test_media_types(void)
MPEGLAYER3_ID_MPEG, 0, 192, 1, 0
};
const WCHAR *filename = load_resource(mp3file);
const WCHAR *filename = load_resource(L"test.mp3");
AM_MEDIA_TYPE mt = {{0}}, *pmt, expect_mt = {{0}};
IBaseFilter *filter = create_mpeg_splitter();
IEnumMediaTypes *enummt;
......@@ -543,7 +536,7 @@ static void test_media_types(void)
IPin *pin;
BOOL ret;
IBaseFilter_FindPin(filter, inputW, &pin);
IBaseFilter_FindPin(filter, L"Input", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -658,7 +651,7 @@ static void test_media_types(void)
IEnumMediaTypes_Release(enummt);
IPin_Release(pin);
IBaseFilter_FindPin(filter, audioW, &pin);
IBaseFilter_FindPin(filter, L"Audio", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -812,7 +805,7 @@ done:
static void test_enum_media_types(void)
{
const WCHAR *filename = load_resource(mp3file);
const WCHAR *filename = load_resource(L"test.mp3");
IBaseFilter *filter = create_mpeg_splitter();
IFilterGraph2 *graph = connect_input(filter, filename);
IEnumMediaTypes *enum1, *enum2;
......@@ -823,7 +816,7 @@ static void test_enum_media_types(void)
IPin *pin;
BOOL ret;
IBaseFilter_FindPin(filter, inputW, &pin);
IBaseFilter_FindPin(filter, L"Input", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -904,7 +897,7 @@ static void test_enum_media_types(void)
IEnumMediaTypes_Release(enum2);
IPin_Release(pin);
IBaseFilter_FindPin(filter, audioW, &pin);
IBaseFilter_FindPin(filter, L"Audio", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......
......@@ -24,8 +24,6 @@
#include "wine/strmbase.h"
#include "wine/test.h"
static const WCHAR sink_id[] = {'I','n',0};
static IBaseFilter *create_video_renderer(void)
{
IBaseFilter *filter = NULL;
......@@ -99,7 +97,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IPin, FALSE);
check_interface(filter, &IID_IReferenceClock, FALSE);
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"In", &pin);
check_interface(pin, &IID_IMemInputPin, TRUE);
check_interface(pin, &IID_IOverlay, TRUE);
......@@ -303,17 +301,16 @@ static void test_enum_pins(void)
static void test_find_pin(void)
{
static const WCHAR input_pinW[] = {'i','n','p','u','t',' ','p','i','n',0};
IBaseFilter *filter = create_video_renderer();
IEnumPins *enum_pins;
IPin *pin, *pin2;
HRESULT hr;
ULONG ref;
hr = IBaseFilter_FindPin(filter, input_pinW, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"In", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum_pins);
......@@ -332,7 +329,6 @@ static void test_find_pin(void)
static void test_pin_info(void)
{
static const WCHAR sink_name[] = {'I','n','p','u','t',0};
IBaseFilter *filter = create_video_renderer();
PIN_DIRECTION dir;
PIN_INFO info;
......@@ -341,7 +337,7 @@ static void test_pin_info(void)
ULONG ref;
IPin *pin;
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"In", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ref = get_refcount(filter);
ok(ref == 2, "Got unexpected refcount %d.\n", ref);
......@@ -353,7 +349,7 @@ static void test_pin_info(void)
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
todo_wine
ok(!lstrcmpW(info.achName, sink_name), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"Input"), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
ok(ref == 3, "Got unexpected refcount %d.\n", ref);
ref = get_refcount(pin);
......@@ -366,7 +362,7 @@ todo_wine
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"In"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL);
......@@ -400,7 +396,7 @@ static void test_media_types(void)
&MEDIASUBTYPE_RGB32,
};
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -454,7 +450,7 @@ static void test_enum_media_types(void)
HRESULT hr;
IPin *pin;
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -1131,7 +1127,7 @@ static void test_connect_pin(void)
IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL);
IFilterGraph2_AddFilter(graph, filter, NULL);
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"In", &pin);
for (i = 0; i < ARRAY_SIZE(subtype_tests); ++i)
{
......@@ -1289,7 +1285,7 @@ static void test_overlay(void)
IPin *pin;
HWND hwnd;
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......
......@@ -204,7 +204,6 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO
static void test_interfaces(void)
{
WCHAR sink_id[] = {'V','M','R',' ','I','n','p','u','t','0',0};
IBaseFilter *filter = create_vmr7(0);
ULONG ref;
IPin *pin;
......@@ -246,7 +245,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IVMRWindowlessControl, FALSE);
check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
check_interface(pin, &IID_IMemInputPin, TRUE);
check_interface(pin, &IID_IOverlay, TRUE);
......@@ -276,7 +275,7 @@ static void test_interfaces(void)
todo_wine check_interface(filter, &IID_IVMRMonitorConfig9, FALSE);
todo_wine check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
check_interface(pin, &IID_IMemInputPin, TRUE);
check_interface(pin, &IID_IOverlay, TRUE);
......@@ -305,7 +304,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IVMRWindowlessControl, FALSE);
check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
check_interface(pin, &IID_IMemInputPin, TRUE);
check_interface(pin, &IID_IOverlay, TRUE);
......@@ -550,10 +549,6 @@ static void test_enum_pins(void)
static void test_find_pin(void)
{
static const WCHAR input_pinW[] = {'i','n','p','u','t',' ','p','i','n',0};
static const WCHAR inW[] = {'I','n',0};
WCHAR sink_id[] = {'V','M','R',' ','I','n','p','u','t','0',0};
IBaseFilter *filter = create_vmr7(0);
IEnumPins *enum_pins;
IPin *pin, *pin2;
......@@ -562,13 +557,13 @@ static void test_find_pin(void)
IBaseFilter_EnumPins(filter, &enum_pins);
hr = IBaseFilter_FindPin(filter, input_pinW, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, inW, &pin);
hr = IBaseFilter_FindPin(filter, L"In", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -576,16 +571,14 @@ static void test_find_pin(void)
IPin_Release(pin);
IPin_Release(pin2);
sink_id[9] = '1';
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"VMR input1", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
if (SUCCEEDED(set_mixing_mode(filter)))
{
IEnumPins_Reset(enum_pins);
sink_id[9] = '0';
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -593,8 +586,7 @@ static void test_find_pin(void)
IPin_Release(pin);
IPin_Release(pin2);
sink_id[9] = '1';
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"VMR Input1", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -602,8 +594,7 @@ static void test_find_pin(void)
IPin_Release(pin);
IPin_Release(pin2);
sink_id[9] = '2';
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"VMR Input2", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
}
else
......@@ -616,7 +607,6 @@ static void test_find_pin(void)
static void test_pin_info(void)
{
WCHAR sink_id[] = {'V','M','R',' ','I','n','p','u','t','0',0};
IBaseFilter *filter = create_vmr7(0);
PIN_DIRECTION dir;
ULONG count, ref;
......@@ -625,11 +615,11 @@ static void test_pin_info(void)
WCHAR *id;
IPin *pin;
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_QueryPinInfo(pin, &info);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"VMR Input0"), "Got name %s.\n", wine_dbgstr_w(info.achName));
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
......@@ -638,7 +628,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"VMR Input0"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count);
......@@ -648,13 +638,11 @@ static void test_pin_info(void)
if (SUCCEEDED(set_mixing_mode(filter)))
{
sink_id[9] = '1';
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input1", &pin);
hr = IPin_QueryPinInfo(pin, &info);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"VMR Input1"), "Got name %s.\n", wine_dbgstr_w(info.achName));
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
......@@ -663,7 +651,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"VMR Input1"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count);
......@@ -680,7 +668,6 @@ static void test_pin_info(void)
static void test_media_types(void)
{
WCHAR sink_id[] = {'V','M','R',' ','I','n','p','u','t','0',0};
IBaseFilter *filter = create_vmr7(0);
AM_MEDIA_TYPE *mt, req_mt = {{0}};
VIDEOINFOHEADER vih =
......@@ -702,7 +689,7 @@ static void test_media_types(void)
&MEDIASUBTYPE_RGB32,
};
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -749,7 +736,6 @@ static void test_media_types(void)
static void test_enum_media_types(void)
{
WCHAR sink_id[] = {'V','M','R',' ','I','n','p','u','t','0',0};
IBaseFilter *filter = create_vmr7(0);
IEnumMediaTypes *enum1, *enum2;
AM_MEDIA_TYPE *mts[2];
......@@ -757,7 +743,7 @@ static void test_enum_media_types(void)
HRESULT hr;
IPin *pin;
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......
......@@ -195,7 +195,6 @@ static HRESULT check_interface_(unsigned int line, void *iface, REFIID riid, BOO
static void test_interfaces(void)
{
WCHAR sink_id[] = {'V','M','R',' ','I','n','p','u','t','0',0};
IBaseFilter *filter = create_vmr9(0);
ULONG ref;
IPin *pin;
......@@ -239,7 +238,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IVMRWindowlessControl, FALSE);
check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
check_interface(pin, &IID_IMemInputPin, TRUE);
check_interface(pin, &IID_IOverlay, TRUE);
......@@ -269,7 +268,7 @@ static void test_interfaces(void)
todo_wine check_interface(filter, &IID_IVMRMonitorConfig, FALSE);
todo_wine check_interface(filter, &IID_IVMRWindowlessControl, FALSE);
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
check_interface(pin, &IID_IMemInputPin, TRUE);
check_interface(pin, &IID_IOverlay, TRUE);
......@@ -298,7 +297,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IVMRWindowlessControl, FALSE);
check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
check_interface(pin, &IID_IMemInputPin, TRUE);
check_interface(pin, &IID_IOverlay, TRUE);
......@@ -556,10 +555,6 @@ static void test_enum_pins(void)
static void test_find_pin(void)
{
static const WCHAR input_pinW[] = {'i','n','p','u','t',' ','p','i','n',0};
static const WCHAR inW[] = {'I','n',0};
WCHAR sink_id[] = {'V','M','R',' ','I','n','p','u','t','0',0};
IBaseFilter *filter = create_vmr9(0);
IEnumPins *enum_pins;
IPin *pin, *pin2;
......@@ -568,13 +563,13 @@ static void test_find_pin(void)
IBaseFilter_EnumPins(filter, &enum_pins);
hr = IBaseFilter_FindPin(filter, input_pinW, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, inW, &pin);
hr = IBaseFilter_FindPin(filter, L"In", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -582,16 +577,14 @@ static void test_find_pin(void)
IPin_Release(pin);
IPin_Release(pin2);
sink_id[9] = '1';
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"VMR Input1", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
if (SUCCEEDED(set_mixing_mode(filter)))
{
IEnumPins_Reset(enum_pins);
sink_id[9] = '0';
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -599,8 +592,7 @@ static void test_find_pin(void)
IPin_Release(pin);
IPin_Release(pin2);
sink_id[9] = '1';
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"VMR Input1", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -608,8 +600,7 @@ static void test_find_pin(void)
IPin_Release(pin);
IPin_Release(pin2);
sink_id[9] = '2';
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IBaseFilter_FindPin(filter, L"VMR Input2", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
}
......@@ -620,7 +611,6 @@ static void test_find_pin(void)
static void test_pin_info(void)
{
WCHAR sink_id[] = {'V','M','R',' ','I','n','p','u','t','0',0};
IBaseFilter *filter = create_vmr9(0);
PIN_DIRECTION dir;
ULONG count, ref;
......@@ -629,11 +619,11 @@ static void test_pin_info(void)
WCHAR *id;
IPin *pin;
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_QueryPinInfo(pin, &info);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"VMR Input0"), "Got name %s.\n", wine_dbgstr_w(info.achName));
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
......@@ -642,7 +632,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"VMR Input0"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count);
......@@ -652,13 +642,11 @@ static void test_pin_info(void)
if (SUCCEEDED(set_mixing_mode(filter)))
{
sink_id[9] = '1';
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input1", &pin);
hr = IPin_QueryPinInfo(pin, &info);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"VMR Input1"), "Got name %s.\n", wine_dbgstr_w(info.achName));
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
......@@ -667,7 +655,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"VMR Input1"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count);
......@@ -682,7 +670,6 @@ static void test_pin_info(void)
static void test_media_types(void)
{
WCHAR sink_id[] = {'V','M','R',' ','I','n','p','u','t','0',0};
IBaseFilter *filter = create_vmr9(0);
AM_MEDIA_TYPE *mt, req_mt = {{0}};
VIDEOINFOHEADER vih =
......@@ -703,7 +690,7 @@ static void test_media_types(void)
&MEDIASUBTYPE_RGB32,
};
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -753,7 +740,6 @@ static void test_media_types(void)
static void test_enum_media_types(void)
{
WCHAR sink_id[] = {'V','M','R',' ','I','n','p','u','t','0',0};
IBaseFilter *filter = create_vmr9(0);
IEnumMediaTypes *enum1, *enum2;
AM_MEDIA_TYPE *mts[2];
......@@ -761,7 +747,7 @@ static void test_enum_media_types(void)
HRESULT hr;
IPin *pin;
IBaseFilter_FindPin(filter, sink_id, &pin);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......
......@@ -22,9 +22,6 @@
#include "dshow.h"
#include "wine/test.h"
static const WCHAR sink_name[] = {'i','n','p','u','t',' ','p','i','n',0};
static const WCHAR source_name[] = {'o','u','t','p','u','t',0};
static IBaseFilter *create_wave_parser(void)
{
IBaseFilter *filter = NULL;
......@@ -34,8 +31,6 @@ static IBaseFilter *create_wave_parser(void)
return filter;
}
static const WCHAR wavefile[] = {'t','e','s','t','.','w','a','v',0};
static WCHAR *load_resource(const WCHAR *name)
{
static WCHAR pathW[MAX_PATH];
......@@ -45,7 +40,7 @@ static WCHAR *load_resource(const WCHAR *name)
void *ptr;
GetTempPathW(ARRAY_SIZE(pathW), pathW);
lstrcatW(pathW, name);
wcscat(pathW, name);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n",
......@@ -70,7 +65,6 @@ static ULONG get_refcount(void *iface)
static IFilterGraph2 *connect_input(IBaseFilter *splitter, const WCHAR *filename)
{
static const WCHAR outputW[] = {'O','u','t','p','u','t',0};
IFileSourceFilter *filesource;
IFilterGraph2 *graph;
IBaseFilter *reader;
......@@ -87,8 +81,8 @@ static IFilterGraph2 *connect_input(IBaseFilter *splitter, const WCHAR *filename
IFilterGraph2_AddFilter(graph, reader, NULL);
IFilterGraph2_AddFilter(graph, splitter, NULL);
IBaseFilter_FindPin(splitter, sink_name, &sink);
IBaseFilter_FindPin(reader, outputW, &source);
IBaseFilter_FindPin(splitter, L"input pin", &sink);
IBaseFilter_FindPin(reader, L"Output", &source);
hr = IFilterGraph2_ConnectDirect(graph, source, sink, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -117,7 +111,7 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO
static void test_interfaces(void)
{
const WCHAR *filename = load_resource(wavefile);
const WCHAR *filename = load_resource(L"test.wav");
IBaseFilter *filter = create_wave_parser();
IFilterGraph2 *graph = connect_input(filter, filename);
IPin *pin;
......@@ -140,7 +134,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IReferenceClock, FALSE);
check_interface(filter, &IID_IVideoWindow, FALSE);
IBaseFilter_FindPin(filter, sink_name, &pin);
IBaseFilter_FindPin(filter, L"input pin", &pin);
check_interface(pin, &IID_IPin, TRUE);
check_interface(pin, &IID_IUnknown, TRUE);
......@@ -152,7 +146,7 @@ static void test_interfaces(void)
IPin_Release(pin);
IBaseFilter_FindPin(filter, source_name, &pin);
IBaseFilter_FindPin(filter, L"output", &pin);
todo_wine check_interface(pin, &IID_IMediaPosition, TRUE);
check_interface(pin, &IID_IMediaSeeking, TRUE);
......@@ -266,7 +260,7 @@ static void test_aggregation(void)
static void test_enum_pins(void)
{
const WCHAR *filename = load_resource(wavefile);
const WCHAR *filename = load_resource(L"test.wav");
IBaseFilter *filter = create_wave_parser();
IEnumPins *enum1, *enum2;
IFilterGraph2 *graph;
......@@ -401,7 +395,7 @@ todo_wine
static void test_find_pin(void)
{
const WCHAR *filename = load_resource(wavefile);
const WCHAR *filename = load_resource(L"test.wav");
IBaseFilter *filter = create_wave_parser();
IFilterGraph2 *graph;
IEnumPins *enum_pins;
......@@ -410,11 +404,11 @@ static void test_find_pin(void)
ULONG ref;
BOOL ret;
hr = IBaseFilter_FindPin(filter, sink_name, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, source_name, &pin);
hr = IBaseFilter_FindPin(filter, L"output", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
graph = connect_input(filter, filename);
......@@ -425,7 +419,7 @@ static void test_find_pin(void)
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, source_name, &pin);
hr = IBaseFilter_FindPin(filter, L"output", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine
ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin);
......@@ -435,7 +429,7 @@ todo_wine
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_FindPin(filter, sink_name, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine
ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin);
......@@ -452,7 +446,7 @@ todo_wine
static void test_pin_info(void)
{
const WCHAR *filename = load_resource(wavefile);
const WCHAR *filename = load_resource(L"test.wav");
IBaseFilter *filter = create_wave_parser();
ULONG ref, expect_ref;
IFilterGraph2 *graph;
......@@ -465,7 +459,7 @@ static void test_pin_info(void)
graph = connect_input(filter, filename);
hr = IBaseFilter_FindPin(filter, sink_name, &pin);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
expect_ref = get_refcount(filter);
ref = get_refcount(pin);
......@@ -475,7 +469,7 @@ static void test_pin_info(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, sink_name), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"input pin"), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
ok(ref == expect_ref + 1, "Got unexpected refcount %d.\n", ref);
ref = get_refcount(pin);
......@@ -488,12 +482,12 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, sink_name), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"input pin"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, source_name, &pin);
hr = IBaseFilter_FindPin(filter, L"output", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
check_interface(pin, &IID_IPin, TRUE);
......@@ -503,7 +497,7 @@ static void test_pin_info(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, source_name), "Got name %s.\n", wine_dbgstr_w(info.achName));
ok(!wcscmp(info.achName, L"output"), "Got name %s.\n", wine_dbgstr_w(info.achName));
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
......@@ -512,7 +506,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!lstrcmpW(id, source_name), "Got id %s.\n", wine_dbgstr_w(id));
ok(!wcscmp(id, L"output"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
IPin_Release(pin);
......@@ -528,7 +522,7 @@ static void test_media_types(void)
{
static const WAVEFORMATEX expect_wfx = {WAVE_FORMAT_PCM, 1, 44100, 44100, 1, 8, 0};
const WCHAR *filename = load_resource(wavefile);
const WCHAR *filename = load_resource(L"test.wav");
IBaseFilter *filter = create_wave_parser();
AM_MEDIA_TYPE mt = {{0}}, *pmt;
IEnumMediaTypes *enummt;
......@@ -538,7 +532,7 @@ static void test_media_types(void)
IPin *pin;
BOOL ret;
IBaseFilter_FindPin(filter, sink_name, &pin);
IBaseFilter_FindPin(filter, L"input pin", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -581,7 +575,7 @@ static void test_media_types(void)
IEnumMediaTypes_Release(enummt);
IPin_Release(pin);
IBaseFilter_FindPin(filter, source_name, &pin);
IBaseFilter_FindPin(filter, L"output", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -645,7 +639,7 @@ static void test_media_types(void)
static void test_enum_media_types(void)
{
const WCHAR *filename = load_resource(wavefile);
const WCHAR *filename = load_resource(L"test.wav");
IBaseFilter *filter = create_wave_parser();
IFilterGraph2 *graph = connect_input(filter, filename);
IEnumMediaTypes *enum1, *enum2;
......@@ -655,7 +649,7 @@ static void test_enum_media_types(void)
IPin *pin;
BOOL ret;
IBaseFilter_FindPin(filter, sink_name, &pin);
IBaseFilter_FindPin(filter, L"input pin", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......@@ -686,7 +680,7 @@ static void test_enum_media_types(void)
IEnumMediaTypes_Release(enum2);
IPin_Release(pin);
IBaseFilter_FindPin(filter, source_name, &pin);
IBaseFilter_FindPin(filter, L"output", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......
......@@ -707,7 +707,6 @@ static const IOverlayVtbl overlay_vtbl =
HRESULT VideoRenderer_create(IUnknown *outer, void **out)
{
static const WCHAR sink_name[] = {'I','n',0};
HRESULT hr;
VideoRendererImpl * pVideoRenderer;
......@@ -724,7 +723,7 @@ HRESULT VideoRenderer_create(IUnknown *outer, void **out)
pVideoRenderer->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = strmbase_renderer_init(&pVideoRenderer->renderer, outer,
&CLSID_VideoRenderer, sink_name, &renderer_ops);
&CLSID_VideoRenderer, L"In", &renderer_ops);
if (FAILED(hr))
goto fail;
......
......@@ -2202,8 +2202,6 @@ static const IOverlayVtbl overlay_vtbl =
static HRESULT vmr_create(IUnknown *outer, void **out, const CLSID *clsid)
{
static const WCHAR sink_name[] = {'V','M','R',' ','I','n','p','u','t','0',0};
HRESULT hr;
struct quartz_vmr* pVMR;
......@@ -2239,7 +2237,7 @@ static HRESULT vmr_create(IUnknown *outer, void **out, const CLSID *clsid)
pVMR->IVMRWindowlessControl9_iface.lpVtbl = &VMR9_WindowlessControl_Vtbl;
pVMR->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = strmbase_renderer_init(&pVMR->renderer, outer, clsid, sink_name, &renderer_ops);
hr = strmbase_renderer_init(&pVMR->renderer, outer, clsid, L"VMR Input0", &renderer_ops);
if (FAILED(hr))
goto fail;
......
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