34#define DIBPTR(lp) ((LPBYTE)(lp) + (lp)->biSize + \
35 (lp)->biClrUsed * sizeof(RGBQUAD))
79 if (
This->lpInFormat !=
This->lpOutFormat) {
117 TRACE(
"(%p)\n", iface);
127 TRACE(
"(%p)\n", iface);
149 TRACE(
"(%p,%d)\n", iface, lPos);
162 if (!
This->bFixedStream) {
169 This->lCurrentFrame = -1;
177 bi = *
This->lpOutFormat;
189 if (lPos !=
This->lCurrentFrame) {
194 if (lNext <= This->lCurrentFrame &&
This->lCurrentFrame < lPos)
195 lNext =
This->lCurrentFrame + 1;
197 for (; lNext <= lPos; lNext++) {
199 if (
This->bFormatChanges) {
201 This->lpInFormat, &
This->cbInFormat);
203 if (
This->lpOutFormat->biBitCount <= 8)
211 This->cbInBuffer, &readBytes, &readSamples))) {
216 if (readBytes <= 0) {
217 ERR(
": IAVIStream::Read doesn't return needed bytes!\n");
222 if (
This->cbInBuffer >= readBytes)
224 This->cbInBuffer =
This->cbInFormat + readBytes;
231 if (readSamples != 1) {
232 ERR(
": no frames read\n");
235 if (readBytes != 0) {
236 This->lpInFormat->biSizeImage = readBytes;
240 This->lCurrentFrame = lPos;
241 return This->lpInFormat;
246 This->lpInFormat->biWidth,
This->lpInFormat->biHeight,
251 This->lpOutFormat,
This->lpOutBuffer);
265 TRACE(
"(%p,%d,%d,%d)\n", iface, lStart, lEnd, lRate);
276 TRACE(
"(%p)\n", iface);
294 TRACE(
"(%p,%p,%p,%d,%d,%d,%d)\n", iface, lpbiWanted, lpBits,
312 This->lCurrentFrame = -1;
319 if (
This->cbInBuffer == 0)
320 This->cbInBuffer = 1024;
341 if (
This->lpInFormat->biClrUsed == 0 &&
This->lpInFormat->biBitCount <= 8)
342 This->lpInFormat->biClrUsed = 1u <<
This->lpInFormat->biBitCount;
343 if (
This->lpInFormat->biSizeImage == 0 &&
345 This->lpInFormat->biSizeImage =
350 if (
This->lpInFormat->biCompression ==
BI_RGB && lpBits ==
NULL) {
356 This->lpOutFormat =
This->lpInFormat;
376 if (
This->lpInFormat->biCompression ==
BI_RGB)
378 else if (
This->lpInFormat->biCompression ==
BI_RLE8)
413 This->lpOutFormat) < 0) {
420 if (
This->lpOutFormat->biClrUsed == 0 &&
421 This->lpOutFormat->biBitCount <= 8)
422 This->lpOutFormat->biClrUsed = 1u <<
This->lpOutFormat->biBitCount;
423 if (
This->lpOutFormat->biSizeImage == 0 &&
425 This->lpOutFormat->biSizeImage =
429 if (lpBits ==
NULL) {
432 size +=
This->lpOutFormat->biSize +
This->lpOutFormat->biSizeImage;
440 This->lpOutBuffer = lpBits;
444 dx =
This->lpOutFormat->biWidth;
446 dy =
This->lpOutFormat->biHeight;
449 if (
x != 0 ||
y != 0) {
450 if (
dy ==
This->lpOutFormat->biHeight &&
451 dx ==
This->lpOutFormat->biWidth)
464 0,
This->lpInFormat->biWidth,
465 This->lpInFormat->biHeight,
This->lpOutFormat,
#define InterlockedIncrement
#define InterlockedDecrement
#define DIBWIDTHBYTES(bi)
static const WCHAR avifile[]
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
HRESULT WINAPI AVIStreamRead(PAVISTREAM pstream, LONG start, LONG samples, LPVOID buffer, LONG buffersize, LPLONG bytesread, LPLONG samplesread)
#define HeapFree(x, y, z)
static const struct IGetFrameVtbl igetframeVtbl
static void AVIFILE_CloseCompressor(IGetFrameImpl *This)
static HRESULT WINAPI IGetFrame_fnBegin(IGetFrame *iface, LONG lStart, LONG lEnd, LONG lRate)
static ULONG WINAPI IGetFrame_fnAddRef(IGetFrame *iface)
PGETFRAME AVIFILE_CreateGetFrame(PAVISTREAM pStream)
static HRESULT WINAPI IGetFrame_fnEnd(IGetFrame *iface)
static ULONG WINAPI IGetFrame_fnRelease(IGetFrame *iface)
static IGetFrameImpl * impl_from_IGetFrame(IGetFrame *iface)
static HRESULT WINAPI IGetFrame_fnQueryInterface(IGetFrame *iface, REFIID refiid, LPVOID *obj)
static LPVOID WINAPI IGetFrame_fnGetFrame(IGetFrame *iface, LONG lPos)
struct _IGetFrameImpl IGetFrameImpl
static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface, LPBITMAPINFOHEADER lpbiWanted, LPVOID lpBits, INT x, INT y, INT dx, INT dy)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
#define memcpy(s1, s2, n)
#define mmioFOURCC(c0, c1, c2, c3)
DWORD VFWAPIV ICDecompress(HIC hic, DWORD dwFlags, LPBITMAPINFOHEADER lpbiFormat, LPVOID lpData, LPBITMAPINFOHEADER lpbi, LPVOID lpBits)
HIC VFWAPI ICLocate(DWORD type, DWORD handler, BITMAPINFOHEADER *in, BITMAPINFOHEADER *out, WORD mode)
HIC VFWAPI ICGetDisplayFormat(HIC hic, BITMAPINFOHEADER *in, BITMAPINFOHEADER *out, int depth, int width, int height)
LRESULT WINAPI ICClose(HIC hic)
#define IsEqualGUID(rguid1, rguid2)
DWORD dwSuggestedBufferSize
DWORD dwFormatChangeCount
IGetFrame IGetFrame_iface
LPBITMAPINFOHEADER lpOutFormat
DWORD dwFormatChangeCount
LPBITMAPINFOHEADER lpInFormat
#define CONTAINING_RECORD(address, type, field)
#define ICDecompressExEnd(hic)
#define ICMODE_DECOMPRESS
static LRESULT VFWAPI ICDecompressEx(_In_ HIC hic, _In_ DWORD dwFlags, _In_ LPBITMAPINFOHEADER lpbiSrc, _In_reads_bytes_(lpbiSrc->biSizeImage) LPVOID lpSrc, _In_ int xSrc, _In_ int ySrc, _In_ int dxSrc, _In_ int dySrc, _In_ LPBITMAPINFOHEADER lpbiDst, _Out_writes_bytes_(lpbiDst->biSizeImage) LPVOID lpDst, _In_ int xDst, _In_ int yDst, _In_ int dxDst, _In_ int dyDst)
#define IAVIStream_AddRef(p)
#define AVIERR_NOCOMPRESSOR
#define AVISTREAMINFO_FORMATCHANGES
#define AVIERR_UNSUPPORTED
#define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput)
#define IGetFrame_SetFormat(p, a, b, c, d, e, f)
#define AVIStreamSampleSize(pavi, pos, psize)
#define IGetFrame_AddRef(p)
#define IGetFrame_GetFrame(p, a)
#define IAVIStream_ReadFormat(p, a, b, c)
#define ICDecompressBegin(hic, lpbiInput, lpbiOutput)
#define AVIGETFRAMEF_BESTDISPLAYFMT
#define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput)
#define ICDecompressEnd(hic)
static LRESULT VFWAPI ICDecompressExBegin(_In_ HIC hic, _In_ DWORD dwFlags, _In_ LPBITMAPINFOHEADER lpbiSrc, _In_opt_ LPVOID lpSrc, _In_ int xSrc, _In_ int ySrc, _In_ int dxSrc, _In_ int dySrc, _In_ LPBITMAPINFOHEADER lpbiDst, _Out_opt_ LPVOID lpDst, _In_ int xDst, _In_ int yDst, _In_ int dxDst, _In_ int dyDst)
#define AVIERR_COMPRESSOR
#define IAVIStream_Release(p)
#define IAVIStream_Info(p, a, b)
struct IGetFrame * PGETFRAME
#define IAVIStream_FindSample(p, a, b)
#define OLE_E_ENUM_NOMORE