50#define EditStreamEnd(This,streamNr) ((This)->pStreams[streamNr].dwStart + \
51 (This)->pStreams[streamNr].dwLength)
94 TRACE(
"(%p,%u,%p,%p,%p,%d)\n",
This,
pos,ppStream,streamPos,
95 streamNr,bFindSample);
97 if (pos < This->sInfo.dwStart)
101 for (
n = 0;
n <
This->nStreams;
n++) {
103 *ppStream =
This->pStreams[
n].pStream;
104 *streamPos =
This->pStreams[
n].dwStart +
pos;
105 if (streamNr !=
NULL)
112 if (
pos == 0 && bFindSample) {
113 *ppStream =
This->pStreams[--
n].pStream;
115 if (streamNr !=
NULL)
118 TRACE(
" -- pos=0 && b=1 -> (%p,%u,%u)\n",*ppStream, *streamPos,
n);
123 if (streamNr !=
NULL)
126 TRACE(
" -> ERROR (NULL,0,0)\n");
142 if (
This->pCurStream != pstream) {
149 ERR(
": IGetFrame_SetFormat failed\n");
155 This->pCurStream = pstream;
161 This->sInfo.dwSuggestedBufferSize =
This->lpFrame->biSizeImage;
163 return This->lpFrame;
176 (
This->nStreams -
nr) *
sizeof(
This->pStreams[0]));
178 This->pStreams[
This->nStreams].dwStart = 0;
179 This->pStreams[
This->nStreams].dwLength = 0;
182 if (0 <
nr && 0 <
This->nStreams &&
183 This->pStreams[
nr - 1].pStream ==
This->pStreams[
nr].pStream) {
185 This->pStreams[
nr - 1].dwLength +=
This->pStreams[
nr].dwLength;
196 LONG size1, size2, start1, start2;
245 *
obj = &
This->IAVIStream_iface;
277 for (
i = 0;
i <
This->nStreams;
i++) {
301 if (plStart ==
NULL || plLength ==
NULL || *plStart < 0)
317 &streamPos, &streamNr,
FALSE);
320 if (
This->pStreams[streamNr].dwStart == streamPos) {
322 if (len < This->pStreams[streamNr].
dwLength) {
324 This->pStreams[streamNr].dwStart +=
len;
325 This->pStreams[streamNr].dwLength -=
len;
333 len -=
This->pStreams[streamNr].dwLength;
341 This->pStreams[streamNr].dwLength =
342 streamPos -
This->pStreams[streamNr].dwStart;
345 if (
This->nStreams + 1 >=
This->nTableSize) {
350 This->nTableSize += 32;
357 This->pStreams[streamNr + 1].dwStart = streamPos +
len;
358 This->pStreams[streamNr + 1].dwLength =
361 This->pStreams[streamNr].dwLength =
362 streamPos -
This->pStreams[streamNr].dwStart;
368 This->sInfo.dwEditCount++;
386 if (plStart ==
NULL || plLength ==
NULL || *plStart < 0 || *plLength < 0)
407 *plStart, *plStart + *plLength);
428 TRACE(
"(%p,%p,%p,%p,%d,%d)\n",iface,plStart,plLength,
429 pSource,lStart,lLength);
433 if (plStart ==
NULL || *plStart < 0)
435 if (
This->sInfo.dwStart +
This->sInfo.dwLength < *plStart)
439 if (lStart < srcInfo.dwStart || lStart >= srcInfo.
dwStart + srcInfo.
dwLength)
441 if (
This->sInfo.fccType == 0) {
444 This->sInfo.dwStart = *plStart;
445 This->sInfo.dwLength = 0;
453 if (lLength + *plStart >= 0x80000000)
461 if (
size !=
This->sInfo.rcFrame.right -
This->sInfo.rcFrame.left)
464 if (
size !=
This->sInfo.rcFrame.bottom -
This->sInfo.rcFrame.top)
480 if (!
This->bDecompress) {
493 This->pStreams[0].dwStart);
498 &startPos, &streamNr,
TRUE)))
500 for (
n = lStart;
n < lStart + lLength; streamNr++) {
510 This->sInfo.fccHandler = 0;
521 &endPos, &nLastStream,
TRUE);
523 &startPos, &streamNr,
FALSE);
524 if (nLastStream == streamNr)
536 This->nTableSize =
n;
539 if (plLength !=
NULL)
543 if (
This->sInfo.dwStart +
This->sInfo.dwLength > *plStart) {
545 &startPos, &streamNr,
FALSE);
546 if (startPos !=
This->pStreams[streamNr].dwStart) {
549 This->pStreams + streamNr,
552 This->pStreams[streamNr + 2].dwLength =
554 This->pStreams[streamNr + 2].dwStart = startPos;
555 This->pStreams[streamNr].dwLength =
556 startPos -
This->pStreams[streamNr].dwStart;
565 streamNr =
This->nStreams;
575 if (
This->pStreams[streamNr].dwStart < startPos) {
576 This->pStreams[streamNr].dwLength =
578 This->pStreams[streamNr].dwStart = startPos;
585 This->pStreams[streamNr].pStream = pSource;
586 This->pStreams[streamNr].dwStart = lStart;
587 This->pStreams[streamNr].dwLength = lLength;
592 if (0 < streamNr +
n &&
593 This->pStreams[streamNr +
n - 1].pStream !=
This->pStreams[streamNr +
n].pStream) {
595 This->sInfo.dwFormatChangeCount++;
598 This->sInfo.dwEditCount++;
599 This->sInfo.dwLength += lLength;
632 for (
i = 0;
i <
This->nStreams;
i++) {
661 This->sInfo.dwEditCount++;
708 This->nTableSize = 256;
715 This->pStreams[0].dwStart =
This->sInfo.dwStart;
716 This->pStreams[0].dwLength =
This->sInfo.dwLength;
734 if (
This->bDecompress)
735 This->sInfo.fccHandler = 0;
749 DWORD streamPos, streamNr;
766 if (
This->bDecompress) {
790 if (fmtsize ==
NULL || pos < This->sInfo.dwStart ||
799 if (!
This->bDecompress)
834 DWORD streamPos, streamNr;
838 TRACE(
"(%p,%d,%d,%p,%d,%p,%p) -- 0x%08X\n",iface,
start,
samples,
839 buffer,buffersize,bytesread,samplesread,
This->sInfo.fccType);
842 if (bytesread !=
NULL)
844 if (samplesread !=
NULL)
848 if ((
DWORD)start < This->sInfo.dwStart ||
852 if (!
This->bDecompress) {
859 &streamPos, &streamNr,
FALSE)))
868 &readBytes, &readSamples);
871 if (readBytes == 0 && readSamples == 0 &&
count != 0)
874 if (samplesread !=
NULL)
875 *samplesread += readSamples;
876 if (bytesread !=
NULL)
877 *bytesread += readBytes;
880 buffersize -= readBytes;
884 }
while (
This->sInfo.dwStart +
This->sInfo.dwLength >
start);
893 &streamPos, &streamNr,
FALSE)))
909 if (buffersize < lp->biSizeImage)
914 if (bytesread !=
NULL)
916 if (samplesread !=
NULL)
928 TRACE(
"(%p,%d,%d,%p,%d,0x%08X,%p,%p)\n",iface,
start,
samples,
buffer,
929 buffersize,
flags,sampwritten,byteswritten);
932 if (sampwritten !=
NULL)
934 if (byteswritten !=
NULL)
956 TRACE(
"(%p,0x%08X,%p,%p)\n",iface,fcc,lp,lpread);
963 for (
n = 0;
n <
This->nStreams;
n++) {
977 TRACE(
"(%p,0x%08X,%p,%d)\n",iface,fcc,lp,
size);
1031 IAVIEditStream *edit =
NULL;
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define InterlockedIncrement
#define InterlockedDecrement
static const WCHAR avifile[]
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
PGETFRAME WINAPI AVIStreamGetFrameOpen(PAVISTREAM pstream, LPBITMAPINFOHEADER lpbiWanted)
HRESULT WINAPI AVIStreamGetFrameClose(PGETFRAME pg)
LONG WINAPI AVIStreamStart(PAVISTREAM pstream)
LPVOID WINAPI AVIStreamGetFrame(PGETFRAME pg, LONG pos)
HRESULT WINAPI AVIStreamReadFormat(PAVISTREAM pstream, LONG pos, LPVOID format, LPLONG formatsize)
#define HeapFree(x, y, z)
static DWORD DWORD * dwLength
static HRESULT AVIFILE_RemoveStream(IAVIEditStreamImpl *const This, DWORD nr)
static HRESULT WINAPI IEditAVIStream_fnDelete(IAVIStream *iface, LONG start, LONG samples)
static HRESULT WINAPI IEditAVIStream_fnQueryInterface(IAVIStream *iface, REFIID refiid, LPVOID *obj)
static const struct IAVIEditStreamVtbl ieditstream
static IAVIEditStreamImpl * impl_from_IAVIStream(IAVIStream *iface)
static HRESULT WINAPI IEditAVIStream_fnRead(IAVIStream *iface, LONG start, LONG samples, LPVOID buffer, LONG buffersize, LONG *bytesread, LONG *samplesread)
static HRESULT WINAPI IAVIEditStream_fnSetInfo(IAVIEditStream *iface, LPAVISTREAMINFOW asi, LONG size)
static HRESULT WINAPI IEditAVIStream_fnInfo(IAVIStream *iface, AVISTREAMINFOW *psi, LONG size)
static HRESULT WINAPI IEditAVIStream_fnWrite(IAVIStream *iface, LONG start, LONG samples, LPVOID buffer, LONG buffersize, DWORD flags, LONG *sampwritten, LONG *byteswritten)
static HRESULT WINAPI IAVIEditStream_fnQueryInterface(IAVIEditStream *iface, REFIID refiid, LPVOID *obj)
static IAVIEditStreamImpl * AVIFILE_CreateEditStream(IAVIStream *stream)
static ULONG WINAPI IAVIEditStream_fnAddRef(IAVIEditStream *iface)
static HRESULT WINAPI IEditAVIStream_fnSetInfo(IAVIStream *iface, AVISTREAMINFOW *info, LONG len)
static HRESULT WINAPI IEditAVIStream_fnReadFormat(IAVIStream *iface, LONG pos, LPVOID format, LONG *fmtsize)
static BOOL AVIFILE_FormatsEqual(PAVISTREAM avi1, PAVISTREAM avi2)
static HRESULT AVIFILE_FindStreamInTable(IAVIEditStreamImpl *const This, DWORD pos, PAVISTREAM *ppStream, DWORD *streamPos, DWORD *streamNr, BOOL bFindSample)
static const struct IAVIStreamVtbl ieditstast
static HRESULT WINAPI IAVIEditStream_fnCut(IAVIEditStream *iface, LONG *plStart, LONG *plLength, PAVISTREAM *ppResult)
static ULONG WINAPI IEditAVIStream_fnRelease(IAVIStream *iface)
static HRESULT WINAPI IEditAVIStream_fnReadData(IAVIStream *iface, DWORD fcc, LPVOID lp, LONG *lpread)
static IAVIEditStreamImpl * impl_from_IAVIEditStream(IAVIEditStream *iface)
static ULONG WINAPI IAVIEditStream_fnRelease(IAVIEditStream *iface)
static HRESULT WINAPI IEditAVIStream_fnWriteData(IAVIStream *iface, DWORD fcc, LPVOID lp, LONG size)
static LONG WINAPI IEditAVIStream_fnFindSample(IAVIStream *iface, LONG pos, LONG flags)
static HRESULT WINAPI IAVIEditStream_fnPaste(IAVIEditStream *iface, LONG *plStart, LONG *plLength, PAVISTREAM pSource, LONG lStart, LONG lLength)
static HRESULT WINAPI IEditAVIStream_fnSetFormat(IAVIStream *iface, LONG pos, LPVOID format, LONG formatsize)
static HRESULT WINAPI IAVIEditStream_fnClone(IAVIEditStream *iface, PAVISTREAM *ppResult)
static HRESULT WINAPI IAVIEditStream_fnCopy(IAVIEditStream *iface, LONG *plStart, LONG *plLength, PAVISTREAM *ppResult)
#define EditStreamEnd(This, streamNr)
struct _EditStreamTable EditStreamTable
static LPVOID AVIFILE_ReadFrame(IAVIEditStreamImpl *const This, PAVISTREAM pstream, LONG pos)
static ULONG WINAPI IEditAVIStream_fnAddRef(IAVIStream *iface)
HRESULT WINAPI CreateEditableStream(IAVIStream **editable, IAVIStream *src)
static HRESULT WINAPI IEditAVIStream_fnCreate(IAVIStream *iface, LPARAM lParam1, LPARAM lParam2)
GLuint GLuint GLsizei count
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 const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
enum _tagppResult ppResult
#define IsEqualGUID(rguid1, rguid2)
EditStreamTable * pStreams
IAVIStream IAVIStream_iface
LPBITMAPINFOHEADER lpFrame
IAVIEditStream IAVIEditStream_iface
#define CONTAINING_RECORD(address, type, field)
#define IAVIEditStream_AddRef(p)
#define IAVIStream_AddRef(p)
#define AVISTREAMINFO_FORMATCHANGES
#define IAVIStream_QueryInterface(p, a, b)
#define AVIERR_UNSUPPORTED
#define IGetFrame_SetFormat(p, a, b, c, d, e, f)
#define DEFINE_AVIGUID(name, l, w1, w2)
#define IAVIEditStream_Copy(p, a, b, c)
#define IAVIEditStream_Clone(p, a)
#define IAVIStream_Read(p, a, b, c, d, e, f)
#define IAVIEditStream_SetInfo(p, a, b)
#define IAVIStream_ReadFormat(p, a, b, c)
#define IAVIEditStream_QueryInterface(p, a, b)
#define IAVIStream_ReadData(p, a, b, c)
#define AVIStreamFormatSize(pavi, lPos, plSize)
#define IAVIStream_Create(p, a, b)
#define AVIStreamNearestKeyFrame(pavi, pos)
struct IAVIStream * PAVISTREAM
#define IAVIEditStream_Paste(p, a, b, c, d, e)
#define IAVIEditStream_Cut(p, a, b, c)
#define AVIERR_BUFFERTOOSMALL
#define IAVIStream_Release(p)
#define IAVIStream_Info(p, a, b)
struct IGetFrame * PGETFRAME
#define IAVIEditStream_Release(p)
#define IAVIStream_FindSample(p, a, b)