Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
331931a8
Commit
331931a8
authored
Nov 21, 1999
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 21, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed play back of uncompressed AVI file.
Fixed exiting conditions.
parent
be625026
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
21 deletions
+41
-21
animate.c
dlls/comctl32/animate.c
+41
-21
No files found.
dlls/comctl32/animate.c
View file @
331931a8
...
...
@@ -81,9 +81,32 @@ static BOOL ANIMATE_LoadFileA(ANIMATE_INFO *infoPtr, LPSTR lpName)
}
static
LRESULT
ANIMATE_DoStop
(
ANIMATE_INFO
*
infoPtr
)
{
EnterCriticalSection
(
&
infoPtr
->
cs
);
/* should stop playing */
if
(
infoPtr
->
hService
)
{
SERVICE_Delete
(
infoPtr
->
hService
);
infoPtr
->
hService
=
0
;
}
if
(
infoPtr
->
uTimer
)
{
KillTimer
(
infoPtr
->
hWnd
,
infoPtr
->
uTimer
);
infoPtr
->
uTimer
=
0
;
}
LeaveCriticalSection
(
&
infoPtr
->
cs
);
ANIMATE_Notify
(
infoPtr
,
ACN_STOP
);
return
TRUE
;
}
static
void
ANIMATE_Free
(
ANIMATE_INFO
*
infoPtr
)
{
if
(
infoPtr
->
hMMio
)
{
ANIMATE_DoStop
(
infoPtr
);
mmioClose
(
infoPtr
->
hMMio
,
0
);
if
(
infoPtr
->
hRes
)
{
FreeResource
(
infoPtr
->
hRes
);
...
...
@@ -117,31 +140,21 @@ static void ANIMATE_Free(ANIMATE_INFO *infoPtr)
}
static
LRESULT
ANIMATE_DoStop
(
ANIMATE_INFO
*
infoPtr
)
{
/* should stop playing */
if
(
infoPtr
->
hService
)
{
SERVICE_Delete
(
infoPtr
->
hService
);
infoPtr
->
hService
=
0
;
}
if
(
infoPtr
->
uTimer
)
{
KillTimer
(
infoPtr
->
hWnd
,
infoPtr
->
uTimer
);
infoPtr
->
uTimer
=
0
;
}
ANIMATE_Notify
(
infoPtr
,
ACN_STOP
);
return
TRUE
;
}
static
LRESULT
ANIMATE_PaintFrame
(
ANIMATE_INFO
*
infoPtr
,
HDC
hDC
)
{
if
(
hDC
)
{
if
(
!
hDC
||
!
infoPtr
->
inbih
)
return
TRUE
;
if
(
infoPtr
->
hic
)
StretchDIBits
(
hDC
,
0
,
0
,
infoPtr
->
outbih
->
biWidth
,
infoPtr
->
outbih
->
biHeight
,
0
,
0
,
infoPtr
->
outbih
->
biWidth
,
infoPtr
->
outbih
->
biHeight
,
infoPtr
->
outdata
,
(
LPBITMAPINFO
)
infoPtr
->
outbih
,
DIB_RGB_COLORS
,
SRCCOPY
);
}
else
StretchDIBits
(
hDC
,
0
,
0
,
infoPtr
->
inbih
->
biWidth
,
infoPtr
->
inbih
->
biHeight
,
0
,
0
,
infoPtr
->
inbih
->
biWidth
,
infoPtr
->
inbih
->
biHeight
,
infoPtr
->
indata
,
(
LPBITMAPINFO
)
infoPtr
->
inbih
,
DIB_RGB_COLORS
,
SRCCOPY
);
return
TRUE
;
}
...
...
@@ -156,7 +169,8 @@ static LRESULT ANIMATE_DrawFrame(ANIMATE_INFO* infoPtr)
mmioSeek
(
infoPtr
->
hMMio
,
infoPtr
->
lpIndex
[
infoPtr
->
currFrame
],
SEEK_SET
);
mmioRead
(
infoPtr
->
hMMio
,
infoPtr
->
indata
,
infoPtr
->
ash
.
dwSuggestedBufferSize
);
if
((
infoPtr
->
fnICDecompress
)(
infoPtr
->
hic
,
0
,
infoPtr
->
inbih
,
infoPtr
->
indata
,
if
(
infoPtr
->
hic
&&
(
infoPtr
->
fnICDecompress
)(
infoPtr
->
hic
,
0
,
infoPtr
->
inbih
,
infoPtr
->
indata
,
infoPtr
->
outbih
,
infoPtr
->
outdata
)
!=
ICERR_OK
)
{
LeaveCriticalSection
(
&
infoPtr
->
cs
);
WARN
(
"Decompression error
\n
"
);
...
...
@@ -407,6 +421,13 @@ static BOOL ANIMATE_GetAviCodec(ANIMATE_INFO *infoPtr)
{
DWORD
outSize
;
/* check uncompressed AVI */
if
(
infoPtr
->
ash
.
fccHandler
==
mmioFOURCC
(
'D'
,
'I'
,
'B'
,
' '
))
{
infoPtr
->
hic
=
0
;
return
TRUE
;
}
/* try to get a decompressor for that type */
infoPtr
->
hic
=
(
infoPtr
->
fnICOpen
)(
ICTYPE_VIDEO
,
infoPtr
->
ash
.
fccHandler
,
ICMODE_DECOMPRESS
);
...
...
@@ -529,7 +550,6 @@ static LRESULT ANIMATE_Stop(HWND hWnd, WPARAM wParam, LPARAM lParam)
}
static
LRESULT
ANIMATE_Create
(
HWND
hWnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
ANIMATE_INFO
*
infoPtr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment