108{
120
122 hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
124 {
125 ERR(
"Cannot get pointer to sample data (%x)\n",
hr);
127 }
128
129 cbSrcStream = IMediaSample_GetActualDataLength(pSample);
130
131 TRACE(
"Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream);
132
133 hr = IPin_ConnectionMediaType(
This->tf.ppPins[0], &amt);
135 ERR(
"Unable to retrieve media type\n");
137 }
138
139
140 This->pBihIn->biSizeImage = cbSrcStream;
141
144 ERR(
"Unable to get delivery buffer (%x)\n",
hr);
146 }
147
148 hr = IMediaSample_SetActualDataLength(pOutSample, 0);
150
151 hr = IMediaSample_GetPointer(pOutSample, &pbDstStream);
153 ERR(
"Unable to get pointer to buffer (%x)\n",
hr);
155 }
156 cbDstStream = IMediaSample_GetSize(pOutSample);
157 if (cbDstStream < This->pBihOut->biSizeImage) {
158 ERR(
"Sample size is too small %d < %d\n", cbDstStream,
This->pBihOut->biSizeImage);
161 }
162
163 if (IMediaSample_IsPreroll(pSample) ==
S_OK)
165 if (IMediaSample_IsSyncPoint(pSample) !=
S_OK)
167 hr = IMediaSample_GetTime(pSample, &tStart, &tStop);
170
173 ERR(
"Error occurred during the decompression (%x)\n",
res);
174
175
179 }
180
181 IMediaSample_SetActualDataLength(pOutSample,
This->pBihOut->biSizeImage);
182
183 IMediaSample_SetPreroll(pOutSample, (IMediaSample_IsPreroll(pSample) ==
S_OK));
184 IMediaSample_SetDiscontinuity(pOutSample, (IMediaSample_IsDiscontinuity(pSample) ==
S_OK));
185 IMediaSample_SetSyncPoint(pOutSample, (IMediaSample_IsSyncPoint(pSample) ==
S_OK));
186
188 IMediaSample_SetTime(pOutSample, &tStart, &tStop);
190 IMediaSample_SetTime(pOutSample, &tStart,
NULL);
191 else
192 IMediaSample_SetTime(pOutSample,
NULL,
NULL);
193
194 if (IMediaSample_GetMediaTime(pSample, &tStart, &tStop) ==
S_OK)
195 IMediaSample_SetMediaTime(pOutSample, &tStart, &tStop);
196 else
197 IMediaSample_SetMediaTime(pOutSample,
NULL,
NULL);
198
203 ERR(
"Error sending sample (%x)\n",
hr);
204
206 if (pOutSample)
207 IMediaSample_Release(pOutSample);
208
211}
static int AVIDec_DropSample(AVIDecImpl *This, REFERENCE_TIME tStart)
DWORD VFWAPIV ICDecompress(HIC hic, DWORD dwFlags, LPBITMAPINFOHEADER lpbiFormat, LPVOID lpData, LPBITMAPINFOHEADER lpbi, LPVOID lpBits)
HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample *pSample)
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin *This, IMediaSample **ppSample, REFERENCE_TIME *tStart, REFERENCE_TIME *tStop, DWORD dwFlags)
#define ICDECOMPRESS_NOTKEYFRAME
#define ICDECOMPRESS_PREROLL
#define ICDECOMPRESS_HURRYUP
#define VFW_S_NO_STOP_TIME
#define VFW_E_NOT_CONNECTED