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
8e88a5a6
Commit
8e88a5a6
authored
Mar 28, 2012
by
Andrew Eikum
Committed by
Alexandre Julliard
Mar 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mciqtz32: Stop the graph when the file is no longer playing.
parent
105caa28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
mciqtz.c
dlls/mciqtz32/mciqtz.c
+24
-2
mciqtz_private.h
dlls/mciqtz32/mciqtz_private.h
+1
-0
No files found.
dlls/mciqtz32/mciqtz.c
View file @
8e88a5a6
...
...
@@ -180,6 +180,12 @@ static DWORD MCIQTZ_mciOpen(UINT wDevID, DWORD dwFlags,
goto
err
;
}
hr
=
IGraphBuilder_QueryInterface
(
wma
->
pgraph
,
&
IID_IMediaEvent
,
(
void
**
)
&
wma
->
mevent
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Cannot get IMediaEvent interface (hr = %x)
\n
"
,
hr
);
goto
err
;
}
hr
=
IGraphBuilder_QueryInterface
(
wma
->
pgraph
,
&
IID_IVideoWindow
,
(
void
**
)
&
wma
->
vidwin
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Cannot get IVideoWindow interface (hr = %x)
\n
"
,
hr
);
...
...
@@ -246,6 +252,9 @@ err:
if
(
wma
->
pgraph
)
IGraphBuilder_Release
(
wma
->
pgraph
);
wma
->
pgraph
=
NULL
;
if
(
wma
->
mevent
)
IMediaEvent_Release
(
wma
->
mevent
);
wma
->
mevent
=
NULL
;
if
(
wma
->
pmctrl
)
IMediaControl_Release
(
wma
->
pmctrl
);
wma
->
pmctrl
=
NULL
;
...
...
@@ -276,6 +285,7 @@ static DWORD MCIQTZ_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP
IUnknown_Release
(
wma
->
vidwin
);
IUnknown_Release
(
wma
->
vidbasic
);
IUnknown_Release
(
wma
->
seek
);
IMediaEvent_Release
(
wma
->
mevent
);
IGraphBuilder_Release
(
wma
->
pgraph
);
IMediaControl_Release
(
wma
->
pmctrl
);
if
(
wma
->
uninit
)
...
...
@@ -654,9 +664,21 @@ static DWORD MCIQTZ_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMS
IMediaControl_GetState
(
wma
->
pmctrl
,
-
1
,
&
state
);
if
(
state
==
State_Stopped
)
lpParms
->
dwReturn
=
MCI_MODE_STOP
;
else
if
(
state
==
State_Running
)
else
if
(
state
==
State_Running
)
{
LONG
code
;
LONG_PTR
p1
,
p2
;
lpParms
->
dwReturn
=
MCI_MODE_PLAY
;
else
if
(
state
==
State_Paused
)
do
{
hr
=
IMediaEvent_GetEvent
(
wma
->
mevent
,
&
code
,
&
p1
,
&
p2
,
0
);
if
(
hr
==
S_OK
&&
code
==
EC_COMPLETE
){
lpParms
->
dwReturn
=
MCI_MODE_STOP
;
IMediaControl_Stop
(
wma
->
pmctrl
);
}
}
while
(
hr
==
S_OK
);
}
else
if
(
state
==
State_Paused
)
lpParms
->
dwReturn
=
MCI_MODE_PAUSE
;
break
;
}
...
...
dlls/mciqtz32/mciqtz_private.h
View file @
8e88a5a6
...
...
@@ -32,6 +32,7 @@ typedef struct {
IGraphBuilder
*
pgraph
;
IMediaControl
*
pmctrl
;
IMediaSeeking
*
seek
;
IMediaEvent
*
mevent
;
IVideoWindow
*
vidwin
;
IBasicVideo
*
vidbasic
;
DWORD
time_format
;
...
...
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