mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 22:47:28 +00:00
[AVIFIL32] Sync with Wine Staging 1.7.55. CORE-10536
svn path=/trunk/; revision=69922
This commit is contained in:
parent
807f828f6e
commit
dccc8e488c
|
@ -2256,17 +2256,85 @@ HRESULT WINAPI AVIPutFileOnClipboard(PAVIFILE pfile)
|
|||
HRESULT WINAPIV AVISaveA(LPCSTR szFile, CLSID * pclsidHandler, AVISAVECALLBACK lpfnCallback,
|
||||
int nStreams, PAVISTREAM pavi, LPAVICOMPRESSOPTIONS lpOptions, ...)
|
||||
{
|
||||
FIXME("(%s,%p,%p,0x%08x,%p,%p), stub!\n", debugstr_a(szFile), pclsidHandler, lpfnCallback,
|
||||
va_list vl;
|
||||
int i;
|
||||
HRESULT ret;
|
||||
PAVISTREAM *streams;
|
||||
LPAVICOMPRESSOPTIONS *options;
|
||||
|
||||
TRACE("(%s,%p,%p,%d,%p,%p)\n", debugstr_a(szFile), pclsidHandler, lpfnCallback,
|
||||
nStreams, pavi, lpOptions);
|
||||
|
||||
return AVIERR_UNSUPPORTED;
|
||||
if (nStreams <= 0) return AVIERR_BADPARAM;
|
||||
|
||||
streams = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(void *));
|
||||
options = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(void *));
|
||||
if (!streams || !options)
|
||||
{
|
||||
ret = AVIERR_MEMORY;
|
||||
goto error;
|
||||
}
|
||||
|
||||
streams[0] = pavi;
|
||||
options[0] = lpOptions;
|
||||
|
||||
va_start(vl, lpOptions);
|
||||
for (i = 1; i < nStreams; i++)
|
||||
{
|
||||
streams[i] = va_arg(vl, void *);
|
||||
options[i] = va_arg(vl, void *);
|
||||
}
|
||||
va_end(vl);
|
||||
|
||||
for (i = 0; i < nStreams; i++)
|
||||
TRACE("Pair[%d] - Stream = %p, Options = %p\n", i, streams[i], options[i]);
|
||||
|
||||
ret = AVISaveVA(szFile, pclsidHandler, lpfnCallback, nStreams, streams, options);
|
||||
error:
|
||||
HeapFree(GetProcessHeap(), 0, streams);
|
||||
HeapFree(GetProcessHeap(), 0, options);
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT WINAPIV AVISaveW(LPCWSTR szFile, CLSID * pclsidHandler, AVISAVECALLBACK lpfnCallback,
|
||||
int nStreams, PAVISTREAM pavi, LPAVICOMPRESSOPTIONS lpOptions, ...)
|
||||
{
|
||||
FIXME("(%s,%p,%p,0x%08x,%p,%p), stub!\n", debugstr_w(szFile), pclsidHandler, lpfnCallback,
|
||||
va_list vl;
|
||||
int i;
|
||||
HRESULT ret;
|
||||
PAVISTREAM *streams;
|
||||
LPAVICOMPRESSOPTIONS *options;
|
||||
|
||||
TRACE("(%s,%p,%p,%d,%p,%p)\n", debugstr_w(szFile), pclsidHandler, lpfnCallback,
|
||||
nStreams, pavi, lpOptions);
|
||||
|
||||
return AVIERR_UNSUPPORTED;
|
||||
if (nStreams <= 0) return AVIERR_BADPARAM;
|
||||
|
||||
streams = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(void *));
|
||||
options = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(void *));
|
||||
if (!streams || !options)
|
||||
{
|
||||
ret = AVIERR_MEMORY;
|
||||
goto error;
|
||||
}
|
||||
|
||||
streams[0] = pavi;
|
||||
options[0] = lpOptions;
|
||||
|
||||
va_start(vl, lpOptions);
|
||||
for (i = 1; i < nStreams; i++)
|
||||
{
|
||||
streams[i] = va_arg(vl, void *);
|
||||
options[i] = va_arg(vl, void *);
|
||||
}
|
||||
va_end(vl);
|
||||
|
||||
for (i = 0; i < nStreams; i++)
|
||||
TRACE("Pair[%d] - Stream = %p, Options = %p\n", i, streams[i], options[i]);
|
||||
|
||||
ret = AVISaveVW(szFile, pclsidHandler, lpfnCallback, nStreams, streams, options);
|
||||
error:
|
||||
HeapFree(GetProcessHeap(), 0, streams);
|
||||
HeapFree(GetProcessHeap(), 0, options);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1968,13 +1968,17 @@ static HRESULT AVIFILE_ParseIndex(const IAVIFileImpl *This, AVIINDEXENTRY *lp,
|
|||
if (nStream > This->fInfo.dwStreams)
|
||||
return AVIERR_BADFORMAT;
|
||||
|
||||
/* Video frames can be either indexed in a relative position to the
|
||||
* "movi" chunk or in a absolute position in the file. If the index
|
||||
* is relative the frame offset will always be so small that it will
|
||||
* virtually never reach the "movi" offset so we can detect if the
|
||||
* video is relative very fast.
|
||||
*/
|
||||
if (*bAbsolute && lp->dwChunkOffset < This->dwMoviChunkPos)
|
||||
*bAbsolute = FALSE;
|
||||
|
||||
if (*bAbsolute)
|
||||
lp->dwChunkOffset += sizeof(DWORD);
|
||||
else
|
||||
lp->dwChunkOffset += pos;
|
||||
if (!*bAbsolute)
|
||||
lp->dwChunkOffset += pos; /* make the offset absolute */
|
||||
|
||||
if (FAILED(AVIFILE_AddFrame(This->ppStreams[nStream], lp->ckid, lp->dwChunkLength, lp->dwChunkOffset, lp->dwFlags)))
|
||||
return AVIERR_MEMORY;
|
||||
|
|
|
@ -756,11 +756,11 @@ static HRESULT AVIFILE_EncodeFrame(IAVIStreamImpl *This,
|
|||
if (This->lKeyFrameEvery != 0) {
|
||||
if (This->lCurrent == This->sInfo.dwStart) {
|
||||
if (idxFlags & AVIIF_KEYFRAME) {
|
||||
/* for keyframes allow to consume all unused bytes */
|
||||
/* allow keyframes to consume all unused bytes */
|
||||
dwRequest = This->dwBytesPerFrame + This->dwUnusedBytes;
|
||||
This->dwUnusedBytes = 0;
|
||||
} else {
|
||||
/* for non-keyframes only allow something of the unused bytes to be consumed */
|
||||
/* for non-keyframes only allow some of the unused bytes to be consumed */
|
||||
DWORD tmp1 = 0;
|
||||
DWORD tmp2;
|
||||
|
||||
|
@ -782,8 +782,8 @@ static HRESULT AVIFILE_EncodeFrame(IAVIStreamImpl *This,
|
|||
dwRequest = MAX_FRAMESIZE;
|
||||
}
|
||||
|
||||
/* must we check for framesize to gain requested
|
||||
* datarate or could we trust codec? */
|
||||
/* must we check for frame size to gain the requested
|
||||
* data rate or can we trust the codec? */
|
||||
doSizeCheck = (dwRequest != 0 && ((This->dwICMFlags & (VIDCF_CRUNCH|VIDCF_QUALITY)) == 0));
|
||||
|
||||
dwMaxQual = dwCurQual = This->sInfo.dwQuality;
|
||||
|
|
|
@ -48,7 +48,7 @@ reactos/dll/win32/advpack # Synced to WineStaging-1.7.55
|
|||
reactos/dll/win32/atl # Synced to WineStaging-1.7.55
|
||||
reactos/dll/win32/atl80 # Synced to WineStaging-1.7.55
|
||||
reactos/dll/win32/atl100 # Synced to WineStaging-1.7.55
|
||||
reactos/dll/win32/avifil32 # Synced to WineStaging-1.7.47
|
||||
reactos/dll/win32/avifil32 # Synced to WineStaging-1.7.55
|
||||
reactos/dll/win32/bcrypt # Synced to WineStaging-1.7.47
|
||||
reactos/dll/win32/browseui # Out of sync
|
||||
reactos/dll/win32/cabinet # Synced to WineStaging-1.7.47
|
||||
|
|
Loading…
Reference in a new issue