15 ( __in_opt LPCTSTR
pName, __inout_opt LPUNKNOWN pUnk, REFCLSID clsid)
18 , m_nKeyFramePeriod(0)
19 , m_nFramesSinceKeyFrame(0)
22 , m_itrAvgDecode(300000)
23 , m_bQualityChanged(FALSE)
112 AM_MEDIA_TYPE *pmtOut, *pmt;
118 IMediaSample * pOutSample;
129 #define rcS1 ((VIDEOINFOHEADER *)(pmt->pbFormat))->rcSource
130 #define rcT1 ((VIDEOINFOHEADER *)(pmt->pbFormat))->rcTarget
132 pSample->GetMediaType(&pmt);
133 if (pmt !=
NULL && pmt->pbFormat !=
NULL) {
136 ASSERT(!IsEqualGUID(pmt->majortype, GUID_NULL));
139 LONG lCompression = HEADER(pmt->pbFormat)->biCompression;
140 LONG lBitCount = HEADER(pmt->pbFormat)->biBitCount;
141 LONG lStride = (HEADER(pmt->pbFormat)->biWidth * lBitCount + 7) / 8;
142 lStride = (lStride + 3) & ~3;
144 DbgLog((
LOG_TRACE,3,TEXT(
"FourCC: %lx Compression: %lx BitCount: %ld"),
145 fccOut.
GetFOURCC(), lCompression, lBitCount));
147 HEADER(pmt->pbFormat)->biHeight,
189 #define rcS ((VIDEOINFOHEADER *)(pmtOut->pbFormat))->rcSource
190 #define rcT ((VIDEOINFOHEADER *)(pmtOut->pbFormat))->rcTarget
192 pOutSample->GetMediaType(&pmtOut);
193 if (pmtOut !=
NULL && pmtOut->pbFormat !=
NULL) {
196 ASSERT(!IsEqualGUID(pmtOut->majortype, GUID_NULL));
199 LONG lCompression = HEADER(pmtOut->pbFormat)->biCompression;
200 LONG lBitCount = HEADER(pmtOut->pbFormat)->biBitCount;
201 LONG lStride = (HEADER(pmtOut->pbFormat)->biWidth * lBitCount + 7) / 8;
202 lStride = (lStride + 3) & ~3;
204 DbgLog((
LOG_TRACE,3,TEXT(
"FourCC: %lx Compression: %lx BitCount: %ld"),
205 fccOut.
GetFOURCC(), lCompression, lBitCount));
207 HEADER(pmtOut->pbFormat)->biHeight,
227 DbgLog((
LOG_TRACE,3,TEXT(
"Output format change means we must wait for a keyframe")));
236 pOutSample->Release();
243 if (pSample->IsDiscontinuity() == S_OK) {
244 DbgLog((
LOG_TRACE,3,TEXT(
"Non-key discontinuity - wait for keyframe")));
297 pOutSample->Release();
310 pOutSample->Release();
320 REFERENCE_TIME trStart, trStopAt;
321 HRESULT
hr = pIn->GetTime(&trStart, &trStopAt);
327 int itrFrame = (int)(trStopAt - trStart);
329 if(S_OK==pIn->IsSyncPoint()) {
378 int it = (itrFrame/10000)
467 #pragma warning(disable:4514)