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
b8aa25fe
Commit
b8aa25fe
authored
Sep 16, 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_OpenStream in the async reader.
parent
1b527e8c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
34 deletions
+27
-34
gst_private.h
dlls/winegstreamer/gst_private.h
+0
-1
wm_asyncreader.c
dlls/winegstreamer/wm_asyncreader.c
+1
-1
wm_reader.c
dlls/winegstreamer/wm_reader.c
+26
-32
No files found.
dlls/winegstreamer/gst_private.h
View file @
b8aa25fe
...
@@ -199,7 +199,6 @@ HRESULT wm_reader_get_stream_sample(struct wm_reader *reader, IWMReaderCallbackA
...
@@ -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
);
INSSBuffer
**
ret_sample
,
QWORD
*
pts
,
QWORD
*
duration
,
DWORD
*
flags
,
WORD
*
ret_stream_number
);
HRESULT
wm_reader_get_stream_selection
(
struct
wm_reader
*
reader
,
HRESULT
wm_reader_get_stream_selection
(
struct
wm_reader
*
reader
,
WORD
stream_number
,
WMT_STREAM_SELECTION
*
selection
);
WORD
stream_number
,
WMT_STREAM_SELECTION
*
selection
);
HRESULT
wm_reader_open_stream
(
struct
wm_reader
*
reader
,
IStream
*
stream
);
void
wm_reader_seek
(
struct
wm_reader
*
reader
,
QWORD
start
,
LONGLONG
duration
);
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_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_allocate_for_stream
(
struct
wm_reader
*
reader
,
WORD
stream_number
,
BOOL
allocate
);
...
...
dlls/winegstreamer/wm_asyncreader.c
View file @
b8aa25fe
...
@@ -933,7 +933,7 @@ static HRESULT WINAPI WMReaderAdvanced2_OpenStream(IWMReaderAdvanced6 *iface,
...
@@ -933,7 +933,7 @@ static HRESULT WINAPI WMReaderAdvanced2_OpenStream(IWMReaderAdvanced6 *iface,
EnterCriticalSection
(
&
reader
->
cs
);
EnterCriticalSection
(
&
reader
->
cs
);
if
(
SUCCEEDED
(
hr
=
wm_reader_open_stream
(
reader
->
wm_
reader
,
stream
))
if
(
SUCCEEDED
(
hr
=
IWMSyncReader2_OpenStream
(
reader
->
reader
,
stream
))
&&
FAILED
(
hr
=
async_reader_open
(
reader
,
callback
,
context
)))
&&
FAILED
(
hr
=
async_reader_open
(
reader
,
callback
,
context
)))
IWMSyncReader2_Close
(
reader
->
reader
);
IWMSyncReader2_Close
(
reader
->
reader
);
...
...
dlls/winegstreamer/wm_reader.c
View file @
b8aa25fe
...
@@ -1479,37 +1479,6 @@ out_destroy_parser:
...
@@ -1479,37 +1479,6 @@ out_destroy_parser:
return
hr
;
return
hr
;
}
}
HRESULT
wm_reader_open_stream
(
struct
wm_reader
*
reader
,
IStream
*
stream
)
{
STATSTG
stat
;
HRESULT
hr
;
if
(
FAILED
(
hr
=
IStream_Stat
(
stream
,
&
stat
,
STATFLAG_NONAME
)))
{
ERR
(
"Failed to stat stream, hr %#lx.
\n
"
,
hr
);
return
hr
;
}
EnterCriticalSection
(
&
reader
->
cs
);
if
(
reader
->
wg_parser
)
{
LeaveCriticalSection
(
&
reader
->
cs
);
WARN
(
"Stream is already open; returning E_UNEXPECTED.
\n
"
);
return
E_UNEXPECTED
;
}
IStream_AddRef
(
reader
->
source_stream
=
stream
);
if
(
FAILED
(
hr
=
init_stream
(
reader
,
stat
.
cbSize
.
QuadPart
)))
{
IStream_Release
(
stream
);
reader
->
source_stream
=
NULL
;
}
LeaveCriticalSection
(
&
reader
->
cs
);
return
hr
;
}
static
struct
wm_stream
*
wm_reader_get_stream_by_stream_number
(
struct
wm_reader
*
reader
,
WORD
stream_number
)
static
struct
wm_stream
*
wm_reader_get_stream_by_stream_number
(
struct
wm_reader
*
reader
,
WORD
stream_number
)
{
{
if
(
stream_number
&&
stream_number
<=
reader
->
stream_count
)
if
(
stream_number
&&
stream_number
<=
reader
->
stream_count
)
...
@@ -2373,10 +2342,35 @@ static HRESULT WINAPI reader_Open(IWMSyncReader2 *iface, const WCHAR *filename)
...
@@ -2373,10 +2342,35 @@ static HRESULT WINAPI reader_Open(IWMSyncReader2 *iface, const WCHAR *filename)
static
HRESULT
WINAPI
reader_OpenStream
(
IWMSyncReader2
*
iface
,
IStream
*
stream
)
static
HRESULT
WINAPI
reader_OpenStream
(
IWMSyncReader2
*
iface
,
IStream
*
stream
)
{
{
struct
wm_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
struct
wm_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
STATSTG
stat
;
HRESULT
hr
;
TRACE
(
"reader %p, stream %p.
\n
"
,
reader
,
stream
);
TRACE
(
"reader %p, stream %p.
\n
"
,
reader
,
stream
);
return
wm_reader_open_stream
(
reader
,
stream
);
if
(
FAILED
(
hr
=
IStream_Stat
(
stream
,
&
stat
,
STATFLAG_NONAME
)))
{
ERR
(
"Failed to stat stream, hr %#lx.
\n
"
,
hr
);
return
hr
;
}
EnterCriticalSection
(
&
reader
->
cs
);
if
(
reader
->
wg_parser
)
{
LeaveCriticalSection
(
&
reader
->
cs
);
WARN
(
"Stream is already open; returning E_UNEXPECTED.
\n
"
);
return
E_UNEXPECTED
;
}
IStream_AddRef
(
reader
->
source_stream
=
stream
);
if
(
FAILED
(
hr
=
init_stream
(
reader
,
stat
.
cbSize
.
QuadPart
)))
{
IStream_Release
(
stream
);
reader
->
source_stream
=
NULL
;
}
LeaveCriticalSection
(
&
reader
->
cs
);
return
hr
;
}
}
static
HRESULT
WINAPI
reader_SetOutputProps
(
IWMSyncReader2
*
iface
,
DWORD
output
,
IWMOutputMediaProps
*
props
)
static
HRESULT
WINAPI
reader_SetOutputProps
(
IWMSyncReader2
*
iface
,
DWORD
output
,
IWMOutputMediaProps
*
props
)
...
...
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