本文整理汇总了C++中CStreamSwitcherOutputPin::IsConnected方法的典型用法代码示例。如果您正苦于以下问题:C++ CStreamSwitcherOutputPin::IsConnected方法的具体用法?C++ CStreamSwitcherOutputPin::IsConnected怎么用?C++ CStreamSwitcherOutputPin::IsConnected使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStreamSwitcherOutputPin
的用法示例。
在下文中一共展示了CStreamSwitcherOutputPin::IsConnected方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NewSegment
STDMETHODIMP CStreamSwitcherInputPin::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
{
if(!IsConnected())
return S_OK;
CAutoLock cAutoLock(&m_csReceive);
CStreamSwitcherFilter* pSSF = (CStreamSwitcherFilter*)m_pFilter;
CStreamSwitcherOutputPin* pOut = pSSF->GetOutputPin();
if(!pOut || !pOut->IsConnected())
return VFW_E_NOT_CONNECTED;
return pSSF->DeliverNewSegment(tStart, tStop, dRate);
}
示例2: EndFlush
STDMETHODIMP CStreamSwitcherInputPin::EndFlush()
{
CAutoLock cAutoLock(&((CStreamSwitcherFilter*)m_pFilter)->m_csState);
HRESULT hr;
CStreamSwitcherFilter* pSSF = (CStreamSwitcherFilter*)m_pFilter;
CStreamSwitcherOutputPin* pOut = pSSF->GetOutputPin();
if(!IsConnected() || !pOut || !pOut->IsConnected())
return VFW_E_NOT_CONNECTED;
if(FAILED(hr = __super::EndFlush()))
return hr;
return IsActive() ? pSSF->DeliverEndFlush() : Block(true), S_OK;
}
示例3: NewSegment
STDMETHODIMP CStreamSwitcherInputPin::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
{
SetThreadName((DWORD)-1, "CStreamSwitcherInputPin");
if(!IsConnected())
return S_OK;
CAutoLock cAutoLock(&m_csReceive);
CStreamSwitcherFilter* pSSF = static_cast<CStreamSwitcherFilter*>(m_pFilter);
CStreamSwitcherOutputPin* pOut = pSSF->GetOutputPin();
if(!pOut || !pOut->IsConnected())
return VFW_E_NOT_CONNECTED;
return pSSF->DeliverNewSegment(tStart, tStop, dRate);
}
示例4: BeginFlush
STDMETHODIMP CStreamSwitcherInputPin::BeginFlush()
{
CAutoLock cAutoLock(&(static_cast<CStreamSwitcherFilter*>(m_pFilter))->m_csState);
HRESULT hr;
CStreamSwitcherFilter* pSSF = static_cast<CStreamSwitcherFilter*>(m_pFilter);
CStreamSwitcherOutputPin* pOut = pSSF->GetOutputPin();
if(!IsConnected() || !pOut || !pOut->IsConnected())
return VFW_E_NOT_CONNECTED;
if(FAILED(hr = __super::BeginFlush()))
return hr;
return IsActive() ? pSSF->DeliverBeginFlush() : Block(false), S_OK;
}
示例5: EndOfStream
STDMETHODIMP CStreamSwitcherInputPin::EndOfStream()
{
CAutoLock cAutoLock(&m_csReceive);
CStreamSwitcherFilter* pSSF = static_cast<CStreamSwitcherFilter*>(m_pFilter);
CStreamSwitcherOutputPin* pOut = pSSF->GetOutputPin();
if (!IsConnected() || !pOut || !pOut->IsConnected()) {
return VFW_E_NOT_CONNECTED;
}
if (m_hNotifyEvent) {
SetEvent(m_hNotifyEvent), m_hNotifyEvent = nullptr;
return S_OK;
}
return IsActive() ? pSSF->DeliverEndOfStream() : S_OK;
}
示例6: QueryAcceptDownstream
HRESULT CStreamSwitcherInputPin::QueryAcceptDownstream(const AM_MEDIA_TYPE* pmt)
{
HRESULT hr = S_OK;
CStreamSwitcherOutputPin* pOut = (static_cast<CStreamSwitcherFilter*>(m_pFilter))->GetOutputPin();
if (pOut && pOut->IsConnected()) {
if (CComPtr<IPinConnection> pPC = pOut->CurrentPinConnection()) {
hr = pPC->DynamicQueryAccept(pmt);
if (hr == S_OK) {
return S_OK;
}
}
hr = pOut->GetConnected()->QueryAccept(pmt);
}
return hr;
}