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) {
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) {
487 if ((pEdit !=
NULL && pEdit->bDecompress) ||
493 This->pStreams[0].dwStart);
498 &startPos, &streamNr,
TRUE)))
500 for (
n = lStart;
n < lStart + lLength; streamNr++) {
503 startPos = pEdit->pStreams[streamNr].dwStart;
504 n += pEdit->pStreams[streamNr].dwLength;
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;
573 memcpy(
This->pStreams + streamNr, pEdit->pStreams +
n,
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)
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;
#define IAVIEditStream_Copy(p, a, b, c)
HRESULT WINAPI AVIStreamReadFormat(PAVISTREAM pstream, LONG pos, LPVOID format, LPLONG formatsize)
static HRESULT WINAPI IEditAVIStream_fnReadFormat(IAVIStream *iface, LONG pos, LPVOID format, LONG *fmtsize)
static HRESULT WINAPI IEditAVIStream_fnCreate(IAVIStream *iface, LPARAM lParam1, LPARAM lParam2)
#define IAVIStream_Create(p, a, b)
#define memmove(s1, s2, n)
LPBITMAPINFOHEADER lpFrame
#define IGetFrame_SetFormat(p, a, b, c, d, e, f)
static HRESULT WINAPI IEditAVIStream_fnWriteData(IAVIStream *iface, DWORD fcc, LPVOID lp, LONG size)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
IAVIStream IAVIStream_iface
#define AVIStreamNearestKeyFrame(pavi, pos)
#define IAVIStream_Info(p, a, b)
static HRESULT WINAPI IEditAVIStream_fnWrite(IAVIStream *iface, LONG start, LONG samples, LPVOID buffer, LONG buffersize, DWORD flags, LONG *sampwritten, LONG *byteswritten)
GLuint GLuint GLsizei count
static LONG WINAPI IEditAVIStream_fnFindSample(IAVIStream *iface, LONG pos, LONG flags)
DEFINE_AVIGUID(IID_IEditStreamInternal, 0x0002000A, 0, 0)
static LPVOID AVIFILE_ReadFrame(IAVIEditStreamImpl *const This, PAVISTREAM pstream, LONG pos)
#define IAVIStream_Release(p)
static const struct IAVIStreamVtbl ieditstast
static HRESULT WINAPI IAVIEditStream_fnSetInfo(IAVIEditStream *iface, LPAVISTREAMINFOW asi, LONG size)
struct IGetFrame * PGETFRAME
#define IAVIEditStream_Cut(p, a, b, c)
#define IAVIStream_ReadData(p, a, b, c)
static const struct IAVIEditStreamVtbl ieditstream
static const WCHAR avifile[]
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define AVIStreamFormatSize(pavi, lPos, plSize)
static HRESULT WINAPI IEditAVIStream_fnQueryInterface(IAVIStream *iface, REFIID refiid, LPVOID *obj)
static IAVIEditStreamImpl * impl_from_IAVIStream(IAVIStream *iface)
#define IAVIStream_AddRef(p)
static HRESULT WINAPI IEditAVIStream_fnSetInfo(IAVIStream *iface, AVISTREAMINFOW *info, LONG len)
static ULONG WINAPI IAVIEditStream_fnRelease(IAVIEditStream *iface)
struct IAVIStream * PAVISTREAM
static HRESULT AVIFILE_FindStreamInTable(IAVIEditStreamImpl *const This, DWORD pos, PAVISTREAM *ppStream, DWORD *streamPos, DWORD *streamNr, BOOL bFindSample)
static HRESULT WINAPI IAVIEditStream_fnCopy(IAVIEditStream *iface, LONG *plStart, LONG *plLength, PAVISTREAM *ppResult)
static HRESULT WINAPI IAVIEditStream_fnClone(IAVIEditStream *iface, PAVISTREAM *ppResult)
#define IAVIStream_ReadFormat(p, a, b, c)
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)
#define AVIERR_BUFFERTOOSMALL
HRESULT WINAPI CreateEditableStream(IAVIStream **editable, IAVIStream *src)
#define AVIERR_UNSUPPORTED
static HRESULT AVIFILE_RemoveStream(IAVIEditStreamImpl *const This, DWORD nr)
#define IAVIStream_Read(p, a, b, c, d, e, f)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
EditStreamTable * pStreams
LPVOID WINAPI AVIStreamGetFrame(PGETFRAME pg, LONG pos)
static DWORD DWORD * dwLength
static IAVIEditStreamImpl * AVIFILE_CreateEditStream(IAVIStream *stream)
static HRESULT WINAPI IEditAVIStream_fnDelete(IAVIStream *iface, LONG start, LONG samples)
#define EditStreamEnd(This, streamNr)
#define IAVIEditStream_SetInfo(p, a, b)
static HRESULT WINAPI IEditAVIStream_fnInfo(IAVIStream *iface, AVISTREAMINFOW *psi, LONG size)
static HRESULT WINAPI IAVIEditStream_fnQueryInterface(IAVIEditStream *iface, REFIID refiid, LPVOID *obj)
enum _tagppResult ppResult
#define InterlockedDecrement
LONG WINAPI AVIStreamStart(PAVISTREAM pstream)
#define memcpy(s1, s2, n)
#define IAVIStream_QueryInterface(p, a, b)
static HRESULT WINAPI IAVIEditStream_fnCut(IAVIEditStream *iface, LONG *plStart, LONG *plLength, PAVISTREAM *ppResult)
IAVIEditStream IAVIEditStream_iface
static BOOL AVIFILE_FormatsEqual(PAVISTREAM avi1, PAVISTREAM avi2)
#define IAVIEditStream_Paste(p, a, b, c, d, e)
#define InterlockedIncrement
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
HRESULT WINAPI AVIStreamGetFrameClose(PGETFRAME pg)
#define IAVIEditStream_Release(p)
static HRESULT WINAPI IEditAVIStream_fnSetFormat(IAVIStream *iface, LONG pos, LPVOID format, LONG formatsize)
#define IAVIEditStream_Clone(p, a)
static HRESULT WINAPI IEditAVIStream_fnRead(IAVIStream *iface, LONG start, LONG samples, LPVOID buffer, LONG buffersize, LONG *bytesread, LONG *samplesread)
static IAVIEditStreamImpl * impl_from_IAVIEditStream(IAVIEditStream *iface)
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
static ULONG WINAPI IAVIEditStream_fnAddRef(IAVIEditStream *iface)
#define AVISTREAMINFO_FORMATCHANGES
static HRESULT WINAPI IAVIEditStream_fnPaste(IAVIEditStream *iface, LONG *plStart, LONG *plLength, PAVISTREAM pSource, LONG lStart, LONG lLength)
static ULONG WINAPI IEditAVIStream_fnRelease(IAVIStream *iface)
static HRESULT WINAPI IEditAVIStream_fnReadData(IAVIStream *iface, DWORD fcc, LPVOID lp, LONG *lpread)
WINE_DEFAULT_DEBUG_CHANNEL(avifile)
#define IAVIStream_FindSample(p, a, b)
static ULONG WINAPI IEditAVIStream_fnAddRef(IAVIStream *iface)
static SERVICE_STATUS status
struct _EditStreamTable EditStreamTable
#define HeapFree(x, y, z)
#define IAVIEditStream_QueryInterface(p, a, b)
PGETFRAME WINAPI AVIStreamGetFrameOpen(PAVISTREAM pstream, LPBITMAPINFOHEADER lpbiWanted)
#define IAVIEditStream_AddRef(p)