#include <outputq.h>

Public Member Functions | |
| COutputQueue (IPin *pInputPin, HRESULT *phr, BOOL bAuto=TRUE, BOOL bQueue=TRUE, LONG lBatchSize=1, BOOL bBatchExact=FALSE, LONG lListSize=DEFAULTCACHE, DWORD dwPriority=THREAD_PRIORITY_NORMAL, bool bFlushingOpt=false) | |
| ~COutputQueue () | |
| void | BeginFlush () |
| void | EndFlush () |
| void | EOS () |
| void | SendAnyway () |
| void | NewSegment (REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate) |
| HRESULT | Receive (IMediaSample *pSample) |
| HRESULT | ReceiveMultiple (IMediaSample **pSamples, long nSamples, long *nSamplesProcessed) |
| void | Reset () |
| BOOL | IsIdle () |
| void | SetPopEvent (HANDLE hEvent) |
Protected Member Functions | |
| DWORD | ThreadProc () |
| BOOL | IsQueued () |
| void | QueueSample (IMediaSample *pSample) |
| BOOL | IsSpecialSample (IMediaSample *pSample) |
| void | FreeSamples () |
| void | NotifyThread () |
Static Protected Member Functions | |
| static DWORD WINAPI | InitialThreadProc (LPVOID pv) |
Protected Attributes | |
| IPin *const | m_pPin |
| IMemInputPin * | m_pInputPin |
| BOOL const | m_bBatchExact |
| LONG const | m_lBatchSize |
| CSampleList * | m_List |
| HANDLE | m_hSem |
| CAMEvent | m_evFlushComplete |
| HANDLE | m_hThread |
| IMediaSample ** | m_ppSamples |
| LONG | m_nBatched |
| LONG | m_lWaiting |
| BOOL | m_bFlushing |
| BOOL | m_bFlushed |
| bool | m_bFlushingOpt |
| BOOL | m_bTerminate |
| BOOL | m_bSendAnyway |
| BOOL volatile | m_hr |
| HANDLE | m_hEventPop |
Classes | |
| struct | NewSegmentPacket |
Definition at line 8 of file outputq.h.
| COutputQueue::COutputQueue | ( | IPin * | pInputPin, | |
| HRESULT * | phr, | |||
| BOOL | bAuto = TRUE, |
|||
| BOOL | bQueue = TRUE, |
|||
| LONG | lBatchSize = 1, |
|||
| BOOL | bBatchExact = FALSE, |
|||
| LONG | lListSize = DEFAULTCACHE, |
|||
| DWORD | dwPriority = THREAD_PRIORITY_NORMAL, |
|||
| bool | bFlushingOpt = false | |||
| ) |
Definition at line 8 of file outputq.cpp.
References AmHresultFromWin32, ASSERT, DbgLog, E_OUTOFMEMORY, FAILED, FALSE, GetLastError(), hr, HRESULT, InitialThreadProc(), LOG_TRACE, LPVOID, m_hSem, m_hThread, m_lBatchSize, m_List, m_pInputPin, m_ppSamples, NAME, NULL, and S_OK.
| COutputQueue::~COutputQueue | ( | ) |
Definition at line 103 of file outputq.cpp.
References ASSERT, DbgLog, DbgWaitForSingleObject, EXECUTE_ASSERT, FreeSamples(), CGenericList< OBJECT >::GetCount(), LOG_TRACE, m_bTerminate, m_hr, m_hSem, m_hThread, m_List, m_pInputPin, m_ppSamples, NotifyThread(), NULL, S_FALSE, and TRUE.
| void COutputQueue::BeginFlush | ( | void | ) |
Definition at line 397 of file outputq.cpp.
References IsQueued(), m_bFlushed, m_bFlushing, m_bFlushingOpt, m_evFlushComplete, m_hr, m_pPin, NotifyThread(), CAMEvent::Reset(), S_FALSE, S_OK, and TRUE.
| void COutputQueue::EndFlush | ( | void | ) |
Definition at line 448 of file outputq.cpp.
References ASSERT, FALSE, FreeSamples(), IsQueued(), m_bFlushed, m_bFlushing, m_bFlushingOpt, m_evFlushComplete, m_hr, m_pPin, S_OK, TRUE, and CAMEvent::Wait().
| void COutputQueue::EOS | ( | ) |
Definition at line 373 of file outputq.cpp.
References DbgLog, EOS_PACKET, FAILED, FALSE, hr, HRESULT, IsQueued(), LOG_ERROR, LOG_TRACE, m_bBatchExact, m_bFlushed, m_hr, m_pPin, NotifyThread(), QueueSample(), S_OK, and SendAnyway().
| void COutputQueue::SendAnyway | ( | ) |
Definition at line 315 of file outputq.cpp.
References FALSE, IsQueued(), LONG, m_bSendAnyway, NotifyThread(), NULL, QueueSample(), ReceiveMultiple(), SEND_PACKET, and TRUE.
Referenced by EOS(), and NewSegment().
| void COutputQueue::NewSegment | ( | REFERENCE_TIME | tStart, | |
| REFERENCE_TIME | tStop, | |||
| double | dRate | |||
| ) |
Definition at line 334 of file outputq.cpp.
References COutputQueue::NewSegmentPacket::dRate, IsQueued(), m_bBatchExact, m_hr, m_pPin, NEW_SEGMENT, NotifyThread(), NULL, QueueSample(), S_OK, SendAnyway(), COutputQueue::NewSegmentPacket::tStart, and COutputQueue::NewSegmentPacket::tStop.
| HRESULT COutputQueue::Receive | ( | IMediaSample * | pSample | ) |
| HRESULT COutputQueue::ReceiveMultiple | ( | IMediaSample ** | pSamples, | |
| long | nSamples, | |||
| long * | nSamplesProcessed | |||
| ) |
Definition at line 500 of file outputq.cpp.
References ASSERT, DbgLog, FALSE, CGenericList< OBJECT >::GetCount(), IsQueued(), LOG_TRACE, LONG, m_bBatchExact, m_bFlushed, m_bFlushing, m_bSendAnyway, m_hr, m_lBatchSize, m_List, m_nBatched, m_pInputPin, m_ppSamples, NotifyThread(), QueueSample(), and S_OK.
Referenced by Receive(), and SendAnyway().
| void COutputQueue::Reset | ( | ) |
Definition at line 600 of file outputq.cpp.
References IsQueued(), m_evFlushComplete, m_hr, NotifyThread(), QueueSample(), RESET_PACKET, S_OK, and CAMEvent::Wait().
| BOOL COutputQueue::IsIdle | ( | ) |
Definition at line 662 of file outputq.cpp.
References ASSERT, FALSE, CGenericList< OBJECT >::GetCount(), IsQueued(), m_List, m_lWaiting, m_nBatched, and TRUE.
| void COutputQueue::SetPopEvent | ( | HANDLE | hEvent | ) |
| DWORD WINAPI COutputQueue::InitialThreadProc | ( | LPVOID | pv | ) | [static, protected] |
Definition at line 133 of file outputq.cpp.
References CAMThread::CoInitializeHelper(), HRESULT, S_OK, and ThreadProc().
Referenced by COutputQueue().
| DWORD COutputQueue::ThreadProc | ( | void | ) | [protected] |
Definition at line 147 of file outputq.cpp.
References ASSERT, BOOL, DbgLog, DbgWaitForSingleObject, COutputQueue::NewSegmentPacket::dRate, EOS_PACKET, FAILED, FALSE, FreeSamples(), hr, HRESULT, IsSpecialSample(), LOG_ERROR, LOG_TRACE, LONG, m_bBatchExact, m_bFlushed, m_bFlushing, m_bTerminate, m_evFlushComplete, m_hEventPop, m_hr, m_hSem, m_lBatchSize, m_List, m_lWaiting, m_nBatched, m_pInputPin, m_pPin, m_ppSamples, NEW_SEGMENT, NULL, CGenericList< OBJECT >::RemoveHead(), RESET_PACKET, S_OK, SEND_PACKET, TRUE, COutputQueue::NewSegmentPacket::tStart, and COutputQueue::NewSegmentPacket::tStop.
Referenced by InitialThreadProc().
| BOOL COutputQueue::IsQueued | ( | ) | [inline, protected] |
Definition at line 62 of file outputq.h.
Referenced by BeginFlush(), EndFlush(), EOS(), FreeSamples(), IsIdle(), NewSegment(), NotifyThread(), ReceiveMultiple(), Reset(), and SendAnyway().
| void COutputQueue::QueueSample | ( | IMediaSample * | pSample | ) | [protected] |
Definition at line 485 of file outputq.cpp.
References CGenericList< OBJECT >::AddTail(), IsSpecialSample(), m_List, and NULL.
Referenced by EOS(), NewSegment(), ReceiveMultiple(), Reset(), and SendAnyway().
| BOOL COutputQueue::IsSpecialSample | ( | IMediaSample * | pSample | ) | [inline, protected] |
Definition at line 70 of file outputq.h.
References DWORD_PTR, and LONG_PTR.
Referenced by FreeSamples(), QueueSample(), and ThreadProc().
| void COutputQueue::FreeSamples | ( | ) | [protected] |
Definition at line 612 of file outputq.cpp.
References ASSERT, IsQueued(), IsSpecialSample(), m_hEventPop, m_List, m_nBatched, m_ppSamples, NEW_SEGMENT, NULL, CGenericList< OBJECT >::RemoveHead(), and TRUE.
Referenced by EndFlush(), ThreadProc(), and ~COutputQueue().
| void COutputQueue::NotifyThread | ( | ) | [protected] |
Definition at line 652 of file outputq.cpp.
References ASSERT, IsQueued(), m_hSem, m_lWaiting, and NULL.
Referenced by BeginFlush(), EOS(), NewSegment(), ReceiveMultiple(), Reset(), SendAnyway(), and ~COutputQueue().
IPin* const COutputQueue::m_pPin [protected] |
Definition at line 96 of file outputq.h.
Referenced by BeginFlush(), EndFlush(), EOS(), NewSegment(), and ThreadProc().
IMemInputPin* COutputQueue::m_pInputPin [protected] |
Definition at line 97 of file outputq.h.
Referenced by COutputQueue(), ReceiveMultiple(), ThreadProc(), and ~COutputQueue().
BOOL const COutputQueue::m_bBatchExact [protected] |
Definition at line 98 of file outputq.h.
Referenced by EOS(), NewSegment(), ReceiveMultiple(), and ThreadProc().
LONG const COutputQueue::m_lBatchSize [protected] |
Definition at line 99 of file outputq.h.
Referenced by COutputQueue(), ReceiveMultiple(), and ThreadProc().
CSampleList* COutputQueue::m_List [protected] |
Definition at line 101 of file outputq.h.
Referenced by COutputQueue(), FreeSamples(), IsIdle(), IsQueued(), QueueSample(), ReceiveMultiple(), ThreadProc(), and ~COutputQueue().
HANDLE COutputQueue::m_hSem [protected] |
Definition at line 102 of file outputq.h.
Referenced by COutputQueue(), NotifyThread(), ThreadProc(), and ~COutputQueue().
CAMEvent COutputQueue::m_evFlushComplete [protected] |
Definition at line 103 of file outputq.h.
Referenced by BeginFlush(), EndFlush(), Reset(), and ThreadProc().
HANDLE COutputQueue::m_hThread [protected] |
IMediaSample** COutputQueue::m_ppSamples [protected] |
Definition at line 105 of file outputq.h.
Referenced by COutputQueue(), FreeSamples(), ReceiveMultiple(), ThreadProc(), and ~COutputQueue().
LONG COutputQueue::m_nBatched [protected] |
Definition at line 106 of file outputq.h.
Referenced by FreeSamples(), IsIdle(), ReceiveMultiple(), and ThreadProc().
LONG COutputQueue::m_lWaiting [protected] |
BOOL COutputQueue::m_bFlushing [protected] |
Definition at line 111 of file outputq.h.
Referenced by BeginFlush(), EndFlush(), ReceiveMultiple(), and ThreadProc().
BOOL COutputQueue::m_bFlushed [protected] |
Definition at line 115 of file outputq.h.
Referenced by BeginFlush(), EndFlush(), EOS(), ReceiveMultiple(), and ThreadProc().
bool COutputQueue::m_bFlushingOpt [protected] |
BOOL COutputQueue::m_bTerminate [protected] |
BOOL COutputQueue::m_bSendAnyway [protected] |
BOOL volatile COutputQueue::m_hr [protected] |
Definition at line 125 of file outputq.h.
Referenced by BeginFlush(), EndFlush(), EOS(), NewSegment(), ReceiveMultiple(), Reset(), ThreadProc(), and ~COutputQueue().
HANDLE COutputQueue::m_hEventPop [protected] |
Definition at line 128 of file outputq.h.
Referenced by FreeSamples(), SetPopEvent(), and ThreadProc().
1.5.6