COutputQueue Class Reference

#include <outputq.h>

Inheritance diagram for COutputQueue:

CCritSec

List of all members.

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
CSampleListm_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


Detailed Description

Definition at line 8 of file outputq.h.


Constructor & Destructor Documentation

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 
)

COutputQueue::~COutputQueue (  ) 


Member Function Documentation

void COutputQueue::BeginFlush ( void   ) 

void COutputQueue::EndFlush ( void   ) 

void COutputQueue::EOS (  ) 

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 
)

HRESULT COutputQueue::Receive ( IMediaSample *  pSample  ) 

Definition at line 494 of file outputq.cpp.

References LONG, and ReceiveMultiple().

HRESULT COutputQueue::ReceiveMultiple ( IMediaSample **  pSamples,
long  nSamples,
long *  nSamplesProcessed 
)

void COutputQueue::Reset (  ) 

BOOL COutputQueue::IsIdle (  ) 

void COutputQueue::SetPopEvent ( HANDLE  hEvent  ) 

Definition at line 684 of file outputq.cpp.

References m_hEventPop.

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]

BOOL COutputQueue::IsQueued (  )  [inline, protected]

Definition at line 62 of file outputq.h.

References m_List, and NULL.

Referenced by BeginFlush(), EndFlush(), EOS(), FreeSamples(), IsIdle(), NewSegment(), NotifyThread(), ReceiveMultiple(), Reset(), and SendAnyway().

void COutputQueue::QueueSample ( IMediaSample *  pSample  )  [protected]

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]

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().


Member Data Documentation

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().

HANDLE COutputQueue::m_hSem [protected]

Definition at line 102 of file outputq.h.

Referenced by COutputQueue(), NotifyThread(), ThreadProc(), and ~COutputQueue().

Definition at line 103 of file outputq.h.

Referenced by BeginFlush(), EndFlush(), Reset(), and ThreadProc().

HANDLE COutputQueue::m_hThread [protected]

Definition at line 104 of file outputq.h.

Referenced by COutputQueue(), and ~COutputQueue().

IMediaSample** COutputQueue::m_ppSamples [protected]

Definition at line 105 of file outputq.h.

Referenced by COutputQueue(), FreeSamples(), ReceiveMultiple(), ThreadProc(), and ~COutputQueue().

Definition at line 106 of file outputq.h.

Referenced by FreeSamples(), IsIdle(), ReceiveMultiple(), and ThreadProc().

Definition at line 109 of file outputq.h.

Referenced by IsIdle(), NotifyThread(), and ThreadProc().

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().

Definition at line 116 of file outputq.h.

Referenced by BeginFlush(), and EndFlush().

BOOL COutputQueue::m_bTerminate [protected]

Definition at line 119 of file outputq.h.

Referenced by ThreadProc(), and ~COutputQueue().

BOOL COutputQueue::m_bSendAnyway [protected]

Definition at line 122 of file outputq.h.

Referenced by ReceiveMultiple(), and SendAnyway().

BOOL volatile COutputQueue::m_hr [protected]

HANDLE COutputQueue::m_hEventPop [protected]

Definition at line 128 of file outputq.h.

Referenced by FreeSamples(), SetPopEvent(), and ThreadProc().


The documentation for this class was generated from the following files:

Generated on Sun May 25 00:20:50 2008 by  doxygen 1.5.6