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
04fa6391
Commit
04fa6391
authored
Aug 22, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Use IWMSyncReader2_SetAllocateForStream in the async reader.
parent
957ac08c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
26 deletions
+2
-26
gst_private.h
dlls/winegstreamer/gst_private.h
+0
-2
wm_asyncreader.c
dlls/winegstreamer/wm_asyncreader.c
+2
-3
wm_reader.c
dlls/winegstreamer/wm_reader.c
+0
-21
No files found.
dlls/winegstreamer/gst_private.h
View file @
04fa6391
...
...
@@ -151,7 +151,6 @@ struct wm_stream
WMT_STREAM_SELECTION
selection
;
WORD
index
;
bool
eos
;
bool
allocate_stream
;
/* Note that we only pretend to read compressed samples, and instead output
* uncompressed samples regardless of whether we are configured to read
* compressed samples. Rather, the behaviour of the reader objects differs
...
...
@@ -193,6 +192,5 @@ struct wm_reader *wm_reader_from_sync_reader_inner(IUnknown *inner);
HRESULT
wm_reader_get_stream_sample
(
struct
wm_reader
*
reader
,
IWMReaderCallbackAdvanced
*
callback_advanced
,
WORD
stream_number
,
INSSBuffer
**
ret_sample
,
QWORD
*
pts
,
QWORD
*
duration
,
DWORD
*
flags
,
WORD
*
ret_stream_number
);
HRESULT
wm_reader_set_allocate_for_stream
(
struct
wm_reader
*
reader
,
WORD
stream_number
,
BOOL
allocate
);
#endif
/* __GST_PRIVATE_INCLUDED__ */
dlls/winegstreamer/wm_asyncreader.c
View file @
04fa6391
...
...
@@ -896,14 +896,13 @@ static HRESULT WINAPI WMReaderAdvanced_GetAllocateForOutput(IWMReaderAdvanced6 *
return
hr
;
}
static
HRESULT
WINAPI
WMReaderAdvanced_SetAllocateForStream
(
IWMReaderAdvanced6
*
iface
,
WORD
stream_number
,
BOOL
allocate
)
static
HRESULT
WINAPI
WMReaderAdvanced_SetAllocateForStream
(
IWMReaderAdvanced6
*
iface
,
WORD
stream_number
,
BOOL
allocate
)
{
struct
async_reader
*
reader
=
impl_from_IWMReaderAdvanced6
(
iface
);
TRACE
(
"reader %p, stream_number %u, allocate %d.
\n
"
,
reader
,
stream_number
,
allocate
);
return
wm_reader_set_allocate_for_stream
(
reader
->
wm_reader
,
stream_number
,
allocate
);
return
IWMSyncReader2_SetAllocateForStream
(
reader
->
reader
,
stream_number
,
allocate
?
reader
->
allocator
:
NULL
);
}
static
HRESULT
WINAPI
WMReaderAdvanced_GetAllocateForStream
(
IWMReaderAdvanced6
*
iface
,
WORD
output_num
,
BOOL
*
allocate
)
...
...
dlls/winegstreamer/wm_reader.c
View file @
04fa6391
...
...
@@ -1628,9 +1628,6 @@ HRESULT wm_reader_get_stream_sample(struct wm_reader *reader, IWMReaderCallbackA
else
if
(
stream
->
read_compressed
&&
stream
->
stream_allocator
)
hr
=
IWMReaderAllocatorEx_AllocateForStreamEx
(
stream
->
stream_allocator
,
stream
->
index
+
1
,
wg_buffer
.
size
,
&
sample
,
0
,
0
,
0
,
NULL
);
else
if
(
callback_advanced
&&
stream
->
read_compressed
&&
stream
->
allocate_stream
)
hr
=
IWMReaderCallbackAdvanced_AllocateForStream
(
callback_advanced
,
stream
->
index
+
1
,
wg_buffer
.
size
,
&
sample
,
NULL
);
/* FIXME: Should these be pooled? */
else
if
(
!
(
object
=
calloc
(
1
,
offsetof
(
struct
buffer
,
data
[
wg_buffer
.
size
]))))
hr
=
E_OUTOFMEMORY
;
...
...
@@ -1689,24 +1686,6 @@ HRESULT wm_reader_get_stream_sample(struct wm_reader *reader, IWMReaderCallbackA
}
}
HRESULT
wm_reader_set_allocate_for_stream
(
struct
wm_reader
*
reader
,
WORD
stream_number
,
BOOL
allocate
)
{
struct
wm_stream
*
stream
;
EnterCriticalSection
(
&
reader
->
cs
);
if
(
!
(
stream
=
wm_reader_get_stream_by_stream_number
(
reader
,
stream_number
)))
{
LeaveCriticalSection
(
&
reader
->
cs
);
return
E_INVALIDARG
;
}
stream
->
allocate_stream
=
!!
allocate
;
LeaveCriticalSection
(
&
reader
->
cs
);
return
S_OK
;
}
static
struct
wm_reader
*
impl_from_IUnknown
(
IUnknown
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
wm_reader
,
IUnknown_inner
);
...
...
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