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

strmbase: Rename "pConnectedTo" to "peer".

parent e1f00bfc
......@@ -470,7 +470,7 @@ static HRESULT WINAPI AviMux_Stop(IBaseFilter *iface)
return hr;
for(i=0; i<This->input_pin_no; i++) {
if(!This->in[i]->pin.pin.pConnectedTo)
if(!This->in[i]->pin.pin.peer)
continue;
hr = out_seek(This, This->in[i]->ix_off);
......@@ -515,7 +515,7 @@ static HRESULT WINAPI AviMux_Stop(IBaseFilter *iface)
return hr;
for(i=0; i<This->input_pin_no; i++) {
if(!This->in[i]->pin.pin.pConnectedTo)
if(!This->in[i]->pin.pin.peer)
continue;
rl.cb = sizeof(FOURCC) + sizeof(AVISTREAMHEADER) + sizeof(RIFFCHUNK) +
......@@ -593,10 +593,10 @@ static HRESULT WINAPI AviMux_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
IMediaSeeking *ms;
LONGLONG cur, stop;
if(!This->in[i]->pin.pin.pConnectedTo)
if(!This->in[i]->pin.pin.peer)
continue;
hr = IPin_QueryInterface(This->in[i]->pin.pin.pConnectedTo,
hr = IPin_QueryInterface(This->in[i]->pin.pin.peer,
&IID_IMediaSeeking, (void**)&ms);
if(FAILED(hr))
continue;
......@@ -632,7 +632,7 @@ static HRESULT WINAPI AviMux_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
This->stop = -1;
memset(&This->avih, 0, sizeof(This->avih));
for(i=0; i<This->input_pin_no; i++) {
if(!This->in[i]->pin.pin.pConnectedTo)
if(!This->in[i]->pin.pin.peer)
continue;
This->avih.dwStreams++;
......@@ -660,7 +660,7 @@ static HRESULT WINAPI AviMux_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
stream_id = 0;
for(i=0; i<This->input_pin_no; i++) {
if(!This->in[i]->pin.pin.pConnectedTo)
if(!This->in[i]->pin.pin.peer)
continue;
This->in[i]->ix_off = This->size;
......@@ -815,7 +815,7 @@ static HRESULT WINAPI ConfigInterleaving_put_Mode(
return E_INVALIDARG;
if(This->mode != mode) {
if(This->source.pin.pConnectedTo) {
if(This->source.pin.peer) {
HRESULT hr = IFilterGraph_Reconnect(This->filter.filterInfo.pGraph,
&This->source.pin.IPin_iface);
if(FAILED(hr))
......@@ -1267,7 +1267,7 @@ static HRESULT WINAPI AviMuxOut_Connect(IPin *iface,
return hr;
for(i=0; i<This->input_pin_no; i++) {
if(!This->in[i]->pin.pin.pConnectedTo)
if(!This->in[i]->pin.pin.peer)
continue;
hr = IFilterGraph_Reconnect(This->filter.filterInfo.pGraph, &This->in[i]->pin.pin.IPin_iface);
......
......@@ -141,7 +141,7 @@ static HRESULT sink_get_media_type(struct strmbase_pin *base,
if (iPosition)
return S_FALSE;
EnterCriticalSection(&This->filter.csFilter);
if (This->sink.pin.pConnectedTo)
if (This->sink.pin.peer)
{
CopyMediaType(amt, &This->sink.pin.mtCurrent);
hr = S_OK;
......@@ -259,7 +259,7 @@ static HRESULT WINAPI SmartTeeFilterInput_Receive(BaseInputPin *base, IMediaSamp
/* FIXME: we should ideally do each of these in a separate thread */
EnterCriticalSection(&This->filter.csFilter);
if (This->capture.pin.pConnectedTo)
if (This->capture.pin.peer)
hrCapture = copy_sample(inputSample, This->capture.pAllocator, &captureSample);
LeaveCriticalSection(&This->filter.csFilter);
if (SUCCEEDED(hrCapture))
......@@ -268,7 +268,7 @@ static HRESULT WINAPI SmartTeeFilterInput_Receive(BaseInputPin *base, IMediaSamp
IMediaSample_Release(captureSample);
EnterCriticalSection(&This->filter.csFilter);
if (This->preview.pin.pConnectedTo)
if (This->preview.pin.peer)
hrPreview = copy_sample(inputSample, This->preview.pAllocator, &previewSample);
LeaveCriticalSection(&This->filter.csFilter);
/* No timestamps on preview stream: */
......@@ -329,7 +329,7 @@ static HRESULT source_get_media_type(struct strmbase_pin *iface,
EnterCriticalSection(&filter->filter.csFilter);
if (!filter->sink.pin.pConnectedTo)
if (!filter->sink.pin.peer)
hr = VFW_E_NOT_CONNECTED;
else if (!index)
CopyMediaType(mt, &filter->sink.pin.mtCurrent);
......
......@@ -103,9 +103,9 @@ static void vfw_capture_destroy(struct strmbase_filter *iface)
qcap_driver_destroy(filter->driver_info);
}
if (filter->source.pin.pConnectedTo)
if (filter->source.pin.peer)
{
IPin_Disconnect(filter->source.pin.pConnectedTo);
IPin_Disconnect(filter->source.pin.peer);
IPin_Disconnect(&filter->source.pin.IPin_iface);
}
strmbase_source_cleanup(&filter->source);
......@@ -221,16 +221,16 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
dump_AM_MEDIA_TYPE(pmt);
if (This->source.pin.pConnectedTo)
if (This->source.pin.peer)
{
hr = IPin_QueryAccept(This->source.pin.pConnectedTo, pmt);
hr = IPin_QueryAccept(This->source.pin.peer, pmt);
TRACE("Would accept: %d\n", hr);
if (hr == S_FALSE)
return VFW_E_INVALIDMEDIATYPE;
}
hr = qcap_driver_set_format(This->driver_info, pmt);
if (SUCCEEDED(hr) && This->filter.filterInfo.pGraph && This->source.pin.pConnectedTo)
if (SUCCEEDED(hr) && This->filter.filterInfo.pGraph && This->source.pin.peer)
{
hr = IFilterGraph_Reconnect(This->filter.filterInfo.pGraph, &This->source.pin.IPin_iface);
if (SUCCEEDED(hr))
......
......@@ -436,7 +436,7 @@ static void dsound_render_start_stream(BaseRenderer *iface)
TRACE("(%p)\n", This);
if (This->renderer.sink.pin.pConnectedTo)
if (This->renderer.sink.pin.peer)
{
IDirectSoundBuffer_Play(This->dsbuffer, 0, 0, DSBPLAY_LOOPING);
}
......
......@@ -358,8 +358,8 @@ static void async_reader_destroy(struct strmbase_filter *iface)
{
unsigned int i;
if (filter->source.pin.pConnectedTo)
IPin_Disconnect(filter->source.pin.pConnectedTo);
if (filter->source.pin.peer)
IPin_Disconnect(filter->source.pin.peer);
IPin_Disconnect(&filter->source.pin.IPin_iface);
......@@ -649,7 +649,7 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(struct strmbase_sourc
/* FIXME: call queryacceptproc */
This->pin.pConnectedTo = pReceivePin;
This->pin.peer = pReceivePin;
IPin_AddRef(pReceivePin);
CopyMediaType(&This->pin.mtCurrent, pmt);
......@@ -657,8 +657,8 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(struct strmbase_sourc
if (FAILED(hr))
{
IPin_Release(This->pin.pConnectedTo);
This->pin.pConnectedTo = NULL;
IPin_Release(This->pin.peer);
This->pin.peer = NULL;
FreeMediaType(&This->pin.mtCurrent);
}
......
......@@ -419,7 +419,7 @@ static void video_renderer_start_stream(BaseRenderer *iface)
TRACE("(%p)\n", This);
if (This->renderer.sink.pin.pConnectedTo
if (This->renderer.sink.pin.peer
&& (This->renderer.filter.state == State_Stopped || !This->renderer.sink.end_of_stream))
{
if (This->renderer.filter.state == State_Stopped)
......
......@@ -377,7 +377,7 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *This, BOOL force)
HRESULT hr;
TRACE("my mode: %u, my window: %p, my last window: %p\n", This->mode, This->baseControlWindow.baseWindow.hWnd, This->hWndClippingWindow);
if (This->baseControlWindow.baseWindow.hWnd || !This->renderer.sink.pin.pConnectedTo)
if (This->baseControlWindow.baseWindow.hWnd || !This->renderer.sink.pin.peer)
return S_OK;
if (This->mode == VMR9Mode_Windowless && !This->hWndClippingWindow)
......@@ -482,7 +482,7 @@ static HRESULT WINAPI VMR9_BreakConnect(BaseRenderer *This)
if (!pVMR9->mode)
return S_FALSE;
if (This->sink.pin.pConnectedTo && pVMR9->allocator && pVMR9->presenter)
if (This->sink.pin.peer && pVMR9->allocator && pVMR9->presenter)
{
if (pVMR9->renderer.filter.state != State_Stopped)
{
......
......@@ -118,7 +118,7 @@ HRESULT WINAPI OutputQueue_ReceiveMultiple(OutputQueue *pOutputQueue, IMediaSamp
HRESULT hr = S_OK;
int i;
if (!pOutputQueue->pInputPin->pin.pConnectedTo || !pOutputQueue->pInputPin->pMemInputPin)
if (!pOutputQueue->pInputPin->pin.peer || !pOutputQueue->pInputPin->pMemInputPin)
return VFW_E_NOT_CONNECTED;
if (!pOutputQueue->hThread)
......@@ -241,7 +241,7 @@ DWORD WINAPI OutputQueueImpl_ThreadProc(OutputQueue *pOutputQueue)
HeapFree(GetProcessHeap(),0,qev);
}
if (pOutputQueue->pInputPin->pin.pConnectedTo && pOutputQueue->pInputPin->pMemInputPin)
if (pOutputQueue->pInputPin->pin.peer && pOutputQueue->pInputPin->pMemInputPin)
{
IMemInputPin_AddRef(pOutputQueue->pInputPin->pMemInputPin);
LeaveCriticalSection(&pOutputQueue->csQueue);
......
......@@ -203,10 +203,10 @@ HRESULT WINAPI BasePinImpl_Disconnect(IPin * iface)
EnterCriticalSection(&This->filter->csFilter);
{
if (This->pConnectedTo)
if (This->peer)
{
IPin_Release(This->pConnectedTo);
This->pConnectedTo = NULL;
IPin_Release(This->peer);
This->peer = NULL;
FreeMediaType(&This->mtCurrent);
ZeroMemory(&This->mtCurrent, sizeof(This->mtCurrent));
hr = S_OK;
......@@ -228,9 +228,9 @@ HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin)
EnterCriticalSection(&This->filter->csFilter);
{
if (This->pConnectedTo)
if (This->peer)
{
*ppPin = This->pConnectedTo;
*ppPin = This->peer;
IPin_AddRef(*ppPin);
hr = S_OK;
}
......@@ -254,7 +254,7 @@ HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt
EnterCriticalSection(&This->filter->csFilter);
{
if (This->pConnectedTo)
if (This->peer)
{
CopyMediaType(pmt, &This->mtCurrent);
hr = S_OK;
......@@ -467,10 +467,10 @@ HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface)
IMemInputPin_Release(This->pMemInputPin);
This->pMemInputPin = NULL;
}
if (This->pin.pConnectedTo)
if (This->pin.peer)
{
IPin_Release(This->pin.pConnectedTo);
This->pin.pConnectedTo = NULL;
IPin_Release(This->pin.peer);
This->pin.peer = NULL;
FreeMediaType(&This->pin.mtCurrent);
ZeroMemory(&This->pin.mtCurrent, sizeof(This->pin.mtCurrent));
hr = S_OK;
......@@ -517,7 +517,7 @@ HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(struct strmbase_source *This,
TRACE("(%p)->(%p, %p, %p, %x)\n", This, ppSample, tStart, tStop, dwFlags);
if (!This->pin.pConnectedTo)
if (!This->pin.peer)
hr = VFW_E_NOT_CONNECTED;
else
{
......@@ -539,7 +539,7 @@ HRESULT WINAPI BaseOutputPinImpl_Deliver(struct strmbase_source *This, IMediaSam
EnterCriticalSection(&This->pin.filter->csFilter);
{
if (!This->pin.pConnectedTo || !This->pMemInputPin)
if (!This->pin.peer || !This->pMemInputPin)
hr = VFW_E_NOT_CONNECTED;
else
{
......@@ -548,7 +548,7 @@ HRESULT WINAPI BaseOutputPinImpl_Deliver(struct strmbase_source *This, IMediaSam
* using it. Same with its filter. */
pMemConnected = This->pMemInputPin;
IMemInputPin_AddRef(pMemConnected);
hr = IPin_QueryPinInfo(This->pin.pConnectedTo, &pinInfo);
hr = IPin_QueryPinInfo(This->pin.peer, &pinInfo);
}
}
LeaveCriticalSection(&This->pin.filter->csFilter);
......@@ -579,7 +579,7 @@ HRESULT WINAPI BaseOutputPinImpl_Active(struct strmbase_source *This)
EnterCriticalSection(&This->pin.filter->csFilter);
{
if (!This->pin.pConnectedTo || !This->pMemInputPin)
if (!This->pin.peer || !This->pMemInputPin)
hr = VFW_E_NOT_CONNECTED;
else
hr = IMemAllocator_Commit(This->pAllocator);
......@@ -599,7 +599,7 @@ HRESULT WINAPI BaseOutputPinImpl_Inactive(struct strmbase_source *This)
EnterCriticalSection(&This->pin.filter->csFilter);
{
if (!This->pin.pConnectedTo || !This->pMemInputPin)
if (!This->pin.peer || !This->pMemInputPin)
hr = VFW_E_NOT_CONNECTED;
else
hr = IMemAllocator_Decommit(This->pAllocator);
......@@ -657,7 +657,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *This,
if ((hr = This->pFuncsTable->base.pin_query_accept(&This->pin, pmt)) != S_OK)
return hr;
This->pin.pConnectedTo = pReceivePin;
This->pin.peer = pReceivePin;
IPin_AddRef(pReceivePin);
CopyMediaType(&This->pin.mtCurrent, pmt);
......@@ -692,8 +692,8 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *This,
if (FAILED(hr))
{
IPin_Release(This->pin.pConnectedTo);
This->pin.pConnectedTo = NULL;
IPin_Release(This->pin.peer);
This->pin.peer = NULL;
FreeMediaType(&This->pin.mtCurrent);
}
......@@ -747,7 +747,7 @@ HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceiveP
EnterCriticalSection(&This->pin.filter->csFilter);
{
if (This->pin.pConnectedTo)
if (This->pin.peer)
hr = VFW_E_ALREADY_CONNECTED;
if (SUCCEEDED(hr) && This->pin.pFuncsTable->pin_query_accept(&This->pin, pmt) != S_OK)
......@@ -768,7 +768,7 @@ HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceiveP
if (SUCCEEDED(hr))
{
CopyMediaType(&This->pin.mtCurrent, pmt);
This->pin.pConnectedTo = pReceivePin;
This->pin.peer = pReceivePin;
IPin_AddRef(pReceivePin);
}
}
......
......@@ -282,8 +282,8 @@ HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, const IBaseFilterVtb
void strmbase_renderer_cleanup(BaseRenderer *filter)
{
if (filter->sink.pin.pConnectedTo)
IPin_Disconnect(filter->sink.pin.pConnectedTo);
if (filter->sink.pin.peer)
IPin_Disconnect(filter->sink.pin.peer);
IPin_Disconnect(&filter->sink.pin.IPin_iface);
strmbase_sink_cleanup(&filter->sink);
......@@ -407,7 +407,7 @@ HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter * iface)
EnterCriticalSection(&This->csRenderLock);
{
RendererPosPassThru_ResetMediaTime(This->pPosition);
if (This->sink.pin.pConnectedTo && This->pFuncsTable->renderer_stop_stream)
if (This->sink.pin.peer && This->pFuncsTable->renderer_stop_stream)
This->pFuncsTable->renderer_stop_stream(This);
This->filter.state = State_Stopped;
SetEvent(This->state_event);
......@@ -431,7 +431,7 @@ HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart)
SetEvent(This->state_event);
if (This->sink.pin.pConnectedTo)
if (This->sink.pin.peer)
{
This->sink.end_of_stream = FALSE;
}
......@@ -449,7 +449,7 @@ HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart)
if (SUCCEEDED(hr))
{
QualityControlRender_Start(This->qcimpl, This->filter.rtStreamStart);
if (This->sink.pin.pConnectedTo && This->pFuncsTable->renderer_start_stream)
if (This->sink.pin.peer && This->pFuncsTable->renderer_start_stream)
This->pFuncsTable->renderer_start_stream(This);
if (This->filter.state == State_Stopped)
BaseRendererImpl_ClearPendingSample(This);
......@@ -473,11 +473,11 @@ HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface)
{
if (This->filter.state == State_Stopped)
{
if (This->sink.pin.pConnectedTo)
if (This->sink.pin.peer)
ResetEvent(This->state_event);
This->sink.end_of_stream = FALSE;
}
else if (This->sink.pin.pConnectedTo && This->pFuncsTable->renderer_stop_stream)
else if (This->sink.pin.peer && This->pFuncsTable->renderer_stop_stream)
This->pFuncsTable->renderer_stop_stream(This);
if (This->filter.state == State_Stopped)
......
......@@ -135,12 +135,12 @@ static void transform_destroy(struct strmbase_filter *iface)
{
TransformFilter *filter = impl_from_strmbase_filter(iface);
if (filter->sink.pin.pConnectedTo)
IPin_Disconnect(filter->sink.pin.pConnectedTo);
if (filter->sink.pin.peer)
IPin_Disconnect(filter->sink.pin.peer);
IPin_Disconnect(&filter->sink.pin.IPin_iface);
if (filter->source.pin.pConnectedTo)
IPin_Disconnect(filter->source.pin.pConnectedTo);
if (filter->source.pin.peer)
IPin_Disconnect(filter->source.pin.peer);
IPin_Disconnect(&filter->source.pin.IPin_iface);
strmbase_sink_cleanup(&filter->sink);
......@@ -379,8 +379,8 @@ static HRESULT WINAPI TransformFilter_InputPin_EndOfStream(IPin * iface)
TRACE("iface %p.\n", iface);
if (filter->source.pin.pConnectedTo)
return IPin_EndOfStream(filter->source.pin.pConnectedTo);
if (filter->source.pin.peer)
return IPin_EndOfStream(filter->source.pin.peer);
return VFW_E_NOT_CONNECTED;
}
......
......@@ -132,7 +132,7 @@ static HRESULT WINAPI basic_video_get_AvgTimePerFrame(IBasicVideo *iface, REFTIM
if (!pAvgTimePerFrame)
return E_POINTER;
if (!This->pPin->pConnectedTo)
if (!This->pPin->peer)
return VFW_E_NOT_CONNECTED;
TRACE("(%p/%p)->(%p)\n", This, iface, pAvgTimePerFrame);
......@@ -151,7 +151,7 @@ static HRESULT WINAPI basic_video_get_BitRate(IBasicVideo *iface, LONG *pBitRate
if (!pBitRate)
return E_POINTER;
if (!This->pPin->pConnectedTo)
if (!This->pPin->peer)
return VFW_E_NOT_CONNECTED;
vih = This->pFuncsTable->pfnGetVideoFormat(This);
......@@ -168,7 +168,7 @@ static HRESULT WINAPI basic_video_get_BitErrorRate(IBasicVideo *iface, LONG *pBi
if (!pBitErrorRate)
return E_POINTER;
if (!This->pPin->pConnectedTo)
if (!This->pPin->peer)
return VFW_E_NOT_CONNECTED;
vih = This->pFuncsTable->pfnGetVideoFormat(This);
......
......@@ -523,14 +523,14 @@ static gboolean event_sink(GstPad *pad, GstObject *parent, GstEvent *event)
if (stop > 0)
stop /= 100;
if (pin->pin.pin.pConnectedTo)
IPin_NewSegment(pin->pin.pin.pConnectedTo, pos, stop, rate*applied_rate);
if (pin->pin.pin.peer)
IPin_NewSegment(pin->pin.pin.peer, pos, stop, rate*applied_rate);
return TRUE;
}
case GST_EVENT_EOS:
if (pin->pin.pin.pConnectedTo)
IPin_EndOfStream(pin->pin.pin.pConnectedTo);
if (pin->pin.pin.peer)
IPin_EndOfStream(pin->pin.pin.peer);
return TRUE;
case GST_EVENT_FLUSH_START:
if (impl_from_strmbase_filter(pin->pin.pin.filter)->ignore_flush) {
......@@ -544,13 +544,13 @@ static gboolean event_sink(GstPad *pad, GstObject *parent, GstEvent *event)
GST_PAD_UNSET_FLUSHING (pad);
return TRUE;
}
if (pin->pin.pin.pConnectedTo)
IPin_BeginFlush(pin->pin.pin.pConnectedTo);
if (pin->pin.pin.peer)
IPin_BeginFlush(pin->pin.pin.peer);
return TRUE;
case GST_EVENT_FLUSH_STOP:
gst_segment_init(pin->segment, GST_FORMAT_TIME);
if (pin->pin.pin.pConnectedTo)
IPin_EndFlush(pin->pin.pin.pConnectedTo);
if (pin->pin.pin.peer)
IPin_EndFlush(pin->pin.pin.peer);
return TRUE;
case GST_EVENT_CAPS: {
GstCaps *caps;
......@@ -731,7 +731,7 @@ static GstFlowReturn got_data_sink(GstPad *pad, GstObject *parent, GstBuffer *bu
IMediaSample_SetPreroll(sample, GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_LIVE));
IMediaSample_SetSyncPoint(sample, !GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_DELTA_UNIT));
if (!pin->pin.pin.pConnectedTo)
if (!pin->pin.pin.peer)
hr = VFW_E_NOT_CONNECTED;
else
hr = IMemInputPin_Receive(pin->pin.pMemInputPin, sample);
......@@ -1208,9 +1208,9 @@ static void gstdemux_destroy(struct strmbase_filter *iface)
CloseHandle(filter->duration_event);
/* Don't need to clean up output pins, disconnecting input pin will do that */
if (filter->sink.pConnectedTo)
if (filter->sink.peer)
{
hr = IPin_Disconnect(filter->sink.pConnectedTo);
hr = IPin_Disconnect(filter->sink.peer);
assert(hr == S_OK);
hr = IPin_Disconnect(&filter->sink.IPin_iface);
assert(hr == S_OK);
......@@ -1847,10 +1847,10 @@ static HRESULT WINAPI GSTOutPin_DecideAllocator(struct strmbase_source *base,
static void free_source_pin(struct gstdemux_source *pin)
{
if (pin->pin.pin.pConnectedTo)
if (pin->pin.pin.peer)
{
if (SUCCEEDED(IMemAllocator_Decommit(pin->pin.pAllocator)))
IPin_Disconnect(pin->pin.pin.pConnectedTo);
IPin_Disconnect(pin->pin.pin.peer);
IPin_Disconnect(&pin->pin.pin.IPin_iface);
}
......@@ -1986,7 +1986,7 @@ static HRESULT WINAPI GSTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
mark_wine_thread();
EnterCriticalSection(&filter->filter.csFilter);
if (!filter->sink.pConnectedTo)
if (!filter->sink.peer)
{
ALLOCATOR_PROPERTIES props;
IMemAllocator *pAlloc = NULL;
......@@ -2028,7 +2028,7 @@ static HRESULT WINAPI GSTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
IMemAllocator_Release(pAlloc);
if (SUCCEEDED(hr)) {
CopyMediaType(&filter->sink.mtCurrent, pmt);
filter->sink.pConnectedTo = pReceivePin;
filter->sink.peer = pReceivePin;
IPin_AddRef(pReceivePin);
hr = IMemAllocator_Commit(filter->alloc);
} else {
......@@ -2059,13 +2059,13 @@ static HRESULT WINAPI GSTInPin_Disconnect(IPin *iface)
hr = IBaseFilter_GetState(&filter->filter.IBaseFilter_iface, INFINITE, &state);
EnterCriticalSection(&filter->filter.csFilter);
if (filter->sink.pConnectedTo)
if (filter->sink.peer)
{
if (SUCCEEDED(hr) && state == State_Stopped) {
IMemAllocator_Decommit(filter->alloc);
IPin_Disconnect(filter->sink.pConnectedTo);
IPin_Release(filter->sink.pConnectedTo);
filter->sink.pConnectedTo = NULL;
IPin_Disconnect(filter->sink.peer);
IPin_Release(filter->sink.peer);
filter->sink.peer = NULL;
hr = GST_RemoveOutputPins(filter);
} else
hr = VFW_E_NOT_STOPPED;
......
......@@ -340,7 +340,7 @@ IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr)
This->pInputPin.pin.filter = &This->filter;
lstrcpynW(This->pInputPin.pin.name, wcsInputPinName, ARRAY_SIZE(This->pInputPin.pin.name));
This->pInputPin.pin.IPin_iface.lpVtbl = &QT_InputPin_Vtbl;
This->pInputPin.pin.pConnectedTo = NULL;
This->pInputPin.pin.peer = NULL;
This->pInputPin.pin.pFuncsTable = &sink_ops;
SourceSeeking_Init(&This->sourceSeeking, &QT_Seeking_Vtbl, QTSplitter_ChangeStop, QTSplitter_ChangeStart, QTSplitter_ChangeRate, &This->filter.csFilter);
......@@ -586,7 +586,7 @@ static DWORD WINAPI QTSplitter_thread(LPVOID data)
tStop = time * 10000000;
/* Deliver Audio */
if (This->pAudio_Pin && This->pAudio_Pin->pin.pin.pConnectedTo && This->aSession)
if (This->pAudio_Pin && This->pAudio_Pin->pin.pin.peer && This->aSession)
{
int data_size=0;
BYTE* ptr;
......@@ -802,10 +802,10 @@ static const IBaseFilterVtbl QT_Vtbl = {
static void free_source_pin(QTOutPin *pin)
{
if (pin->pin.pin.pConnectedTo)
if (pin->pin.pin.peer)
{
if (SUCCEEDED(IMemAllocator_Decommit(pin->pin.pAllocator)))
IPin_Disconnect(pin->pin.pin.pConnectedTo);
IPin_Disconnect(pin->pin.pin.peer);
IPin_Disconnect(&pin->pin.pin.IPin_iface);
}
......@@ -1064,7 +1064,7 @@ static HRESULT WINAPI QTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
EnterCriticalSection(&filter->filter.csFilter);
This->pReader = NULL;
if (This->pin.pConnectedTo)
if (This->pin.peer)
hr = VFW_E_ALREADY_CONNECTED;
else if (IPin_QueryAccept(iface, pmt) != S_OK)
hr = VFW_E_TYPE_NOT_ACCEPTED;
......@@ -1122,7 +1122,7 @@ static HRESULT WINAPI QTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
if (SUCCEEDED(hr))
{
CopyMediaType(&This->pin.mtCurrent, pmt);
This->pin.pConnectedTo = pReceivePin;
This->pin.peer = pReceivePin;
IPin_AddRef(pReceivePin);
hr = IMemAllocator_Commit(This->pAlloc);
}
......@@ -1152,16 +1152,16 @@ static HRESULT WINAPI QTInPin_Disconnect(IPin *iface)
hr = IBaseFilter_GetState(&filter->filter.IBaseFilter_iface, INFINITE, &state);
EnterCriticalSection(&filter->filter.csFilter);
if (This->pin.pConnectedTo)
if (This->pin.peer)
{
QTSplitter *Parser = impl_from_strmbase_filter(This->pin.filter);
if (SUCCEEDED(hr) && state == State_Stopped)
{
IMemAllocator_Decommit(This->pAlloc);
IPin_Disconnect(This->pin.pConnectedTo);
IPin_Release(This->pin.pConnectedTo);
This->pin.pConnectedTo = NULL;
IPin_Disconnect(This->pin.peer);
IPin_Release(This->pin.peer);
This->pin.peer = NULL;
hr = QT_RemoveOutputPins(Parser);
}
else
......
......@@ -34,7 +34,7 @@ struct strmbase_pin
struct strmbase_filter *filter;
PIN_DIRECTION dir;
WCHAR name[128];
IPin *pConnectedTo;
IPin *peer;
AM_MEDIA_TYPE mtCurrent;
REFERENCE_TIME tStart, tStop;
double dRate;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment