strmbase: Add a separate id for pins.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f38369416f
commit
aa9aa7390f
|
@ -36,6 +36,7 @@ struct strmbase_pin
|
||||||
struct strmbase_filter *filter;
|
struct strmbase_filter *filter;
|
||||||
PIN_DIRECTION dir;
|
PIN_DIRECTION dir;
|
||||||
WCHAR name[128];
|
WCHAR name[128];
|
||||||
|
WCHAR id[128];
|
||||||
IPin *peer;
|
IPin *peer;
|
||||||
AM_MEDIA_TYPE mt;
|
AM_MEDIA_TYPE mt;
|
||||||
|
|
||||||
|
|
|
@ -436,7 +436,7 @@ static HRESULT WINAPI filter_FindPin(IBaseFilter *iface, const WCHAR *id, IPin *
|
||||||
|
|
||||||
for (i = 0; (pin = filter->ops->filter_get_pin(filter, i)); ++i)
|
for (i = 0; (pin = filter->ops->filter_get_pin(filter, i)); ++i)
|
||||||
{
|
{
|
||||||
if (!lstrcmpW(id, pin->name))
|
if (!lstrcmpW(id, pin->id))
|
||||||
{
|
{
|
||||||
IPin_AddRef(*ret = &pin->IPin_iface);
|
IPin_AddRef(*ret = &pin->IPin_iface);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
|
@ -383,10 +383,10 @@ static HRESULT WINAPI pin_QueryId(IPin *iface, WCHAR **id)
|
||||||
|
|
||||||
TRACE("pin %p %s:%s, id %p.\n", pin, debugstr_w(pin->filter->name), debugstr_w(pin->name), id);
|
TRACE("pin %p %s:%s, id %p.\n", pin, debugstr_w(pin->filter->name), debugstr_w(pin->name), id);
|
||||||
|
|
||||||
if (!(*id = CoTaskMemAlloc((lstrlenW(pin->name) + 1) * sizeof(WCHAR))))
|
if (!(*id = CoTaskMemAlloc((lstrlenW(pin->id) + 1) * sizeof(WCHAR))))
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
lstrcpyW(*id, pin->name);
|
lstrcpyW(*id, pin->id);
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -770,6 +770,7 @@ void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *f
|
||||||
pin->pin.filter = filter;
|
pin->pin.filter = filter;
|
||||||
pin->pin.dir = PINDIR_OUTPUT;
|
pin->pin.dir = PINDIR_OUTPUT;
|
||||||
lstrcpyW(pin->pin.name, name);
|
lstrcpyW(pin->pin.name, name);
|
||||||
|
lstrcpyW(pin->pin.id, name);
|
||||||
pin->pin.ops = &func_table->base;
|
pin->pin.ops = &func_table->base;
|
||||||
pin->pFuncsTable = func_table;
|
pin->pFuncsTable = func_table;
|
||||||
}
|
}
|
||||||
|
@ -1172,6 +1173,7 @@ void strmbase_sink_init(struct strmbase_sink *pin, struct strmbase_filter *filte
|
||||||
pin->pin.filter = filter;
|
pin->pin.filter = filter;
|
||||||
pin->pin.dir = PINDIR_INPUT;
|
pin->pin.dir = PINDIR_INPUT;
|
||||||
lstrcpyW(pin->pin.name, name);
|
lstrcpyW(pin->pin.name, name);
|
||||||
|
lstrcpyW(pin->pin.id, name);
|
||||||
pin->pin.ops = &func_table->base;
|
pin->pin.ops = &func_table->base;
|
||||||
pin->pFuncsTable = func_table;
|
pin->pFuncsTable = func_table;
|
||||||
pin->pAllocator = pin->preferred_allocator = allocator;
|
pin->pAllocator = pin->preferred_allocator = allocator;
|
||||||
|
|
Loading…
Reference in New Issue