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 = 1
u <<
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 = 1
u <<
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,
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
#define IGetFrame_GetFrame(p, a)
static HRESULT WINAPI IGetFrame_fnBegin(IGetFrame *iface, LONG lStart, LONG lEnd, LONG lRate)
#define ICDecompressEnd(hic)
#define AVIERR_NOCOMPRESSOR
static ULONG WINAPI IGetFrame_fnRelease(IGetFrame *iface)
#define IGetFrame_SetFormat(p, a, b, c, d, e, f)
DWORD dwSuggestedBufferSize
static HRESULT WINAPI IGetFrame_fnQueryInterface(IGetFrame *iface, REFIID refiid, LPVOID *obj)
#define AVIERR_COMPRESSOR
#define IAVIStream_Info(p, a, b)
#define AVIStreamSampleSize(pavi, pos, psize)
#define IAVIStream_Release(p)
PGETFRAME AVIFILE_CreateGetFrame(PAVISTREAM pStream)
GLint GLint GLint GLint GLint x
struct IGetFrame * PGETFRAME
LPBITMAPINFOHEADER lpInFormat
#define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput)
#define OLE_E_ENUM_NOMORE
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)
static const WCHAR avifile[]
#define AVIGETFRAMEF_BESTDISPLAYFMT
WINE_DEFAULT_DEBUG_CHANNEL(avifile)
#define DIBWIDTHBYTES(bi)
DWORD VFWAPIV ICDecompress(HIC hic, DWORD dwFlags, LPBITMAPINFOHEADER lpbiFormat, LPVOID lpData, LPBITMAPINFOHEADER lpbi, LPVOID lpBits)
LRESULT WINAPI ICClose(HIC hic)
DWORD dwFormatChangeCount
static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface, LPBITMAPINFOHEADER lpbiWanted, LPVOID lpBits, INT x, INT y, INT dx, INT dy)
#define IAVIStream_AddRef(p)
#define IAVIStream_ReadFormat(p, a, b, c)
HRESULT WINAPI AVIStreamRead(PAVISTREAM pstream, LONG start, LONG samples, LPVOID buffer, LONG buffersize, LPLONG bytesread, LPLONG samplesread)
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
IGetFrame IGetFrame_iface
#define AVIERR_UNSUPPORTED
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static LPVOID WINAPI IGetFrame_fnGetFrame(IGetFrame *iface, LONG lPos)
#define ICMODE_DECOMPRESS
#define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput)
static const struct IGetFrameVtbl igetframeVtbl
#define InterlockedDecrement
#define mmioFOURCC(c0, c1, c2, c3)
LPBITMAPINFOHEADER lpOutFormat
#define memcpy(s1, s2, n)
#define ICDecompressBegin(hic, lpbiInput, lpbiOutput)
static void AVIFILE_CloseCompressor(IGetFrameImpl *This)
static IGetFrameImpl * impl_from_IGetFrame(IGetFrame *iface)
HIC VFWAPI ICGetDisplayFormat(HIC hic, BITMAPINFOHEADER *in, BITMAPINFOHEADER *out, int depth, int width, int height)
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 InterlockedIncrement
static ULONG WINAPI IGetFrame_fnAddRef(IGetFrame *iface)
#define IGetFrame_AddRef(p)
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
GLint GLint GLint GLint GLint GLint y
HIC VFWAPI ICLocate(DWORD type, DWORD handler, BITMAPINFOHEADER *in, BITMAPINFOHEADER *out, WORD mode)
struct _IGetFrameImpl IGetFrameImpl
#define AVISTREAMINFO_FORMATCHANGES
DWORD dwFormatChangeCount
#define IAVIStream_FindSample(p, a, b)
static HRESULT WINAPI IGetFrame_fnEnd(IGetFrame *iface)
#define HeapFree(x, y, z)
#define ICDecompressExEnd(hic)