bool CxThreadCross::CreateThread( ) { if( m_pThread ) return false; m_pThread = CreateIThread( CxThreadEntry, this, FALSE ); return( m_pThread != NULL ); }
ULONG CTransmission::StartBufferThread() { if (!m_bInit) return RET_INIT_ERROR; m_BufferSemaph.Wait(); m_bRunBufferThread = TRUE; m_pBufferThread = CreateIThread(_BufferPkt, this, TRUE); if (m_pBufferThread) return RET_OK; return RET_ERROR; }
ULONG CTransmission::StartDemuxThread() { ULONG ret = RET_OK; if ( m_pDemuxer && m_pDemuxer->HeaderSet() ) { m_pDemuxer->SetMutexOwner(); m_pDemuxThread = CreateIThread(_DemuxStream, this, TRUE); if (m_pDemuxThread) m_bRunDemuxThread = TRUE; else ret = RET_ERROR; } else { ret = RET_ERROR; } return ret; }