#include <pullpin.h>

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 |
Definition at line 9 of file pullpin.h.
enum CPullPin::ThreadMsg [private] |
| CPullPin::CPullPin | ( | ) |
Definition at line 9 of file pullpin.cpp.
| CPullPin::~CPullPin | ( | ) | [virtual] |
| DWORD CPullPin::ThreadProc | ( | void | ) | [private, virtual] |
Implements CAMThread.
Definition at line 237 of file pullpin.cpp.
References CleanupCancelled(), CAMThread::GetRequest(), m_pReader, Process(), CAMThread::Reply(), S_OK, TM_Exit, TM_Pause, and TM_Start.
| void CPullPin::Process | ( | void | ) | [private] |
Definition at line 355 of file pullpin.cpp.
References AlignDown(), AlignUp(), BOOL, CAMThread::CheckRequest(), CollectAndDeliver(), DeliverSample(), EndOfStream(), FAILED, FALSE, hr, HRESULT, m_bSync, m_pAlloc, m_pReader, m_tDuration, m_tStart, m_tStop, NULL, OnError(), QueueSample(), S_OK, TRUE, and UNITS.
Referenced by ThreadProc().
| 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] |
Definition at line 182 of file pullpin.cpp.
References CAMThread::CallWorker(), FAILED, hr, HRESULT, CAMThread::m_AccessLock, m_pReader, m_State, CAMThread::ThreadExists(), and TM_Pause.
Referenced by Seek().
| HRESULT CPullPin::StartThread | ( | void | ) | [private] |
Definition at line 153 of file pullpin.cpp.
References CAMThread::CallWorker(), CAMThread::Create(), E_FAIL, FAILED, hr, HRESULT, CAMThread::m_AccessLock, m_pAlloc, m_pReader, m_State, CAMThread::ThreadExists(), and TM_Start.
| HRESULT CPullPin::StopThread | ( | ) | [private] |
Definition at line 205 of file pullpin.cpp.
References CAMThread::CallWorker(), CAMThread::Close(), FAILED, hr, HRESULT, CAMThread::m_AccessLock, m_pAlloc, m_pReader, m_State, S_FALSE, S_OK, CAMThread::ThreadExists(), and TM_Exit.
Referenced by Disconnect(), and Inactive().
| HRESULT CPullPin::QueueSample | ( | REFERENCE_TIME & | tCurrent, | |
| REFERENCE_TIME | tAlignStop, | |||
| BOOL | bDiscontinuity | |||
| ) | [private] |
| 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 | |||
| ) |
Definition at line 24 of file pullpin.cpp.
References DecideAllocator(), Disconnect(), FAILED, hr, HRESULT, CAMThread::m_AccessLock, m_bSync, m_pReader, m_tDuration, m_tStart, m_tStop, NULL, IUnknown::QueryInterface(), S_OK, and UNITS.
| 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] |
| HRESULT CPullPin::Seek | ( | REFERENCE_TIME | tStart, | |
| REFERENCE_TIME | tStop | |||
| ) |
Definition at line 122 of file pullpin.cpp.
References BeginFlush(), EndFlush(), hr, HRESULT, CAMThread::m_AccessLock, m_State, m_tStart, m_tStop, PauseThread(), S_OK, StartThread(), and TM_Start.
| HRESULT CPullPin::Duration | ( | REFERENCE_TIME * | ptDuration | ) |
| HRESULT CPullPin::Active | ( | void | ) |
Definition at line 107 of file pullpin.cpp.
References ASSERT, StartThread(), and CAMThread::ThreadExists().
| HRESULT CPullPin::Inactive | ( | void | ) |
| IAsyncReader* CPullPin::GetReader | ( | ) | [inline] |
| 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] |
Referenced by CollectAndDeliver(), Process(), and QueueSample().
| virtual HRESULT CPullPin::BeginFlush | ( | ) | [virtual] |
Referenced by Seek().
| virtual HRESULT CPullPin::EndFlush | ( | ) | [virtual] |
Referenced by Seek().
IAsyncReader* CPullPin::m_pReader [private] |
Definition at line 11 of file pullpin.h.
Referenced by CleanupCancelled(), CollectAndDeliver(), Connect(), DecideAllocator(), Disconnect(), GetReader(), PauseThread(), Process(), QueueSample(), StartThread(), StopThread(), and ThreadProc().
REFERENCE_TIME CPullPin::m_tStart [private] |
REFERENCE_TIME CPullPin::m_tStop [private] |
REFERENCE_TIME CPullPin::m_tDuration [private] |
BOOL CPullPin::m_bSync [private] |
ThreadMsg CPullPin::m_State [private] |
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().
1.5.6