本文整理汇总了C++中CallWorker函数的典型用法代码示例。如果您正苦于以下问题:C++ CallWorker函数的具体用法?C++ CallWorker怎么用?C++ CallWorker使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CallWorker函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lock
HRESULT
CPullPin::StopThread()
{
CAutoLock lock(&m_AccessLock);
if (!ThreadExists()) {
return S_FALSE;
}
// need to flush to ensure the thread is not blocked
// in WaitForNext
HRESULT hr = m_pReader->BeginFlush();
if (FAILED(hr)) {
return hr;
}
m_State = TM_Exit;
hr = CallWorker(TM_Exit);
m_pReader->EndFlush();
// wait for thread to completely exit
Close();
// decommit allocator
if (m_pAlloc) {
m_pAlloc->Decommit();
}
return S_OK;
}
示例2: FlushQueue
HRESULT CAMROutputPin::Active()
{
if (active) {
return NOERROR;
}
FlushQueue();
if (!IsConnected()) {
return VFW_E_NOT_CONNECTED;
}
ev_abort.Reset();
HRESULT hr = CBaseOutputPin::Active();
if (FAILED(hr)) {
active = FALSE;
return hr;
}
// new segment
DoNewSegment(rtStart, rtStop, rate);
// vytvorime novu queue
if (!ThreadExists()) {
Create();
CallWorker(CMD_RUN);
}
active = TRUE;
return hr;
}
示例3: lck
STDMETHODIMP CAMRSplitter::Pause()
{
CAutoLock lck(&lock_filter);
if (m_State == State_Stopped) {
ev_abort.Reset();
// activate pins
for (int i=0; i<output.GetCount(); i++) {
output[i]->Active();
}
if (input) {
input->Active();
}
// seekneme na danu poziciu
DoNewSeek();
// pustime parser thread
if (!ThreadExists()) {
Create();
CallWorker(CMD_RUN);
}
}
m_State = State_Paused;
return NOERROR;
}
示例4: locLock
STDMETHODIMP OggDemuxFilter::Pause()
{
CAutoLock locLock(m_pLock);
LOG(logDEBUG) << __FUNCTIONW__;
if (m_State == State_Stopped)
{
LOG(logDEBUG) <<L"Pause -- was stopped";
if (ThreadExists() == FALSE)
{
LOG(logDEBUG) << L"Pause -- CREATING THREAD";
Create();
}
LOG(logDEBUG) << L"Pause -- RUNNING THREAD";
CallWorker(THREAD_RUN);
}
HRESULT hr = CBaseFilter::Pause();
LOG(logDEBUG) << __FUNCTIONW__ << L"Base class returned: 0x" << std::hex << hr;
return hr;
}
示例5: CallWorker
HRESULT CTTASplitterInputPin::Active()
{
HRESULT hr;
if (m_pParentFilter->IsActive()) {
return S_FALSE;
}
if (!IsConnected()) {
return NOERROR;
}
hr = CBaseInputPin::Active();
if (FAILED(hr)) {
return hr;
}
if (!Create()) {
return E_FAIL;
}
CallWorker(CMD_RUN);
return NOERROR;
}
示例6: cAutoLock
HRESULT CBaseSplitterOutputPin::Inactive()
{
CAutoLock cAutoLock(m_pLock);
if(ThreadExists())
CallWorker(CMD_EXIT);
return __super::Inactive();
}
示例7: CallWorker
HRESULT CWavPackSplitterFilterInputPin::Inactive()
{
// Stop the thread
if (ThreadExists()) {
m_bAbort = TRUE;
CallWorker(CMD_EXIT);
Close();
}
return CBasePin::Inactive();
}
示例8: cAutoLock
STDMETHODIMP CBaseMuxerFilter::Stop()
{
CAutoLock cAutoLock(this);
HRESULT hr = __super::Stop();
if(FAILED(hr)) return hr;
CallWorker(CMD_EXIT);
return hr;
}
示例9: CallWorker
CAsyncUrlReader::~CAsyncUrlReader()
{
if (ThreadExists()) {
CallWorker(CMD_EXIT);
}
if (!m_fn.IsEmpty()) {
CMultiFiles::Close();
DeleteFile(m_fn);
}
}
示例10: CallWorker
STDMETHODIMP CStreamDriveThruFilter::Pause()
{
HRESULT hr;
if(FAILED(hr = __super::Pause()))
return hr;
CallWorker(CMD_PAUSE);
return S_OK;
}
示例11: CAsyncFileReader
CAsyncUrlReader::CAsyncUrlReader(CString url, HRESULT& hr)
: CAsyncFileReader(url, hr)
{
if(SUCCEEDED(hr)) return;
m_url = url;
if(CAMThread::Create())
CallWorker(CMD_INIT);
hr = Open(m_fn, modeRead|shareDenyRead|typeBinary|osSequentialScan) ? S_OK : E_FAIL;
m_len = (ULONGLONG)-1; // force GetLength() return actual length always
}
示例12: DebugLog
STDMETHODIMP CWavPackDSSplitterInputPin::EndFlush()
{
HRESULT hr = CBaseInputPin::EndFlush();
if (FAILED(hr))
return hr;
DebugLog("CWavPackDSSplitterInputPin::EndFlush 0x%08X", GetCurrentThreadId());
if (ThreadExists())
CallWorker(CMD_RUN);
return NOERROR;
}
示例13: lock
HRESULT CAVISplitter::PauseThread()
{
CAutoLock lock(&m_AccessLock);
if (!ThreadExists()) {
return E_UNEXPECTED;
}
HRESULT hr = S_OK;
// Need to flush to ensure the thread is not blocked
// in WaitForNext
m_scanner.BeginFlush();
m_thread_state = tm_pause;
hr = CallWorker(tm_pause);
//WriteToLog("<CAVISplitter::PauseThread> CallWorker(tm_pause)");
m_scanner.EndFlush();
return hr;
}
示例14: lock
HRESULT
CPullPin::PauseThread() {
CAutoLock lock(&m_AccessLock);
if(!ThreadExists()) {
return E_UNEXPECTED;
}
// need to flush to ensure the thread is not blocked
// in WaitForNext
HRESULT hr = m_pReader->BeginFlush();
if(FAILED(hr)) {
return hr;
}
m_State = TM_Pause;
hr = CallWorker(TM_Pause);
m_pReader->EndFlush();
return hr;
}
示例15: ASSERT
HRESULT CAMROutputPin::Inactive()
{
if (!active) {
return NOERROR;
}
active = FALSE;
// destroy everything
ev_abort.Set();
HRESULT hr = CBaseOutputPin::Inactive();
ASSERT(SUCCEEDED(hr));
if (ThreadExists()) {
CallWorker(CMD_EXIT);
Close();
}
FlushQueue();
ev_abort.Reset();
return NOERROR;
}