mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 04:13:32 +00:00
sync avifil32 with wine 1.1.15
svn path=/trunk/; revision=39583
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002 Michael Günnewig
|
||||
* Copyright 2002 Michael Günnewig
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 1999 Marcus Meissner
|
||||
* Copyright 2002-2003 Michael Günnewig
|
||||
* Copyright 2002-2003 Michael Günnewig
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 1999 Marcus Meissner
|
||||
* Copyright 2002-2003 Michael Günnewig
|
||||
* Copyright 2002-2003 Michael Günnewig
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -217,7 +217,7 @@ static HRESULT AVIFILE_LoadIndex(const IAVIFileImpl *This, DWORD size, DWORD off
|
||||
static HRESULT AVIFILE_ParseIndex(const IAVIFileImpl *This, AVIINDEXENTRY *lp,
|
||||
LONG count, DWORD pos, BOOL *bAbsolute);
|
||||
static HRESULT AVIFILE_ReadBlock(IAVIStreamImpl *This, DWORD start,
|
||||
LPVOID buffer, LONG size);
|
||||
LPVOID buffer, DWORD size);
|
||||
static void AVIFILE_SamplesToBlock(const IAVIStreamImpl *This, LPLONG pos,
|
||||
LPLONG offset);
|
||||
static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This);
|
||||
@@ -931,7 +931,7 @@ static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream *iface, LONG pos,
|
||||
{
|
||||
IAVIStreamImpl *This = (IAVIStreamImpl *)iface;
|
||||
|
||||
LPBITMAPINFOHEADER lpbiNew = (LPBITMAPINFOHEADER)format;
|
||||
LPBITMAPINFOHEADER lpbiNew = format;
|
||||
|
||||
TRACE("(%p,%d,%p,%d)\n", iface, pos, format, formatsize);
|
||||
|
||||
@@ -976,7 +976,7 @@ static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream *iface, LONG pos,
|
||||
return AVIERR_OK;
|
||||
} else {
|
||||
MMCKINFO ck;
|
||||
LPBITMAPINFOHEADER lpbiOld = (LPBITMAPINFOHEADER)This->lpFormat;
|
||||
LPBITMAPINFOHEADER lpbiOld = This->lpFormat;
|
||||
RGBQUAD *rgbNew = (RGBQUAD*)((LPBYTE)lpbiNew + lpbiNew->biSize);
|
||||
AVIPALCHANGE *lppc = NULL;
|
||||
UINT n;
|
||||
@@ -1688,7 +1688,7 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This)
|
||||
return AVIERR_MEMORY;
|
||||
pStream->cbHandlerData = ck.cksize;
|
||||
|
||||
if (mmioRead(This->hmmio, (HPSTR)pStream->lpHandlerData, ck.cksize) != ck.cksize)
|
||||
if (mmioRead(This->hmmio, pStream->lpHandlerData, ck.cksize) != ck.cksize)
|
||||
return AVIERR_FILEREAD;
|
||||
break;
|
||||
case ckidSTREAMFORMAT:
|
||||
@@ -1702,11 +1702,11 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This)
|
||||
return AVIERR_MEMORY;
|
||||
pStream->cbFormat = ck.cksize;
|
||||
|
||||
if (mmioRead(This->hmmio, (HPSTR)pStream->lpFormat, ck.cksize) != ck.cksize)
|
||||
if (mmioRead(This->hmmio, pStream->lpFormat, ck.cksize) != ck.cksize)
|
||||
return AVIERR_FILEREAD;
|
||||
|
||||
if (pStream->sInfo.fccType == streamtypeVIDEO) {
|
||||
LPBITMAPINFOHEADER lpbi = (LPBITMAPINFOHEADER)pStream->lpFormat;
|
||||
LPBITMAPINFOHEADER lpbi = pStream->lpFormat;
|
||||
|
||||
/* some corrections to the video format */
|
||||
if (lpbi->biClrUsed == 0 && lpbi->biBitCount <= 8)
|
||||
@@ -2008,7 +2008,7 @@ static HRESULT AVIFILE_ParseIndex(const IAVIFileImpl *This, AVIINDEXENTRY *lp,
|
||||
}
|
||||
|
||||
static HRESULT AVIFILE_ReadBlock(IAVIStreamImpl *This, DWORD pos,
|
||||
LPVOID buffer, LONG size)
|
||||
LPVOID buffer, DWORD size)
|
||||
{
|
||||
/* pre-conditions */
|
||||
assert(This != NULL);
|
||||
@@ -2059,7 +2059,7 @@ static HRESULT AVIFILE_ReadBlock(IAVIStreamImpl *This, DWORD pos,
|
||||
} else {
|
||||
if (mmioSeek(This->paf->hmmio, This->idxFrames[pos].dwChunkOffset + 2 * sizeof(DWORD), SEEK_SET) == -1)
|
||||
return AVIERR_FILEREAD;
|
||||
if (mmioRead(This->paf->hmmio, (HPSTR)buffer, size) != size)
|
||||
if (mmioRead(This->paf->hmmio, buffer, size) != size)
|
||||
return AVIERR_FILEREAD;
|
||||
}
|
||||
|
||||
@@ -2206,7 +2206,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This)
|
||||
if (mmioCreateChunk(This->hmmio, &ck, 0) != S_OK)
|
||||
return AVIERR_FILEWRITE;
|
||||
if (pStream->lpFormat != NULL && ck.cksize > 0) {
|
||||
if (mmioWrite(This->hmmio, (HPSTR)pStream->lpFormat, ck.cksize) != ck.cksize)
|
||||
if (mmioWrite(This->hmmio, pStream->lpFormat, ck.cksize) != ck.cksize)
|
||||
return AVIERR_FILEWRITE;
|
||||
}
|
||||
if (mmioAscend(This->hmmio, &ck, 0) != S_OK)
|
||||
@@ -2218,7 +2218,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This)
|
||||
ck.cksize = pStream->cbHandlerData;
|
||||
if (mmioCreateChunk(This->hmmio, &ck, 0) != S_OK)
|
||||
return AVIERR_FILEWRITE;
|
||||
if (mmioWrite(This->hmmio, (HPSTR)pStream->lpHandlerData, ck.cksize) != ck.cksize)
|
||||
if (mmioWrite(This->hmmio, pStream->lpHandlerData, ck.cksize) != ck.cksize)
|
||||
return AVIERR_FILEWRITE;
|
||||
if (mmioAscend(This->hmmio, &ck, 0) != S_OK)
|
||||
return AVIERR_FILEWRITE;
|
||||
@@ -2227,7 +2227,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This)
|
||||
/* ... some optional additional extra chunk for this stream ... */
|
||||
if (pStream->extra.lp != NULL && pStream->extra.cb > 0) {
|
||||
/* the chunk header(s) are already in the structure */
|
||||
if (mmioWrite(This->hmmio, (HPSTR)pStream->extra.lp, pStream->extra.cb) != pStream->extra.cb)
|
||||
if (mmioWrite(This->hmmio, pStream->extra.lp, pStream->extra.cb) != pStream->extra.cb)
|
||||
return AVIERR_FILEWRITE;
|
||||
}
|
||||
|
||||
@@ -2302,7 +2302,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This)
|
||||
/* write optional extra file chunks */
|
||||
if (This->fileextra.lp != NULL && This->fileextra.cb > 0) {
|
||||
/* as for the streams, are the chunk header(s) in the structure */
|
||||
if (mmioWrite(This->hmmio, (HPSTR)This->fileextra.lp, This->fileextra.cb) != This->fileextra.cb)
|
||||
if (mmioWrite(This->hmmio, This->fileextra.lp, This->fileextra.cb) != This->fileextra.cb)
|
||||
return AVIERR_FILEWRITE;
|
||||
}
|
||||
|
||||
@@ -2562,7 +2562,7 @@ static HRESULT AVIFILE_WriteBlock(IAVIStreamImpl *This, DWORD block,
|
||||
if (mmioCreateChunk(This->paf->hmmio, &ck, 0) != S_OK)
|
||||
return AVIERR_FILEWRITE;
|
||||
if (buffer != NULL && size > 0) {
|
||||
if (mmioWrite(This->paf->hmmio, (HPSTR)buffer, size) != size)
|
||||
if (mmioWrite(This->paf->hmmio, buffer, size) != size)
|
||||
return AVIERR_FILEWRITE;
|
||||
}
|
||||
if (mmioAscend(This->paf->hmmio, &ck, 0) != S_OK)
|
||||
|
||||
@@ -16,35 +16,40 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/* UTF-8 */
|
||||
#pragma code_page(65001)
|
||||
|
||||
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
|
||||
|
||||
IDD_SAVEOPTIONS DIALOG FIXED IMPURE 43, 37, 226, 82
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "圧縮オプション"
|
||||
FONT 9, "MS UI Gothic"
|
||||
CAPTION "圧縮オプション"
|
||||
FONT 9, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "ストリームを選択(&C):",-1,2,5,154,10
|
||||
LTEXT "ストリームを選択(&C):",-1,2,5,154,10
|
||||
COMBOBOX IDC_STREAM,2,18,154,61,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "オプション(&O)...",IDC_OPTIONS,170,17,50,14
|
||||
AUTOCHECKBOX "インターリーブ(&I)",IDC_INTERLEAVE,3,42,85,11,WS_TABSTOP
|
||||
PUSHBUTTON "オプション(&O)...",IDC_OPTIONS,170,17,50,14
|
||||
AUTOCHECKBOX "インターリーブ(&I)",IDC_INTERLEAVE,3,42,85,11,WS_TABSTOP
|
||||
EDITTEXT IDC_INTERLEAVEEVERY,91,41,32,12,ES_AUTOHSCROLL
|
||||
LTEXT "フレーム",-1,129,43,36,9
|
||||
LTEXT "現在のフォーマット:",-1,3,56,73,9
|
||||
LTEXT "フレーム",-1,129,43,36,9
|
||||
LTEXT "現在のフォーマット:",-1,3,56,73,9
|
||||
LTEXT "This space for rent",IDC_FORMATTEXT,75,56,90,26
|
||||
DEFPUSHBUTTON "OK",IDOK,170,42,50,14
|
||||
PUSHBUTTON "キャンセル",IDCANCEL,170,61,50,14
|
||||
PUSHBUTTON "キャンセル",IDCANCEL,170,61,50,14
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_WAVESTREAMFORMAT "Waveファイル: %s"
|
||||
IDS_WAVEFILETYPE "Waveファイル"
|
||||
IDS_ALLMULTIMEDIA "全てのマルチメディアファイル"
|
||||
IDS_ALLFILES "全てのファイル (*.*)@*.*"
|
||||
IDS_VIDEO "ビデオ"
|
||||
IDS_AUDIO "音声"
|
||||
IDS_WAVESTREAMFORMAT "Waveファイル: %s"
|
||||
IDS_WAVEFILETYPE "Waveファイル"
|
||||
IDS_ALLMULTIMEDIA "全てのマルチメディアファイル"
|
||||
IDS_ALLFILES "全てのファイル (*.*)@*.*"
|
||||
IDS_VIDEO "ビデオ"
|
||||
IDS_AUDIO "音声"
|
||||
IDS_AVISTREAMFORMAT "%s %s #%d"
|
||||
IDS_AVIFILETYPE "Wine AVI-default-filehandler"
|
||||
IDS_UNCOMPRESSED "未圧縮"
|
||||
IDS_UNCOMPRESSED "未圧縮"
|
||||
}
|
||||
|
||||
#pragma code_page(default)
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_SAVEOPTIONS DIALOG FIXED IMPURE 43, 37, 226, 82
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "압축 옵션"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
FONT 9, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "스트림 선택(&C):",-1,2,5,154,10
|
||||
COMBOBOX IDC_STREAM,2,18,154,61,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
|
||||
@@ -28,7 +28,7 @@ BEGIN
|
||||
LTEXT "&Izbran tok:",-1,2,5,154,10
|
||||
COMBOBOX IDC_STREAM,2,18,154,61,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "&Možnosti...",IDC_OPTIONS,170,17,50,14
|
||||
PUSHBUTTON "&Možnosti ...",IDC_OPTIONS,170,17,50,14
|
||||
AUTOCHECKBOX "&Prepletanje vsake",IDC_INTERLEAVE,3,42,85,11,WS_TABSTOP
|
||||
EDITTEXT IDC_INTERLEAVEEVERY,91,41,32,12,ES_AUTOHSCROLL
|
||||
LTEXT "slike",-1,129,43,36,9
|
||||
|
||||
@@ -1,11 +1,22 @@
|
||||
/*
|
||||
* PROJECT: AVI File support library
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: dll/win32/avifil32/avifile_Uk.rc
|
||||
* PURPOSE: Ukraianian resource file for avifil32
|
||||
* TRANSLATOR: Artem Reznikov
|
||||
* Copyright 2007 Artem Reznikov
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_SAVEOPTIONS DIALOG FIXED IMPURE 43, 37, 196, 82
|
||||
@@ -14,7 +25,7 @@ CAPTION "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "&Îáåð³òü ïîò³ê:",-1,2,5,114,10
|
||||
COMBOBOX IDC_STREAM,2,18,134,61,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
COMBOBOX IDC_STREAM,2,18,134,61,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "Ï&àðàìåòðè...",IDC_OPTIONS,145,17,45,14
|
||||
AUTOCHECKBOX "&²íòåðâàë ÷åðãóâàííÿ",IDC_INTERLEAVE,3,42,60,11,WS_TABSTOP
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* avifile (Simplified and Traditional Chinese Resources)
|
||||
*
|
||||
* Copyright 2008 Hongbo Ni <hongbo.at.njstar.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/* Chinese text is encoded in UTF-8 */
|
||||
#pragma code_page(65001)
|
||||
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
|
||||
|
||||
IDD_SAVEOPTIONS DIALOG FIXED IMPURE 43, 37, 226, 82
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "压缩选项"
|
||||
FONT 9, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "选择来源(&C):",-1,2,5,154,10
|
||||
COMBOBOX IDC_STREAM,2,18,154,61,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "选项(&O)...",IDC_OPTIONS,170,17,50,14
|
||||
AUTOCHECKBOX "交织: 每",IDC_INTERLEAVE,3,42,85,11,WS_TABSTOP
|
||||
EDITTEXT IDC_INTERLEAVEEVERY,91,41,32,12,ES_AUTOHSCROLL
|
||||
LTEXT "帧数",-1,129,43,36,9
|
||||
LTEXT "当前格式:",-1,3,56,73,9
|
||||
LTEXT "(?)",IDC_FORMATTEXT,75,56,90,26
|
||||
DEFPUSHBUTTON "确定",IDOK,170,42,50,14
|
||||
PUSHBUTTON "取消",IDCANCEL,170,61,50,14
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_WAVESTREAMFORMAT "波形: %s"
|
||||
IDS_WAVEFILETYPE "波形"
|
||||
IDS_ALLMULTIMEDIA "所有多媒体文件"
|
||||
IDS_ALLFILES "所有文件 (*.*)@*.*"
|
||||
IDS_VIDEO "视频"
|
||||
IDS_AUDIO "音频"
|
||||
IDS_AVISTREAMFORMAT "%s %s #%d"
|
||||
IDS_AVIFILETYPE "Wine AVI-默认处理器"
|
||||
IDS_UNCOMPRESSED "未压缩"
|
||||
}
|
||||
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
|
||||
|
||||
IDD_SAVEOPTIONS DIALOG FIXED IMPURE 43, 37, 226, 82
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "壓縮選項"
|
||||
FONT 9, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "選擇來源(&C):",-1,2,5,154,10
|
||||
COMBOBOX IDC_STREAM,2,18,154,61,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "選項(&O)...",IDC_OPTIONS,170,17,50,14
|
||||
AUTOCHECKBOX "交織: 每",IDC_INTERLEAVE,3,42,85,11,WS_TABSTOP
|
||||
EDITTEXT IDC_INTERLEAVEEVERY,91,41,32,12,ES_AUTOHSCROLL
|
||||
LTEXT "幀數",-1,129,43,36,9
|
||||
LTEXT "當前格式:",-1,3,56,73,9
|
||||
LTEXT "(?)",IDC_FORMATTEXT,75,56,90,26
|
||||
DEFPUSHBUTTON "確定",IDOK,170,42,50,14
|
||||
PUSHBUTTON "取消",IDCANCEL,170,61,50,14
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_WAVESTREAMFORMAT "波形: %s"
|
||||
IDS_WAVEFILETYPE "波形"
|
||||
IDS_ALLMULTIMEDIA "所有多媒體檔案"
|
||||
IDS_ALLFILES "所有檔案 (*.*)@*.*"
|
||||
IDS_VIDEO "視頻"
|
||||
IDS_AUDIO "音頻"
|
||||
IDS_AVISTREAMFORMAT "%s %s #%d"
|
||||
IDS_AVIFILETYPE "Wine AVI-默認處理器"
|
||||
IDS_UNCOMPRESSED "未壓縮"
|
||||
}
|
||||
|
||||
#pragma code_page(default)
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002 Michael Günnewig
|
||||
* Copyright 2002 Michael Günnewig
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003 Michael Günnewig
|
||||
* Copyright 2003 Michael Günnewig
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -261,7 +261,7 @@ static LPVOID AVIFILE_ReadFrame(IAVIEditStreamImpl* const This,
|
||||
if (pg == NULL)
|
||||
return NULL;
|
||||
if (This->pg != NULL) {
|
||||
if (IGetFrame_SetFormat(pg, This->lpFrame, NULL, 0, 0, -1, -1)) {
|
||||
if (IGetFrame_SetFormat(pg, This->lpFrame, NULL, 0, 0, -1, -1) != S_OK) {
|
||||
AVIStreamGetFrameClose(pg);
|
||||
ERR(": IGetFrame_SetFormat failed\n");
|
||||
return NULL;
|
||||
@@ -793,7 +793,7 @@ static HRESULT WINAPI IAVIEditStream_fnSetInfo(IAVIEditStream*iface,
|
||||
if (asi->dwQuality <= ICQUALITY_HIGH)
|
||||
This->sInfo.dwQuality = ICQUALITY_HIGH;
|
||||
CopyRect(&This->sInfo.rcFrame, &asi->rcFrame);
|
||||
memcpy(&This->sInfo.szName, &asi->szName, sizeof(asi->szName));
|
||||
memcpy(This->sInfo.szName, asi->szName, sizeof(asi->szName));
|
||||
This->sInfo.dwEditCount++;
|
||||
|
||||
return AVIERR_OK;
|
||||
@@ -896,7 +896,7 @@ static LONG WINAPI IEditAVIStream_fnFindSample(IAVIStream*iface,LONG pos,
|
||||
|
||||
/* map our position to a stream and position in it */
|
||||
if (AVIFILE_FindStreamInTable(This, pos, &stream, &streamPos,
|
||||
&streamNr, TRUE))
|
||||
&streamNr, TRUE) != S_OK)
|
||||
return -1; /* doesn't exist */
|
||||
|
||||
if (This->bDecompress) {
|
||||
@@ -935,7 +935,7 @@ static HRESULT WINAPI IEditAVIStream_fnReadFormat(IAVIStream*iface,LONG pos,
|
||||
if (! This->bDecompress)
|
||||
return IAVIStream_ReadFormat(stream, n, format, fmtsize);
|
||||
|
||||
lp = (LPBITMAPINFOHEADER)AVIFILE_ReadFrame(This, stream, n);
|
||||
lp = AVIFILE_ReadFrame(This, stream, n);
|
||||
if (lp == NULL)
|
||||
return AVIERR_ERROR;
|
||||
if (lp->biBitCount <= 8) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002 Michael Günnewig
|
||||
* Copyright 2002 Michael Günnewig
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -145,7 +145,7 @@ HRESULT FindChunkAndKeepExtras(LPEXTRACHUNKS extra,HMMIO hmmio,MMCKINFO *lpck,
|
||||
{
|
||||
FOURCC ckid;
|
||||
FOURCC fccType;
|
||||
HRESULT hr;
|
||||
MMRESULT mmr;
|
||||
|
||||
/* pre-conditions */
|
||||
assert(extra != NULL);
|
||||
@@ -171,26 +171,32 @@ HRESULT FindChunkAndKeepExtras(LPEXTRACHUNKS extra,HMMIO hmmio,MMCKINFO *lpck,
|
||||
TRACE(": find ckid=0x%08X fccType=0x%08X\n", ckid, fccType);
|
||||
|
||||
for (;;) {
|
||||
hr = mmioDescend(hmmio, lpck, lpckParent, 0);
|
||||
if (hr != S_OK) {
|
||||
mmr = mmioDescend(hmmio, lpck, lpckParent, 0);
|
||||
if (mmr != MMSYSERR_NOERROR) {
|
||||
/* No extra chunks in front of desired chunk? */
|
||||
if (flags == 0 && hr == MMIOERR_CHUNKNOTFOUND)
|
||||
hr = AVIERR_OK;
|
||||
return hr;
|
||||
if (flags == 0 && mmr == MMIOERR_CHUNKNOTFOUND)
|
||||
return AVIERR_OK;
|
||||
else
|
||||
return AVIERR_FILEREAD;
|
||||
}
|
||||
|
||||
/* Have we found what we search for? */
|
||||
if ((lpck->ckid == ckid) &&
|
||||
(fccType == (FOURCC)0 || lpck->fccType == fccType))
|
||||
(fccType == 0 || lpck->fccType == fccType))
|
||||
return AVIERR_OK;
|
||||
|
||||
/* Skip padding chunks, the others put into the extrachunk-structure */
|
||||
if (lpck->ckid == ckidAVIPADDING ||
|
||||
lpck->ckid == mmioFOURCC('p','a','d','d'))
|
||||
hr = mmioAscend(hmmio, lpck, 0);
|
||||
{
|
||||
mmr = mmioAscend(hmmio, lpck, 0);
|
||||
if (mmr != MMSYSERR_NOERROR) return AVIERR_FILEREAD;
|
||||
}
|
||||
else
|
||||
hr = ReadChunkIntoExtra(extra, hmmio, lpck);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
{
|
||||
HRESULT hr = ReadChunkIntoExtra(extra, hmmio, lpck);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002 Michael Günnewig
|
||||
* Copyright 2002 Michael Günnewig
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002 Michael Günnewig
|
||||
* Copyright 2002 Michael Günnewig
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2003 Michael Günnewig
|
||||
* Copyright 2002-2003 Michael Günnewig
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002 Michael Günnewig
|
||||
* Copyright 2002 Michael Günnewig
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -393,7 +393,7 @@ static HRESULT WINAPI ICMStream_fnReadFormat(IAVIStream *iface, LONG pos,
|
||||
return hr;
|
||||
}
|
||||
|
||||
lpbi = (LPBITMAPINFOHEADER)AVIStreamGetFrame(This->pg, pos);
|
||||
lpbi = AVIStreamGetFrame(This->pg, pos);
|
||||
if (lpbi == NULL)
|
||||
return AVIERR_MEMORY;
|
||||
|
||||
@@ -538,7 +538,7 @@ static HRESULT WINAPI ICMStream_fnSetFormat(IAVIStream *iface, LONG pos,
|
||||
}
|
||||
} else {
|
||||
/* format change -- check that's only the palette */
|
||||
LPBITMAPINFOHEADER lpbi = (LPBITMAPINFOHEADER)format;
|
||||
LPBITMAPINFOHEADER lpbi = format;
|
||||
|
||||
if (lpbi->biSize != This->lpbiInput->biSize ||
|
||||
lpbi->biWidth != This->lpbiInput->biWidth ||
|
||||
@@ -611,7 +611,7 @@ static HRESULT WINAPI ICMStream_fnRead(IAVIStream *iface, LONG start,
|
||||
/* compress or decompress? */
|
||||
if (This->hic == NULL) {
|
||||
/* decompress */
|
||||
lpbi = (LPBITMAPINFOHEADER)AVIStreamGetFrame(This->pg, start);
|
||||
lpbi = AVIStreamGetFrame(This->pg, start);
|
||||
if (lpbi == NULL)
|
||||
return AVIERR_MEMORY;
|
||||
|
||||
@@ -634,7 +634,7 @@ static HRESULT WINAPI ICMStream_fnRead(IAVIStream *iface, LONG start,
|
||||
while (start > This->lCurrent) {
|
||||
HRESULT hr;
|
||||
|
||||
lpbi = (LPBITMAPINFOHEADER)AVIStreamGetFrame(This->pg, ++This->lCurrent);
|
||||
lpbi = AVIStreamGetFrame(This->pg, ++This->lCurrent);
|
||||
if (lpbi == NULL) {
|
||||
AVIFILE_Reset(This);
|
||||
return AVIERR_MEMORY;
|
||||
@@ -821,14 +821,14 @@ static HRESULT AVIFILE_EncodeFrame(IAVIStreamImpl *This,
|
||||
|
||||
do {
|
||||
DWORD idxCkid = 0;
|
||||
HRESULT hr;
|
||||
DWORD res;
|
||||
|
||||
hr = ICCompress(This->hic,icmFlags,This->lpbiCur,This->lpCur,lpbi,lpBits,
|
||||
&idxCkid, &idxFlags, This->lCurrent, dwRequest, dwCurQual,
|
||||
noPrev ? NULL:This->lpbiPrev, noPrev ? NULL:This->lpPrev);
|
||||
if (hr == ICERR_NEWPALETTE) {
|
||||
res = ICCompress(This->hic,icmFlags,This->lpbiCur,This->lpCur,lpbi,lpBits,
|
||||
&idxCkid, &idxFlags, This->lCurrent, dwRequest, dwCurQual,
|
||||
noPrev ? NULL:This->lpbiPrev, noPrev ? NULL:This->lpPrev);
|
||||
if (res == ICERR_NEWPALETTE) {
|
||||
FIXME(": codec has changed palette -- unhandled!\n");
|
||||
} else if (hr != ICERR_OK)
|
||||
} else if (res != ICERR_OK)
|
||||
return AVIERR_COMPRESSOR;
|
||||
|
||||
/* need to check for framesize */
|
||||
@@ -902,7 +902,7 @@ static HRESULT AVIFILE_OpenGetFrame(IAVIStreamImpl *This)
|
||||
assert(This->lpbiOutput == NULL);
|
||||
|
||||
/* get input format */
|
||||
lpbi = (LPBITMAPINFOHEADER)AVIStreamGetFrame(This->pg, This->sInfo.dwStart);
|
||||
lpbi = AVIStreamGetFrame(This->pg, This->sInfo.dwStart);
|
||||
if (lpbi == NULL)
|
||||
return AVIERR_MEMORY;
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "avifile_private.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
||||
|
||||
@@ -158,7 +159,7 @@ static HRESULT register_interfaces(struct regsvr_interface const *list)
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
|
||||
wsprintfW(buf, fmt, list->num_methods);
|
||||
sprintfW(buf, fmt, list->num_methods);
|
||||
res = RegSetValueExW(key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)buf,
|
||||
(lstrlenW(buf) + 1) * sizeof(WCHAR));
|
||||
|
||||
@@ -57,3 +57,4 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
#include "avifile_Sv.rc"
|
||||
#include "avifile_Tr.rc"
|
||||
#include "avifile_Uk.rc"
|
||||
#include "avifile_Zh.rc"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003 Michael Günnewig
|
||||
* Copyright 2003 Michael Günnewig
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002 Michael Günnewig
|
||||
* Copyright 2002 Michael Günnewig
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -908,7 +908,7 @@ static HRESULT WINAPI IAVIStream_fnRead(IAVIStream *iface, LONG start,
|
||||
if (mmioSeek(This->hmmio, This->ckData.dwDataOffset
|
||||
+ start * This->sInfo.dwSampleSize, SEEK_SET) == -1)
|
||||
return AVIERR_FILEREAD;
|
||||
if (mmioRead(This->hmmio, (HPSTR)buffer, buffersize) != buffersize)
|
||||
if (mmioRead(This->hmmio, buffer, buffersize) != buffersize)
|
||||
return AVIERR_FILEREAD;
|
||||
|
||||
/* fill out return parameters if given */
|
||||
@@ -960,7 +960,7 @@ static HRESULT WINAPI IAVIStream_fnWrite(IAVIStream *iface, LONG start,
|
||||
if (mmioSeek(This->hmmio, This->ckData.dwDataOffset +
|
||||
start * This->sInfo.dwSampleSize, SEEK_SET) == -1)
|
||||
return AVIERR_FILEWRITE;
|
||||
if (mmioWrite(This->hmmio, (HPSTR)buffer, buffersize) != buffersize)
|
||||
if (mmioWrite(This->hmmio, buffer, buffersize) != buffersize)
|
||||
return AVIERR_FILEWRITE;
|
||||
|
||||
This->sInfo.dwLength = max(This->sInfo.dwLength, (DWORD)start + samples);
|
||||
|
||||
Reference in New Issue
Block a user