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
e0045a31
Commit
e0045a31
authored
Sep 09, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement async reader asynchronous seeking.
parent
09aef50a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
wm_asyncreader.c
dlls/winegstreamer/wm_asyncreader.c
+6
-4
No files found.
dlls/winegstreamer/wm_asyncreader.c
View file @
e0045a31
...
...
@@ -26,6 +26,8 @@ union async_op_data
{
struct
{
QWORD
start
;
QWORD
duration
;
void
*
context
;
}
start
;
};
...
...
@@ -205,6 +207,9 @@ static DWORD WINAPI async_reader_callback_thread(void *arg)
case
ASYNC_OP_START
:
{
reader
->
context
=
op
->
u
.
start
.
context
;
if
(
SUCCEEDED
(
hr
))
wm_reader_seek
(
&
reader
->
reader
,
op
->
u
.
start
.
start
,
op
->
u
.
start
.
duration
);
LeaveCriticalSection
(
&
reader
->
callback_cs
);
IWMReaderCallback_OnStatus
(
reader
->
callback
,
WMT_STARTED
,
hr
,
WMT_TYPE_DWORD
,
(
BYTE
*
)
&
zero
,
reader
->
context
);
...
...
@@ -440,7 +445,7 @@ static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output,
static
HRESULT
WINAPI
WMReader_Start
(
IWMReader
*
iface
,
QWORD
start
,
QWORD
duration
,
float
rate
,
void
*
context
)
{
union
async_op_data
data
=
{.
start
=
{.
context
=
context
}};
union
async_op_data
data
=
{.
start
=
{.
start
=
start
,
.
duration
=
duration
,
.
context
=
context
}};
struct
async_reader
*
reader
=
impl_from_IWMReader
(
iface
);
HRESULT
hr
;
...
...
@@ -455,10 +460,7 @@ static HRESULT WINAPI WMReader_Start(IWMReader *iface,
if
(
!
reader
->
callback_thread
)
hr
=
NS_E_INVALID_REQUEST
;
else
{
wm_reader_seek
(
&
reader
->
reader
,
start
,
duration
);
hr
=
async_reader_queue_op
(
reader
,
ASYNC_OP_START
,
&
data
);
}
LeaveCriticalSection
(
&
reader
->
reader
.
cs
);
...
...
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