本文整理汇总了C++中filter::Lock::Release方法的典型用法代码示例。如果您正苦于以下问题:C++ Lock::Release方法的具体用法?C++ Lock::Release怎么用?C++ Lock::Release使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类filter::Lock
的用法示例。
在下文中一共展示了Lock::Release方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NewSegment
HRESULT Inpin::NewSegment(
REFERENCE_TIME st,
REFERENCE_TIME sp,
double r)
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
if (IPin* pPin = m_pFilter->m_outpin.m_pPinConnection)
{
lock.Release();
const HRESULT hr = pPin->NewSegment(st, sp, r);
return hr;
}
return S_OK;
}
示例2: EndFlush
HRESULT Inpin::EndFlush()
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
#if 0 //def _DEBUG
odbgstream os;
os << "vp8decoder::inpin::endflush" << endl;
#endif
m_bFlush = false;
m_bEndOfStream = false;
if (IPin* pPin = m_pFilter->m_outpin.m_pPinConnection)
{
lock.Release();
const HRESULT hr = pPin->EndFlush();
return hr;
}
return S_OK;
}
示例3: CheckCapabilities
HRESULT OutpinVideo::CheckCapabilities(DWORD* pdw)
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
const Inpin& inpin = m_pFilter->m_inpin;
const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);
if (bool(pSeek))
{
lock.Release();
return pSeek->CheckCapabilities(pdw);
}
if (pdw == 0)
return E_POINTER;
DWORD& dw = *pdw;
const DWORD dwRequested = dw;
if (dwRequested == 0)
return E_INVALIDARG;
return E_FAIL;
}
示例4: GetPositions
HRESULT OutpinVideo::GetPositions(
LONGLONG* pCurrPos,
LONGLONG* pStopPos)
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
const Inpin& inpin = m_pFilter->m_inpin;
const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);
if (bool(pSeek))
{
lock.Release();
return pSeek->GetPositions(pCurrPos, pStopPos);
}
return E_FAIL;
}
示例5: GetAvailable
HRESULT OutpinVideo::GetAvailable(
LONGLONG* pEarliest,
LONGLONG* pLatest)
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
const Inpin& inpin = m_pFilter->m_inpin;
const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);
if (bool(pSeek))
{
lock.Release();
return pSeek->GetAvailable(pEarliest, pLatest);
}
return E_FAIL;
}
示例6: GetDuration
HRESULT OutpinVideo::GetDuration(LONGLONG* p)
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
const Inpin& inpin = m_pFilter->m_inpin;
const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);
if (bool(pSeek))
{
lock.Release();
return pSeek->GetDuration(p);
}
if (p == 0)
return E_POINTER;
return E_FAIL;
}
示例7: GetCurrentPosition
HRESULT OutpinVideo::GetCurrentPosition(LONGLONG* p)
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
const Inpin& inpin = m_pFilter->m_inpin;
#if 0
const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);
if (bool(pSeek))
{
lock.Release();
return pSeek->GetCurrentPosition(p);
}
if (p == 0)
return E_POINTER;
return E_FAIL;
#else
if (p == 0)
return E_POINTER;
*p = inpin.m_start_reftime;
return S_OK;
#endif
}
示例8: SetTimeFormat
HRESULT OutpinVideo::SetTimeFormat(const GUID* p)
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
const Inpin& inpin = m_pFilter->m_inpin;
const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);
if (bool(pSeek))
{
lock.Release();
return pSeek->SetTimeFormat(p);
}
if (p == 0)
return E_INVALIDARG;
if (*p == TIME_FORMAT_MEDIA_TIME)
return S_OK;
return E_INVALIDARG;
}
示例9: QueryPreferredFormat
HRESULT OutpinVideo::QueryPreferredFormat(GUID* p)
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
const Inpin& inpin = m_pFilter->m_inpin;
const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);
if (bool(pSeek))
{
lock.Release();
return pSeek->QueryPreferredFormat(p);
}
if (p == 0)
return E_POINTER;
*p = TIME_FORMAT_MEDIA_TIME;
return S_OK;
}
示例10: IsFormatSupported
HRESULT OutpinVideo::IsFormatSupported(const GUID* p)
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
const Inpin& inpin = m_pFilter->m_inpin;
const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);
if (bool(pSeek))
{
lock.Release();
return pSeek->IsFormatSupported(p);
}
if (p == 0)
return E_POINTER;
const GUID& g = *p;
if (g == TIME_FORMAT_MEDIA_TIME)
return S_OK;
return S_FALSE;
}
示例11: BeginFlush
HRESULT Inpin::BeginFlush()
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
//TODO:
//if (m_bFlush)
// return S_FALSE;
#if 0 //def _DEBUG
odbgstream os;
os << "vp8decoder::inpin::beginflush" << endl;
#endif
m_bFlush = true;
if (IPin* pPin = m_pFilter->m_outpin.m_pPinConnection)
{
lock.Release();
const HRESULT hr = pPin->BeginFlush();
return hr;
}
return S_OK;
}
示例12: GetCapabilities
HRESULT OutpinVideo::GetCapabilities(DWORD* pdw)
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
const Inpin& inpin = m_pFilter->m_inpin;
const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);
if (bool(pSeek))
{
lock.Release();
return pSeek->GetCapabilities(pdw);
}
if (pdw == 0)
return E_POINTER;
DWORD& dw = *pdw;
dw = 0;
return S_OK; //?
}
示例13: ReceiveCanBlock
HRESULT Inpin::ReceiveCanBlock()
{
Filter::Lock lock;
const HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return S_OK; //?
if (IMemInputPin* pPin = m_pFilter->m_outpin.m_pInputPin)
{
lock.Release();
return pPin->ReceiveCanBlock();
}
return S_FALSE;
}
示例14: ConvertTimeFormat
HRESULT OutpinVideo::ConvertTimeFormat(
LONGLONG* ptgt,
const GUID* ptgtfmt,
LONGLONG src,
const GUID* psrcfmt)
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
const Inpin& inpin = m_pFilter->m_inpin;
const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);
if (bool(pSeek))
{
lock.Release();
return pSeek->ConvertTimeFormat(ptgt, ptgtfmt, src, psrcfmt);
}
if (ptgt == 0)
return E_POINTER;
LONGLONG& tgt = *ptgt;
const GUID& tgtfmt = ptgtfmt ? *ptgtfmt : TIME_FORMAT_MEDIA_TIME;
const GUID& srcfmt = psrcfmt ? *psrcfmt : TIME_FORMAT_MEDIA_TIME;
if (tgtfmt != TIME_FORMAT_MEDIA_TIME)
return E_INVALIDARG;
if (srcfmt != TIME_FORMAT_MEDIA_TIME)
return E_INVALIDARG;
tgt = src;
return S_OK;
}
示例15: SetPositions
HRESULT OutpinVideo::SetPositions(
LONGLONG* pCurr_,
DWORD dwCurr_,
LONGLONG* pStop_,
DWORD dwStop_)
{
Filter::Lock lock;
HRESULT hr = lock.Seize(m_pFilter);
if (FAILED(hr))
return hr;
if (!bool(m_pPinConnection))
return VFW_E_NOT_CONNECTED;
const Inpin& inpin = m_pFilter->m_inpin;
const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);
if (bool(pSeek))
{
lock.Release();
LONGLONG curr;
LONGLONG* const pCurr = pCurr_ ? pCurr_ : &curr;
const DWORD dwCurr = pCurr_ ? dwCurr_ : AM_SEEKING_NoPositioning;
LONGLONG stop;
LONGLONG* const pStop = pStop_ ? pStop_ : &stop;
const DWORD dwStop = pStop_ ? dwStop_ : AM_SEEKING_NoPositioning;
return pSeek->SetPositions(pCurr, dwCurr, pStop, dwStop);
}
return E_FAIL;
}