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
8d369f42
Commit
8d369f42
authored
Aug 05, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qasf: Start/stop the WM reader in asf_reader_init/cleanup_stream.
parent
92e77de4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
0 deletions
+63
-0
asfreader.c
dlls/qasf/asfreader.c
+63
-0
No files found.
dlls/qasf/asfreader.c
View file @
8d369f42
...
...
@@ -217,8 +217,30 @@ static HRESULT asf_reader_init_stream(struct strmbase_filter *iface)
WARN
(
"Failed to commit stream %u allocator, hr %#lx
\n
"
,
i
,
hr
);
break
;
}
if
(
FAILED
(
hr
=
IPin_NewSegment
(
stream
->
source
.
pin
.
peer
,
0
,
0
,
1
)))
{
WARN
(
"Failed to start stream %u new segment, hr %#lx
\n
"
,
i
,
hr
);
break
;
}
}
if
(
FAILED
(
hr
))
return
hr
;
EnterCriticalSection
(
&
filter
->
status_cs
);
if
(
SUCCEEDED
(
hr
=
IWMReader_Start
(
filter
->
reader
,
0
,
0
,
1
,
NULL
)))
{
filter
->
status
=
-
1
;
while
(
filter
->
status
!=
WMT_STARTED
)
SleepConditionVariableCS
(
&
filter
->
status_cv
,
&
filter
->
status_cs
,
INFINITE
);
hr
=
filter
->
result
;
}
LeaveCriticalSection
(
&
filter
->
status_cs
);
if
(
FAILED
(
hr
))
WARN
(
"Failed to start WMReader %p, hr %#lx
\n
"
,
filter
->
reader
,
hr
);
return
hr
;
}
...
...
@@ -230,6 +252,19 @@ static HRESULT asf_reader_cleanup_stream(struct strmbase_filter *iface)
TRACE
(
"iface %p
\n
"
,
iface
);
EnterCriticalSection
(
&
filter
->
status_cs
);
if
(
SUCCEEDED
(
hr
=
IWMReader_Stop
(
filter
->
reader
)))
{
filter
->
status
=
-
1
;
while
(
filter
->
status
!=
WMT_STOPPED
)
SleepConditionVariableCS
(
&
filter
->
status_cv
,
&
filter
->
status_cs
,
INFINITE
);
hr
=
filter
->
result
;
}
LeaveCriticalSection
(
&
filter
->
status_cs
);
if
(
FAILED
(
hr
))
WARN
(
"Failed to stop WMReader %p, hr %#lx
\n
"
,
filter
->
reader
,
hr
);
for
(
i
=
0
;
i
<
filter
->
stream_count
;
++
i
)
{
struct
asf_stream
*
stream
=
filter
->
streams
+
i
;
...
...
@@ -506,6 +541,34 @@ static HRESULT WINAPI reader_callback_OnStatus(IWMReaderCallback *iface, WMT_STA
WakeConditionVariable
(
&
filter
->
status_cv
);
break
;
case
WMT_END_OF_STREAMING
:
for
(
i
=
0
;
i
<
filter
->
stream_count
;
++
i
)
{
struct
asf_stream
*
stream
=
filter
->
streams
+
i
;
if
(
!
stream
->
source
.
pin
.
peer
)
continue
;
IPin_EndOfStream
(
stream
->
source
.
pin
.
peer
);
}
break
;
case
WMT_STARTED
:
EnterCriticalSection
(
&
filter
->
status_cs
);
filter
->
result
=
result
;
filter
->
status
=
WMT_STARTED
;
LeaveCriticalSection
(
&
filter
->
status_cs
);
WakeConditionVariable
(
&
filter
->
status_cv
);
break
;
case
WMT_STOPPED
:
EnterCriticalSection
(
&
filter
->
status_cs
);
filter
->
result
=
result
;
filter
->
status
=
WMT_STOPPED
;
LeaveCriticalSection
(
&
filter
->
status_cs
);
WakeConditionVariable
(
&
filter
->
status_cv
);
break
;
default:
WARN
(
"Ignoring status %#x.
\n
"
,
status
);
break
;
...
...
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