41 UNREFERENCED_PARAMETER(phr);
52 CSource::CSource(__in_opt LPCSTR
pName, __inout_opt LPUNKNOWN lpunk, CLSID clsid, __inout HRESULT *phr)
57 UNREFERENCED_PARAMETER(phr);
85 if (paStreams ==
NULL) {
106 for (i = 0; i <
m_iPins; i++) {
140 return VFW_E_NOT_FOUND;
206 if (i<1)
return VFW_E_NOT_FOUND;
207 *Id = (LPWSTR)CoTaskMemAlloc(
sizeof(WCHAR) * 12);
209 return E_OUTOFMEMORY;
222 __in_opt LPCTSTR pObjectName,
223 __inout HRESULT *phr,
225 __in_opt LPCWSTR pPinName)
226 :
CBaseOutputPin(pObjectName, ps, ps->pStateLock(), phr, pPinName),
234 __in_opt LPCSTR pObjectName,
235 __inout HRESULT *phr,
237 __in_opt LPCWSTR pPinName)
238 :
CBaseOutputPin(pObjectName, ps, ps->pStateLock(), phr, pPinName),
265 if (mt == *pMediaType) {
286 return VFW_S_NO_MORE_ITEMS;
358 if (ThreadExists()) {
396 Reply((DWORD) E_UNEXPECTED);
400 DbgLog((
LOG_TRACE, 1, TEXT(
"CSourceStream worker thread initializing")));
404 DbgLog((
LOG_ERROR, 1, TEXT(
"CSourceStream::OnThreadCreate failed. Aborting thread.")));
424 DbgLog((
LOG_ERROR, 1, TEXT(
"CMD_RUN received before a CMD_PAUSE???")));
438 Reply((DWORD) E_NOTIMPL);
445 DbgLog((
LOG_ERROR, 1, TEXT(
"CSourceStream::OnThreadDestroy failed. Exiting thread.")));
468 IMediaSample *pSample;
493 }
else if (
hr == S_FALSE) {
515 Reply((DWORD) E_UNEXPECTED);
int FindPinNumber(__in IPin *iPin)
virtual HRESULT CheckMediaType(const CMediaType *pMediaType)
virtual HRESULT GetDeliveryBuffer(__deref_out IMediaSample **ppSample, __in_opt REFERENCE_TIME *pStartTime, __in_opt REFERENCE_TIME *pEndTime, DWORD dwFlags)
HRESULT RemovePin(__in CSourceStream *)
virtual ~CSourceStream(void)
CSourceStream ** m_paStreams
CCritSec * pStateLock(void)
CSourceStream(__in_opt LPCTSTR pObjectName, __inout HRESULT *phr, __inout CSource *pms, __in_opt LPCWSTR pName)
void WINAPI IntToWstr(int i, __out_ecount(12) LPWSTR wstr)
virtual HRESULT GetMediaType(int iPosition, __inout CMediaType *pMediaType)
virtual HRESULT Deliver(IMediaSample *)
STDMETHODIMP QueryId(__deref_out LPWSTR *Id)
#define ValidateReadWritePtr(p, cb)
virtual HRESULT OnThreadCreate(void)
BOOL CheckRequest(Command *pCom)
HRESULT AddPin(__in CSourceStream *)
HRESULT NotifyEvent(long EventCode, LONG_PTR EventParam1, LONG_PTR EventParam2)
virtual HRESULT OnThreadDestroy(void)
virtual HRESULT OnThreadStartPlay(void)
virtual DWORD ThreadProc(void)
CSource(__in_opt LPCTSTR pName, __inout_opt LPUNKNOWN lpunk, CLSID clsid, __inout HRESULT *phr)
#define CheckPointer(p, ret)
virtual HRESULT FillBuffer(IMediaSample *pSamp) PURE
STDMETHODIMP FindPin(LPCWSTR Id, __deref_out IPin **ppPin)
virtual HRESULT DoBufferProcessingLoop(void)
virtual HRESULT DeliverEndOfStream(void)