quartz: Use wide character string literals.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c947dab09d
commit
7770e0bbaf
|
@ -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);
|
||||
|
|
|
@ -41,11 +41,6 @@ typedef struct TestFilterImpl
|
|||
UINT nPins;
|
||||
} TestFilterImpl;
|
||||
|
||||
static const WCHAR avifile[] = {'t','e','s','t','.','a','v','i',0};
|
||||
static const WCHAR mpegfile[] = {'t','e','s','t','.','m','p','g',0};
|
||||
static const WCHAR mp3file[] = {'t','e','s','t','.','m','p','3',0};
|
||||
static const WCHAR wavefile[] = {'t','e','s','t','.','w','a','v',0};
|
||||
|
||||
static WCHAR *create_file(const WCHAR *name, const char *data, DWORD size)
|
||||
{
|
||||
static WCHAR pathW[MAX_PATH];
|
||||
|
@ -53,7 +48,7 @@ static WCHAR *create_file(const WCHAR *name, const char *data, DWORD size)
|
|||
HANDLE file;
|
||||
|
||||
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",
|
||||
wine_dbgstr_w(pathW), GetLastError());
|
||||
|
@ -556,7 +551,6 @@ static void rungraph(IFilterGraph2 *graph, BOOL video)
|
|||
|
||||
static HRESULT test_graph_builder_connect_file(WCHAR *filename, BOOL audio, BOOL video)
|
||||
{
|
||||
static const WCHAR outputW[] = {'O','u','t','p','u','t',0};
|
||||
IBaseFilter *source_filter, *renderer;
|
||||
IPin *pin_in, *pin_out;
|
||||
IFilterGraph2 *graph;
|
||||
|
@ -585,7 +579,7 @@ static HRESULT test_graph_builder_connect_file(WCHAR *filename, BOOL audio, BOOL
|
|||
hr = IFilterGraph2_AddFilter(graph, renderer, NULL);
|
||||
ok(hr == S_OK, "AddFilter failed: %#x\n", hr);
|
||||
|
||||
hr = IBaseFilter_FindPin(source_filter, outputW, &pin_out);
|
||||
hr = IBaseFilter_FindPin(source_filter, L"Output", &pin_out);
|
||||
ok(hr == S_OK, "FindPin failed: %#x\n", hr);
|
||||
hr = IFilterGraph2_Connect(graph, pin_out, pin_in);
|
||||
|
||||
|
@ -755,7 +749,7 @@ static void test_enum_filters(void)
|
|||
|
||||
static DWORD WINAPI call_RenderFile_multithread(LPVOID lParam)
|
||||
{
|
||||
WCHAR *filename = load_resource(avifile);
|
||||
WCHAR *filename = load_resource(L"test.avi");
|
||||
IFilterGraph2 *graph = lParam;
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -956,7 +950,7 @@ static HRESULT WINAPI testpin_QueryPinInfo(IPin *iface, PIN_INFO *info)
|
|||
info->pFilter = pin->filter;
|
||||
IBaseFilter_AddRef(pin->filter);
|
||||
info->dir = pin->dir;
|
||||
lstrcpyW(info->achName, pin->name);
|
||||
wcscpy(info->achName, pin->name);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -975,7 +969,7 @@ static HRESULT WINAPI testpin_QueryId(IPin *iface, WCHAR **id)
|
|||
struct testpin *pin = impl_from_IPin(iface);
|
||||
if (winetest_debug > 1) trace("%p->QueryId()\n", iface);
|
||||
*id = CoTaskMemAlloc(11);
|
||||
lstrcpyW(*id, pin->id);
|
||||
wcscpy(*id, pin->id);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -1432,7 +1426,7 @@ static HRESULT WINAPI testfilter_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO
|
|||
if (filter->graph)
|
||||
IFilterGraph_AddRef(filter->graph);
|
||||
if (filter->name)
|
||||
lstrcpyW(info->achName, filter->name);
|
||||
wcscpy(info->achName, filter->name);
|
||||
else
|
||||
info->achName[0] = 0;
|
||||
return S_OK;
|
||||
|
@ -1447,8 +1441,8 @@ static HRESULT WINAPI testfilter_JoinFilterGraph(IBaseFilter *iface, IFilterGrap
|
|||
heap_free(filter->name);
|
||||
if (name)
|
||||
{
|
||||
filter->name = heap_alloc((lstrlenW(name)+1)*sizeof(WCHAR));
|
||||
lstrcpyW(filter->name, name);
|
||||
filter->name = heap_alloc((wcslen(name) + 1) * sizeof(WCHAR));
|
||||
wcscpy(filter->name, name);
|
||||
}
|
||||
else
|
||||
filter->name = NULL;
|
||||
|
@ -1868,7 +1862,6 @@ static IClassFactoryVtbl testfilter_cf_vtbl =
|
|||
|
||||
static void test_graph_builder_render(void)
|
||||
{
|
||||
static const WCHAR testW[] = {'t','e','s','t',0};
|
||||
static const GUID sink1_clsid = {0x12345678};
|
||||
static const GUID sink2_clsid = {0x87654321};
|
||||
AM_MEDIA_TYPE source_type = {{0}};
|
||||
|
@ -1989,7 +1982,7 @@ static void test_graph_builder_render(void)
|
|||
regpins.lpMediaType = ®types;
|
||||
regtypes.clsMajorType = &source_type.majortype;
|
||||
regtypes.clsMinorType = &MEDIASUBTYPE_NULL;
|
||||
hr = IFilterMapper2_RegisterFilter(mapper, &sink1_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
hr = IFilterMapper2_RegisterFilter(mapper, &sink1_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
if (hr == E_ACCESSDENIED)
|
||||
{
|
||||
skip("Not enough permission to register filters.\n");
|
||||
|
@ -1998,7 +1991,7 @@ static void test_graph_builder_render(void)
|
|||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
regpins.dwFlags = REG_PINFLAG_B_RENDERER;
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink2_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink2_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
|
||||
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
@ -2029,9 +2022,9 @@ static void test_graph_builder_render(void)
|
|||
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &sink1_clsid);
|
||||
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &sink2_clsid);
|
||||
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink1_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink1_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
regpins.dwFlags = 0;
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink2_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink2_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
|
||||
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
@ -2050,9 +2043,9 @@ static void test_graph_builder_render(void)
|
|||
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &sink2_clsid);
|
||||
|
||||
regfilter.dwMerit = MERIT_UNLIKELY;
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink1_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink1_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
regfilter.dwMerit = MERIT_PREFERRED;
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink2_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink2_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
|
||||
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
@ -2068,9 +2061,9 @@ static void test_graph_builder_render(void)
|
|||
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &sink2_clsid);
|
||||
|
||||
regfilter.dwMerit = MERIT_PREFERRED;
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink1_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink1_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
regfilter.dwMerit = MERIT_UNLIKELY;
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink2_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &sink2_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
|
||||
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
@ -2098,7 +2091,6 @@ out:
|
|||
|
||||
static void test_graph_builder_connect(void)
|
||||
{
|
||||
static const WCHAR testW[] = {'t','e','s','t',0};
|
||||
static const GUID parser1_clsid = {0x12345678};
|
||||
static const GUID parser2_clsid = {0x87654321};
|
||||
AM_MEDIA_TYPE source_type = {{0}}, sink_type = {{0}}, parser3_type = {{0}};
|
||||
|
@ -2355,7 +2347,7 @@ todo_wine
|
|||
regpins[1].lpMediaType = ®types;
|
||||
regtypes.clsMajorType = &source_type.majortype;
|
||||
regtypes.clsMinorType = &MEDIASUBTYPE_NULL;
|
||||
hr = IFilterMapper2_RegisterFilter(mapper, &parser1_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
hr = IFilterMapper2_RegisterFilter(mapper, &parser1_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
if (hr == E_ACCESSDENIED)
|
||||
{
|
||||
skip("Not enough permission to register filters.\n");
|
||||
|
@ -2363,7 +2355,7 @@ todo_wine
|
|||
}
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
IFilterMapper2_RegisterFilter(mapper, &parser2_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &parser2_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
|
||||
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
@ -2400,9 +2392,9 @@ todo_wine
|
|||
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &parser2_clsid);
|
||||
|
||||
regfilter.dwMerit = MERIT_UNLIKELY;
|
||||
IFilterMapper2_RegisterFilter(mapper, &parser1_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &parser1_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
regfilter.dwMerit = MERIT_PREFERRED;
|
||||
IFilterMapper2_RegisterFilter(mapper, &parser2_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &parser2_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
|
||||
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
@ -2420,9 +2412,9 @@ todo_wine
|
|||
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &parser2_clsid);
|
||||
|
||||
regfilter.dwMerit = MERIT_PREFERRED;
|
||||
IFilterMapper2_RegisterFilter(mapper, &parser1_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &parser1_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
regfilter.dwMerit = MERIT_UNLIKELY;
|
||||
IFilterMapper2_RegisterFilter(mapper, &parser2_clsid, testW, NULL, NULL, NULL, ®filter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &parser2_clsid, L"test", NULL, NULL, NULL, ®filter);
|
||||
|
||||
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
@ -2684,8 +2676,6 @@ static void test_control_delegation(void)
|
|||
|
||||
static void test_add_remove_filter(void)
|
||||
{
|
||||
static const WCHAR defaultid[] = {'0','0','0','1',0};
|
||||
static const WCHAR testid[] = {'t','e','s','t','i','d',0};
|
||||
struct testfilter filter;
|
||||
|
||||
IFilterGraph2 *graph = create_graph();
|
||||
|
@ -2694,16 +2684,16 @@ static void test_add_remove_filter(void)
|
|||
|
||||
testfilter_init(&filter, NULL, 0);
|
||||
|
||||
hr = IFilterGraph2_FindFilterByName(graph, testid, &ret_filter);
|
||||
hr = IFilterGraph2_FindFilterByName(graph, L"testid", &ret_filter);
|
||||
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
|
||||
ok(!ret_filter, "Got filter %p.\n", ret_filter);
|
||||
|
||||
hr = IFilterGraph2_AddFilter(graph, &filter.IBaseFilter_iface, testid);
|
||||
hr = IFilterGraph2_AddFilter(graph, &filter.IBaseFilter_iface, L"testid");
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(filter.graph == (IFilterGraph *)graph, "Got graph %p.\n", filter.graph);
|
||||
ok(!lstrcmpW(filter.name, testid), "Got name %s.\n", wine_dbgstr_w(filter.name));
|
||||
ok(!wcscmp(filter.name, L"testid"), "Got name %s.\n", wine_dbgstr_w(filter.name));
|
||||
|
||||
hr = IFilterGraph2_FindFilterByName(graph, testid, &ret_filter);
|
||||
hr = IFilterGraph2_FindFilterByName(graph, L"testid", &ret_filter);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(ret_filter == &filter.IBaseFilter_iface, "Got filter %p.\n", ret_filter);
|
||||
IBaseFilter_Release(ret_filter);
|
||||
|
@ -2715,16 +2705,16 @@ static void test_add_remove_filter(void)
|
|||
ok(!filter.clock, "Got clock %p,\n", filter.clock);
|
||||
ok(filter.ref == 1, "Got outstanding refcount %d.\n", filter.ref);
|
||||
|
||||
hr = IFilterGraph2_FindFilterByName(graph, testid, &ret_filter);
|
||||
hr = IFilterGraph2_FindFilterByName(graph, L"testid", &ret_filter);
|
||||
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
|
||||
ok(!ret_filter, "Got filter %p.\n", ret_filter);
|
||||
|
||||
hr = IFilterGraph2_AddFilter(graph, &filter.IBaseFilter_iface, NULL);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(filter.graph == (IFilterGraph *)graph, "Got graph %p.\n", filter.graph);
|
||||
ok(!lstrcmpW(filter.name, defaultid), "Got name %s.\n", wine_dbgstr_w(filter.name));
|
||||
ok(!wcscmp(filter.name, L"0001"), "Got name %s.\n", wine_dbgstr_w(filter.name));
|
||||
|
||||
hr = IFilterGraph2_FindFilterByName(graph, defaultid, &ret_filter);
|
||||
hr = IFilterGraph2_FindFilterByName(graph, L"0001", &ret_filter);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(ret_filter == &filter.IBaseFilter_iface, "Got filter %p.\n", ret_filter);
|
||||
IBaseFilter_Release(ret_filter);
|
||||
|
@ -4068,7 +4058,6 @@ static void test_add_source_filter(void)
|
|||
{
|
||||
static const char bogus_data[20] = {0xde, 0xad, 0xbe, 0xef};
|
||||
static const char midi_data[20] = {'M','T','h','d'};
|
||||
static const WCHAR testW[] = {'t','e','s','t',0};
|
||||
|
||||
IFilterGraph2 *graph = create_graph();
|
||||
IFileSourceFilter *filesource;
|
||||
|
@ -4085,8 +4074,8 @@ static void test_add_source_filter(void)
|
|||
|
||||
/* Test a file which should be registered by extension. */
|
||||
|
||||
filename = create_file(mp3file, midi_data, sizeof(midi_data));
|
||||
hr = IFilterGraph2_AddSourceFilter(graph, filename, testW, &filter);
|
||||
filename = create_file(L"test.mp3", midi_data, sizeof(midi_data));
|
||||
hr = IFilterGraph2_AddSourceFilter(graph, filename, L"test", &filter);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IBaseFilter_GetClassID(filter, &clsid);
|
||||
|
@ -4094,7 +4083,7 @@ static void test_add_source_filter(void)
|
|||
ok(IsEqualGUID(&clsid, &CLSID_AsyncReader), "Got filter %s.\n", wine_dbgstr_guid(&clsid));
|
||||
hr = IBaseFilter_QueryFilterInfo(filter, &filter_info);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(!wcscmp(filter_info.achName, testW), "Got unexpected name %s.\n", wine_dbgstr_w(filter_info.achName));
|
||||
ok(!wcscmp(filter_info.achName, L"test"), "Got unexpected name %s.\n", wine_dbgstr_w(filter_info.achName));
|
||||
IFilterGraph_Release(filter_info.pGraph);
|
||||
|
||||
hr = IBaseFilter_QueryInterface(filter, &IID_IFileSourceFilter, (void **)&filesource);
|
||||
|
@ -4107,7 +4096,7 @@ static void test_add_source_filter(void)
|
|||
ok(IsEqualGUID(&mt.subtype, &MEDIASUBTYPE_MPEG1Audio), "Got subtype %s.\n", wine_dbgstr_guid(&mt.subtype));
|
||||
IFileSourceFilter_Release(filesource);
|
||||
|
||||
hr = IFilterGraph2_AddSourceFilter(graph, filename, testW, &filter2);
|
||||
hr = IFilterGraph2_AddSourceFilter(graph, filename, L"test", &filter2);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(filter2 != filter, "Filters shouldn't match.\n");
|
||||
hr = IFilterGraph2_RemoveFilter(graph, filter2);
|
||||
|
@ -4124,7 +4113,7 @@ static void test_add_source_filter(void)
|
|||
|
||||
/* Test a file which should be registered by signature. */
|
||||
|
||||
filename = create_file(avifile, midi_data, sizeof(midi_data));
|
||||
filename = create_file(L"test.avi", midi_data, sizeof(midi_data));
|
||||
hr = IFilterGraph2_AddSourceFilter(graph, filename, NULL, &filter);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
|
@ -4171,7 +4160,7 @@ static void test_add_source_filter(void)
|
|||
RegSetValueExA(key, "0", 0, REG_SZ, (const BYTE *)"0,4,,deadbeef", 14);
|
||||
RegSetValueExA(key, "Source Filter", 0, REG_SZ, (const BYTE *)"{12345678-0000-0000-0000-000000000000}", 39);
|
||||
|
||||
filename = create_file(avifile, bogus_data, sizeof(bogus_data));
|
||||
filename = create_file(L"test.avi", bogus_data, sizeof(bogus_data));
|
||||
hr = IFilterGraph2_AddSourceFilter(graph, filename, NULL, &filter);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(filter == &testfilter.IBaseFilter_iface, "Got unexpected filter %p.\n", filter);
|
||||
|
@ -4247,7 +4236,7 @@ static void test_window_threading(void)
|
|||
.lpfnWndProc = parent_proc,
|
||||
.lpszClassName = "quartz_test_parent",
|
||||
};
|
||||
WCHAR *filename = load_resource(avifile);
|
||||
WCHAR *filename = load_resource(L"test.avi");
|
||||
IFilterGraph2 *graph = create_graph();
|
||||
IVideoWindow *window;
|
||||
HWND hwnd, parent;
|
||||
|
@ -4327,10 +4316,10 @@ START_TEST(filtergraph)
|
|||
CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
|
||||
test_interfaces();
|
||||
test_render_run(avifile, FALSE, TRUE);
|
||||
test_render_run(mpegfile, TRUE, TRUE);
|
||||
test_render_run(mp3file, TRUE, FALSE);
|
||||
test_render_run(wavefile, TRUE, FALSE);
|
||||
test_render_run(L"test.avi", FALSE, TRUE);
|
||||
test_render_run(L"test.mpg", TRUE, TRUE);
|
||||
test_render_run(L"test.mp3", TRUE, FALSE);
|
||||
test_render_run(L"test.wav", TRUE, FALSE);
|
||||
test_enum_filters();
|
||||
test_graph_builder_render();
|
||||
test_graph_builder_connect();
|
||||
|
|
|
@ -41,7 +41,6 @@ static BOOL enum_find_filter(const WCHAR *wszFilterName, IEnumMoniker *pEnum)
|
|||
BOOL found = FALSE;
|
||||
ULONG nb;
|
||||
HRESULT hr;
|
||||
static const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};
|
||||
|
||||
while(!found && IEnumMoniker_Next(pEnum, 1, &pMoniker, &nb) == S_OK)
|
||||
{
|
||||
|
@ -53,10 +52,10 @@ static BOOL enum_find_filter(const WCHAR *wszFilterName, IEnumMoniker *pEnum)
|
|||
hr = IMoniker_BindToStorage(pMoniker, NULL, NULL, &IID_IPropertyBag, (LPVOID*)&pPropBagCat);
|
||||
ok(SUCCEEDED(hr), "IMoniker_BindToStorage failed with %x\n", hr);
|
||||
|
||||
hr = IPropertyBag_Read(pPropBagCat, wszFriendlyName, &var, NULL);
|
||||
hr = IPropertyBag_Read(pPropBagCat, L"FriendlyName", &var, NULL);
|
||||
ok(SUCCEEDED(hr), "IPropertyBag_Read failed with %x\n", hr);
|
||||
|
||||
if (!lstrcmpW(V_BSTR(&var), wszFilterName))
|
||||
if (!wcscmp(V_BSTR(&var), wszFilterName))
|
||||
found = TRUE;
|
||||
|
||||
IPropertyBag_Release(pPropBagCat);
|
||||
|
@ -76,8 +75,6 @@ static void test_fm2_enummatchingfilters(void)
|
|||
REGFILTER2 rgf2;
|
||||
REGFILTERPINS2 rgPins2[2];
|
||||
REGPINTYPES rgPinType;
|
||||
static const WCHAR wszFilterName1[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', '1', 0 };
|
||||
static const WCHAR wszFilterName2[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', '2', 0 };
|
||||
CLSID clsidFilter1;
|
||||
CLSID clsidFilter2;
|
||||
IEnumMoniker *pEnum = NULL;
|
||||
|
@ -114,7 +111,7 @@ static void test_fm2_enummatchingfilters(void)
|
|||
rgPinType.clsMajorType = &GUID_NULL;
|
||||
rgPinType.clsMinorType = &GUID_NULL;
|
||||
|
||||
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter1, wszFilterName1, NULL,
|
||||
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter1, L"Testfilter1", NULL,
|
||||
&CLSID_LegacyAmFilterCategory, NULL, &rgf2);
|
||||
if (hr == E_ACCESSDENIED)
|
||||
{
|
||||
|
@ -137,7 +134,7 @@ static void test_fm2_enummatchingfilters(void)
|
|||
|
||||
S2(U(rgf2)).cPins2 = 2;
|
||||
|
||||
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter2, wszFilterName2, NULL,
|
||||
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter2, L"Testfilter2", NULL,
|
||||
&CLSID_LegacyAmFilterCategory, NULL, &rgf2);
|
||||
ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr);
|
||||
|
||||
|
@ -146,7 +143,7 @@ static void test_fm2_enummatchingfilters(void)
|
|||
ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr);
|
||||
if (SUCCEEDED(hr) && pEnum)
|
||||
{
|
||||
found = enum_find_filter(wszFilterName1, pEnum);
|
||||
found = enum_find_filter(L"Testfilter1", pEnum);
|
||||
ok(found, "EnumMatchingFilters failed to return the test filter 1\n");
|
||||
}
|
||||
|
||||
|
@ -158,7 +155,7 @@ static void test_fm2_enummatchingfilters(void)
|
|||
ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr);
|
||||
if (SUCCEEDED(hr) && pEnum)
|
||||
{
|
||||
found = enum_find_filter(wszFilterName2, pEnum);
|
||||
found = enum_find_filter(L"Testfilter2", pEnum);
|
||||
ok(found, "EnumMatchingFilters failed to return the test filter 2\n");
|
||||
}
|
||||
|
||||
|
@ -173,7 +170,7 @@ static void test_fm2_enummatchingfilters(void)
|
|||
|
||||
if (SUCCEEDED(hr) && pEnum)
|
||||
{
|
||||
found = enum_find_filter(wszFilterName1, pEnum);
|
||||
found = enum_find_filter(L"Testfilter1", pEnum);
|
||||
ok(found, "EnumMatchingFilters failed to return the test filter 1\n");
|
||||
}
|
||||
|
||||
|
@ -186,7 +183,7 @@ static void test_fm2_enummatchingfilters(void)
|
|||
ok(hr == S_OK, "IFilterMapper_EnumMatchingFilters failed: %#x\n", hr);
|
||||
while (!found && IEnumRegFilters_Next(enum_reg, 1, ®filter, &count) == S_OK)
|
||||
{
|
||||
if (!lstrcmpW(regfilter->Name, wszFilterName1) && IsEqualGUID(&clsidFilter1, ®filter->Clsid))
|
||||
if (!wcscmp(regfilter->Name, L"Testfilter1") && IsEqualGUID(&clsidFilter1, ®filter->Clsid))
|
||||
found = TRUE;
|
||||
}
|
||||
IEnumRegFilters_Release(enum_reg);
|
||||
|
@ -202,7 +199,7 @@ static void test_fm2_enummatchingfilters(void)
|
|||
|
||||
if (SUCCEEDED(hr) && pEnum)
|
||||
{
|
||||
found = enum_find_filter(wszFilterName2, pEnum);
|
||||
found = enum_find_filter(L"Testfilter2", pEnum);
|
||||
ok(!found, "EnumMatchingFilters should not return the test filter 2\n");
|
||||
}
|
||||
|
||||
|
@ -225,9 +222,6 @@ static void test_fm2_enummatchingfilters(void)
|
|||
|
||||
static void test_legacy_filter_registration(void)
|
||||
{
|
||||
static const WCHAR testfilterW[] = {'T','e','s','t','f','i','l','t','e','r',0};
|
||||
static const WCHAR clsidW[] = {'C','L','S','I','D','\\',0};
|
||||
static const WCHAR pinW[] = {'P','i','n','1',0};
|
||||
IEnumRegFilters *enum_reg;
|
||||
IEnumMoniker *enum_mon;
|
||||
IFilterMapper2 *mapper2;
|
||||
|
@ -246,8 +240,8 @@ static void test_legacy_filter_registration(void)
|
|||
* type data to. Create a bogus class key for it. */
|
||||
CoCreateGuid(&clsid);
|
||||
StringFromGUID2(&clsid, clsidstring, ARRAY_SIZE(clsidstring));
|
||||
lstrcpyW(key_name, clsidW);
|
||||
lstrcatW(key_name, clsidstring);
|
||||
wcscpy(key_name, L"CLSID\\");
|
||||
wcscat(key_name, clsidstring);
|
||||
ret = RegCreateKeyExW(HKEY_CLASSES_ROOT, key_name, 0, NULL, 0, KEY_WRITE, NULL, &hkey, NULL);
|
||||
if (ret == ERROR_ACCESS_DENIED)
|
||||
{
|
||||
|
@ -265,22 +259,22 @@ static void test_legacy_filter_registration(void)
|
|||
ok(hr == S_OK, "IFilterMapper2_QueryInterface failed with %x\n", hr);
|
||||
|
||||
/* Set default value - this is interpreted as "friendly name" later. */
|
||||
RegSetValueExW(hkey, NULL, 0, REG_SZ, (BYTE *)testfilterW, sizeof(testfilterW));
|
||||
RegSetValueExW(hkey, NULL, 0, REG_SZ, (const BYTE *)L"Testfilter", sizeof(L"Testfilter"));
|
||||
RegCloseKey(hkey);
|
||||
|
||||
hr = IFilterMapper_RegisterFilter(mapper, clsid, testfilterW, MERIT_UNLIKELY);
|
||||
hr = IFilterMapper_RegisterFilter(mapper, clsid, L"Testfilter", MERIT_UNLIKELY);
|
||||
ok(hr == S_OK, "RegisterFilter failed: %#x\n", hr);
|
||||
|
||||
hr = IFilterMapper_RegisterPin(mapper, clsid, pinW, TRUE, FALSE, FALSE, FALSE, GUID_NULL, NULL);
|
||||
hr = IFilterMapper_RegisterPin(mapper, clsid, L"Pin1", TRUE, FALSE, FALSE, FALSE, GUID_NULL, NULL);
|
||||
ok(hr == S_OK, "RegisterPin failed: %#x\n", hr);
|
||||
|
||||
hr = IFilterMapper_RegisterPinType(mapper, clsid, pinW, GUID_NULL, GUID_NULL);
|
||||
hr = IFilterMapper_RegisterPinType(mapper, clsid, L"Pin1", GUID_NULL, GUID_NULL);
|
||||
ok(hr == S_OK, "RegisterPinType failed: %#x\n", hr);
|
||||
|
||||
hr = IFilterMapper2_EnumMatchingFilters(mapper2, &enum_mon, 0, TRUE, MERIT_UNLIKELY, TRUE,
|
||||
0, NULL, NULL, &GUID_NULL, FALSE, FALSE, 0, NULL, NULL, &GUID_NULL);
|
||||
ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed: %x\n", hr);
|
||||
ok(enum_find_filter(testfilterW, enum_mon), "IFilterMapper2 didn't find filter\n");
|
||||
ok(enum_find_filter(L"Testfilter", enum_mon), "IFilterMapper2 didn't find filter\n");
|
||||
IEnumMoniker_Release(enum_mon);
|
||||
|
||||
found = FALSE;
|
||||
|
@ -289,7 +283,7 @@ static void test_legacy_filter_registration(void)
|
|||
ok(hr == S_OK, "IFilterMapper_EnumMatchingFilters failed with %x\n", hr);
|
||||
while(!found && IEnumRegFilters_Next(enum_reg, 1, ®filter, &count) == S_OK)
|
||||
{
|
||||
if (!lstrcmpW(regfilter->Name, testfilterW) && IsEqualGUID(&clsid, ®filter->Clsid))
|
||||
if (!wcscmp(regfilter->Name, L"Testfilter") && IsEqualGUID(&clsid, ®filter->Clsid))
|
||||
found = TRUE;
|
||||
}
|
||||
IEnumRegFilters_Release(enum_reg);
|
||||
|
@ -301,7 +295,7 @@ static void test_legacy_filter_registration(void)
|
|||
hr = IFilterMapper2_EnumMatchingFilters(mapper2, &enum_mon, 0, TRUE, MERIT_UNLIKELY, TRUE,
|
||||
0, NULL, NULL, &GUID_NULL, FALSE, FALSE, 0, NULL, NULL, &GUID_NULL);
|
||||
ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed: %x\n", hr);
|
||||
ok(!enum_find_filter(testfilterW, enum_mon), "IFilterMapper2 shouldn't find filter\n");
|
||||
ok(!enum_find_filter(L"Testfilter", enum_mon), "IFilterMapper2 shouldn't find filter\n");
|
||||
IEnumMoniker_Release(enum_mon);
|
||||
|
||||
found = FALSE;
|
||||
|
@ -310,7 +304,7 @@ static void test_legacy_filter_registration(void)
|
|||
ok(hr == S_OK, "IFilterMapper_EnumMatchingFilters failed with %x\n", hr);
|
||||
while(!found && IEnumRegFilters_Next(enum_reg, 1, ®filter, &count) == S_OK)
|
||||
{
|
||||
if (!lstrcmpW(regfilter->Name, testfilterW) && IsEqualGUID(&clsid, ®filter->Clsid))
|
||||
if (!wcscmp(regfilter->Name, L"Testfilter") && IsEqualGUID(&clsid, ®filter->Clsid))
|
||||
found = TRUE;
|
||||
}
|
||||
IEnumRegFilters_Release(enum_reg);
|
||||
|
@ -319,7 +313,7 @@ static void test_legacy_filter_registration(void)
|
|||
ret = RegDeleteKeyW(HKEY_CLASSES_ROOT, key_name);
|
||||
ok(!ret, "RegDeleteKeyA failed: %lu\n", ret);
|
||||
|
||||
hr = IFilterMapper_RegisterFilter(mapper, clsid, testfilterW, MERIT_UNLIKELY);
|
||||
hr = IFilterMapper_RegisterFilter(mapper, clsid, L"Testfilter", MERIT_UNLIKELY);
|
||||
ok(hr == S_OK, "RegisterFilter failed: %#x\n", hr);
|
||||
|
||||
hr = IFilterMapper_UnregisterFilter(mapper, clsid);
|
||||
|
@ -388,15 +382,13 @@ static void test_ifiltermapper_from_filtergraph(void)
|
|||
|
||||
static void test_register_filter_with_null_clsMinorType(void)
|
||||
{
|
||||
static WCHAR wszPinName[] = L"Pin";
|
||||
IFilterMapper2 *pMapper = NULL;
|
||||
HRESULT hr;
|
||||
REGFILTER2 rgf2;
|
||||
REGFILTERPINS rgPins;
|
||||
REGFILTERPINS2 rgPins2;
|
||||
REGPINTYPES rgPinType;
|
||||
static WCHAR wszPinName[] = {'P', 'i', 'n', 0 };
|
||||
static const WCHAR wszFilterName1[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', '1', 0 };
|
||||
static const WCHAR wszFilterName2[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', '2', 0 };
|
||||
CLSID clsidFilter1;
|
||||
CLSID clsidFilter2;
|
||||
|
||||
|
@ -431,7 +423,7 @@ static void test_register_filter_with_null_clsMinorType(void)
|
|||
rgPins.nMediaTypes = 1;
|
||||
rgPins.lpMediaType = &rgPinType;
|
||||
|
||||
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter1, wszFilterName1, NULL,
|
||||
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter1, L"Testfilter1", NULL,
|
||||
&CLSID_LegacyAmFilterCategory, NULL, &rgf2);
|
||||
if (hr == E_ACCESSDENIED)
|
||||
{
|
||||
|
@ -458,7 +450,7 @@ static void test_register_filter_with_null_clsMinorType(void)
|
|||
rgPins2.lpMedium = NULL;
|
||||
rgPins2.clsPinCategory = NULL;
|
||||
|
||||
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter2, wszFilterName2, NULL,
|
||||
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter2, L"Testfilter2", NULL,
|
||||
&CLSID_LegacyAmFilterCategory, NULL, &rgf2);
|
||||
ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue