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
96acd9dc
Commit
96acd9dc
authored
Sep 09, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Use IWMSyncReader2_SetRange in the async reader.
parent
b8aa25fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
22 deletions
+14
-22
gst_private.h
dlls/winegstreamer/gst_private.h
+0
-1
wm_asyncreader.c
dlls/winegstreamer/wm_asyncreader.c
+2
-3
wm_reader.c
dlls/winegstreamer/wm_reader.c
+12
-18
No files found.
dlls/winegstreamer/gst_private.h
View file @
96acd9dc
...
...
@@ -199,7 +199,6 @@ HRESULT wm_reader_get_stream_sample(struct wm_reader *reader, IWMReaderCallbackA
INSSBuffer
**
ret_sample
,
QWORD
*
pts
,
QWORD
*
duration
,
DWORD
*
flags
,
WORD
*
ret_stream_number
);
HRESULT
wm_reader_get_stream_selection
(
struct
wm_reader
*
reader
,
WORD
stream_number
,
WMT_STREAM_SELECTION
*
selection
);
void
wm_reader_seek
(
struct
wm_reader
*
reader
,
QWORD
start
,
LONGLONG
duration
);
HRESULT
wm_reader_set_allocate_for_output
(
struct
wm_reader
*
reader
,
DWORD
output
,
BOOL
allocate
);
HRESULT
wm_reader_set_allocate_for_stream
(
struct
wm_reader
*
reader
,
WORD
stream_number
,
BOOL
allocate
);
HRESULT
wm_reader_set_output_props
(
struct
wm_reader
*
reader
,
DWORD
output
,
...
...
dlls/winegstreamer/wm_asyncreader.c
View file @
96acd9dc
...
...
@@ -244,10 +244,9 @@ static DWORD WINAPI async_reader_callback_thread(void *arg)
{
reader
->
context
=
op
->
u
.
start
.
context
;
if
(
SUCCEEDED
(
hr
))
{
wm_reader_seek
(
reader
->
wm_reader
,
op
->
u
.
start
.
start
,
op
->
u
.
start
.
duration
);
hr
=
IWMSyncReader2_SetRange
(
reader
->
reader
,
op
->
u
.
start
.
start
,
op
->
u
.
start
.
duration
);
if
(
SUCCEEDED
(
hr
))
reader
->
clock_start
=
get_current_time
(
reader
);
}
LeaveCriticalSection
(
&
reader
->
callback_cs
);
IWMReaderCallback_OnStatus
(
reader
->
callback
,
WMT_STARTED
,
hr
,
...
...
dlls/winegstreamer/wm_reader.c
View file @
96acd9dc
...
...
@@ -1886,23 +1886,6 @@ HRESULT wm_reader_get_stream_sample(struct wm_reader *reader, IWMReaderCallbackA
}
}
void
wm_reader_seek
(
struct
wm_reader
*
reader
,
QWORD
start
,
LONGLONG
duration
)
{
WORD
i
;
EnterCriticalSection
(
&
reader
->
cs
);
reader
->
start_time
=
start
;
wg_parser_stream_seek
(
reader
->
streams
[
0
].
wg_stream
,
1
.
0
,
start
,
start
+
duration
,
AM_SEEKING_AbsolutePositioning
,
duration
?
AM_SEEKING_AbsolutePositioning
:
AM_SEEKING_NoPositioning
);
for
(
i
=
0
;
i
<
reader
->
stream_count
;
++
i
)
reader
->
streams
[
i
].
eos
=
false
;
LeaveCriticalSection
(
&
reader
->
cs
);
}
HRESULT
wm_reader_set_streams_selected
(
struct
wm_reader
*
reader
,
WORD
count
,
const
WORD
*
stream_numbers
,
const
WMT_STREAM_SELECTION
*
selections
)
{
...
...
@@ -2415,10 +2398,21 @@ static HRESULT WINAPI reader_SetOutputSetting(IWMSyncReader2 *iface, DWORD outpu
static
HRESULT
WINAPI
reader_SetRange
(
IWMSyncReader2
*
iface
,
QWORD
start
,
LONGLONG
duration
)
{
struct
wm_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
WORD
i
;
TRACE
(
"reader %p, start %I64u, duration %I64d.
\n
"
,
reader
,
start
,
duration
);
wm_reader_seek
(
reader
,
start
,
duration
);
EnterCriticalSection
(
&
reader
->
cs
);
reader
->
start_time
=
start
;
wg_parser_stream_seek
(
reader
->
streams
[
0
].
wg_stream
,
1
.
0
,
start
,
start
+
duration
,
AM_SEEKING_AbsolutePositioning
,
duration
?
AM_SEEKING_AbsolutePositioning
:
AM_SEEKING_NoPositioning
);
for
(
i
=
0
;
i
<
reader
->
stream_count
;
++
i
)
reader
->
streams
[
i
].
eos
=
false
;
LeaveCriticalSection
(
&
reader
->
cs
);
return
S_OK
;
}
...
...
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