CPullPin Class Reference

#include <pullpin.h>

Inheritance diagram for CPullPin:

CAMThread

List of all members.

Public Member Functions

 CPullPin ()
virtual ~CPullPin ()
HRESULT Connect (IUnknown *pUnk, IMemAllocator *pAlloc, BOOL bSync)
HRESULT Disconnect ()
virtual HRESULT DecideAllocator (IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pProps)
HRESULT Seek (REFERENCE_TIME tStart, REFERENCE_TIME tStop)
HRESULT Duration (REFERENCE_TIME *ptDuration)
HRESULT Active (void)
HRESULT Inactive (void)
LONGLONG AlignDown (LONGLONG ll, LONG lAlign)
LONGLONG AlignUp (LONGLONG ll, LONG lAlign)
IAsyncReader * GetReader ()
virtual HRESULT Receive (IMediaSample *) PURE
virtual HRESULT EndOfStream (void) PURE
virtual void OnError (HRESULT hr) PURE
virtual HRESULT BeginFlush () PURE
virtual HRESULT EndFlush () PURE

Protected Attributes

IMemAllocator * m_pAlloc

Private Types

enum  ThreadMsg { TM_Pause, TM_Start, TM_Exit }

Private Member Functions

DWORD ThreadProc (void)
void Process (void)
void CleanupCancelled (void)
HRESULT PauseThread ()
HRESULT StartThread ()
HRESULT StopThread ()
HRESULT QueueSample (REFERENCE_TIME &tCurrent, REFERENCE_TIME tAlignStop, BOOL bDiscontinuity)
HRESULT CollectAndDeliver (REFERENCE_TIME tStart, REFERENCE_TIME tStop)
HRESULT DeliverSample (IMediaSample *pSample, REFERENCE_TIME tStart, REFERENCE_TIME tStop)

Private Attributes

IAsyncReader * m_pReader
REFERENCE_TIME m_tStart
REFERENCE_TIME m_tStop
REFERENCE_TIME m_tDuration
BOOL m_bSync
ThreadMsg m_State


Detailed Description

Definition at line 9 of file pullpin.h.


Member Enumeration Documentation

enum CPullPin::ThreadMsg [private]

Enumerator:
TM_Pause 
TM_Start 
TM_Exit 

Definition at line 17 of file pullpin.h.


Constructor & Destructor Documentation

CPullPin::CPullPin (  ) 

Definition at line 9 of file pullpin.cpp.

CPullPin::~CPullPin (  )  [virtual]

Definition at line 17 of file pullpin.cpp.

References Disconnect().


Member Function Documentation

DWORD CPullPin::ThreadProc ( void   )  [private, virtual]

void CPullPin::Process ( void   )  [private]

void CPullPin::CleanupCancelled ( void   )  [private]

Definition at line 488 of file pullpin.cpp.

References DWORD_PTR, hr, HRESULT, and m_pReader.

Referenced by CollectAndDeliver(), QueueSample(), and ThreadProc().

HRESULT CPullPin::PauseThread (  )  [private]

HRESULT CPullPin::StartThread ( void   )  [private]

HRESULT CPullPin::StopThread (  )  [private]

HRESULT CPullPin::QueueSample ( REFERENCE_TIME &  tCurrent,
REFERENCE_TIME  tAlignStop,
BOOL  bDiscontinuity 
) [private]

Definition at line 270 of file pullpin.cpp.

References CleanupCancelled(), FAILED, hr, HRESULT, m_pAlloc, m_pReader, NULL, OnError(), and UNITS.

Referenced by Process().

HRESULT CPullPin::CollectAndDeliver ( REFERENCE_TIME  tStart,
REFERENCE_TIME  tStop 
) [private]

Definition at line 305 of file pullpin.cpp.

References CleanupCancelled(), DeliverSample(), DWORD_PTR, FAILED, hr, HRESULT, m_pReader, NULL, and OnError().

Referenced by Process().

HRESULT CPullPin::DeliverSample ( IMediaSample *  pSample,
REFERENCE_TIME  tStart,
REFERENCE_TIME  tStop 
) [private]

Definition at line 331 of file pullpin.cpp.

References hr, HRESULT, and Receive().

Referenced by CollectAndDeliver(), and Process().

HRESULT CPullPin::Connect ( IUnknown pUnk,
IMemAllocator *  pAlloc,
BOOL  bSync 
)

HRESULT CPullPin::Disconnect ( void   ) 

Definition at line 64 of file pullpin.cpp.

References CAMThread::m_AccessLock, m_pAlloc, m_pReader, NULL, S_OK, and StopThread().

Referenced by Connect(), and ~CPullPin().

HRESULT CPullPin::DecideAllocator ( IMemAllocator *  pAlloc,
ALLOCATOR_PROPERTIES *  pProps 
) [virtual]

Definition at line 84 of file pullpin.cpp.

References hr, HRESULT, m_pAlloc, m_pReader, and NULL.

Referenced by Connect().

HRESULT CPullPin::Seek ( REFERENCE_TIME  tStart,
REFERENCE_TIME  tStop 
)

HRESULT CPullPin::Duration ( REFERENCE_TIME *  ptDuration  ) 

Definition at line 146 of file pullpin.cpp.

References m_tDuration, and S_OK.

HRESULT CPullPin::Active ( void   ) 

Definition at line 107 of file pullpin.cpp.

References ASSERT, StartThread(), and CAMThread::ThreadExists().

HRESULT CPullPin::Inactive ( void   ) 

Definition at line 114 of file pullpin.cpp.

References S_OK, and StopThread().

LONGLONG CPullPin::AlignDown ( LONGLONG  ll,
LONG  lAlign 
) [inline]

Definition at line 81 of file pullpin.h.

Referenced by Process().

LONGLONG CPullPin::AlignUp ( LONGLONG  ll,
LONG  lAlign 
) [inline]

Definition at line 86 of file pullpin.h.

Referenced by Process().

IAsyncReader* CPullPin::GetReader (  )  [inline]

Definition at line 91 of file pullpin.h.

References m_pReader.

virtual HRESULT CPullPin::Receive ( IMediaSample *   )  [virtual]

Referenced by DeliverSample().

virtual HRESULT CPullPin::EndOfStream ( void   )  [virtual]

Referenced by Process().

virtual void CPullPin::OnError ( HRESULT  hr  )  [virtual]

virtual HRESULT CPullPin::BeginFlush (  )  [virtual]

Referenced by Seek().

virtual HRESULT CPullPin::EndFlush (  )  [virtual]

Referenced by Seek().


Member Data Documentation

IAsyncReader* CPullPin::m_pReader [private]

REFERENCE_TIME CPullPin::m_tStart [private]

Definition at line 12 of file pullpin.h.

Referenced by Connect(), Process(), and Seek().

REFERENCE_TIME CPullPin::m_tStop [private]

Definition at line 13 of file pullpin.h.

Referenced by Connect(), Process(), and Seek().

REFERENCE_TIME CPullPin::m_tDuration [private]

Definition at line 14 of file pullpin.h.

Referenced by Connect(), Duration(), and Process().

BOOL CPullPin::m_bSync [private]

Definition at line 15 of file pullpin.h.

Referenced by Connect(), and Process().

Definition at line 23 of file pullpin.h.

Referenced by PauseThread(), Seek(), StartThread(), and StopThread().

IMemAllocator* CPullPin::m_pAlloc [protected]

Definition at line 59 of file pullpin.h.

Referenced by DecideAllocator(), Disconnect(), Process(), QueueSample(), StartThread(), and StopThread().


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

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