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
5aa60f77
Commit
5aa60f77
authored
Sep 23, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement IWMSyncReader2_SetAllocateForStream.
parent
57afb52d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
9 deletions
+25
-9
gst_private.h
dlls/winegstreamer/gst_private.h
+1
-0
wm_reader.c
dlls/winegstreamer/wm_reader.c
+24
-4
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+0
-5
No files found.
dlls/winegstreamer/gst_private.h
View file @
5aa60f77
...
...
@@ -160,6 +160,7 @@ struct wm_stream
bool
read_compressed
;
IWMReaderAllocatorEx
*
output_allocator
;
IWMReaderAllocatorEx
*
stream_allocator
;
};
struct
wm_reader
...
...
dlls/winegstreamer/wm_reader.c
View file @
5aa60f77
...
...
@@ -1623,6 +1623,9 @@ HRESULT wm_reader_get_stream_sample(struct wm_reader *reader, IWMReaderCallbackA
if
(
!
stream
->
read_compressed
&&
stream
->
output_allocator
)
hr
=
IWMReaderAllocatorEx_AllocateForOutputEx
(
stream
->
output_allocator
,
stream
->
index
,
wg_buffer
.
size
,
&
sample
,
0
,
0
,
0
,
NULL
);
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
);
...
...
@@ -2470,11 +2473,28 @@ static HRESULT WINAPI reader_GetAllocateForOutput(IWMSyncReader2 *iface, DWORD o
return
S_OK
;
}
static
HRESULT
WINAPI
reader_SetAllocateForStream
(
IWMSyncReader2
*
iface
,
DWORD
stream_num
,
IWMReaderAllocatorEx
*
allocator
)
static
HRESULT
WINAPI
reader_SetAllocateForStream
(
IWMSyncReader2
*
iface
,
DWORD
stream_num
ber
,
IWMReaderAllocatorEx
*
allocator
)
{
struct
wm_reader
*
This
=
impl_from_IWMSyncReader2
(
iface
);
FIXME
(
"(%p)->(%lu %p): stub!
\n
"
,
This
,
stream_num
,
allocator
);
return
E_NOTIMPL
;
struct
wm_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
struct
wm_stream
*
stream
;
TRACE
(
"reader %p, stream_number %lu, allocator %p.
\n
"
,
reader
,
stream_number
,
allocator
);
EnterCriticalSection
(
&
reader
->
cs
);
if
(
!
(
stream
=
wm_reader_get_stream_by_stream_number
(
reader
,
stream_number
)))
{
LeaveCriticalSection
(
&
reader
->
cs
);
return
E_INVALIDARG
;
}
if
(
stream
->
stream_allocator
)
IWMReaderAllocatorEx_Release
(
stream
->
stream_allocator
);
if
((
stream
->
stream_allocator
=
allocator
))
IWMReaderAllocatorEx_AddRef
(
stream
->
stream_allocator
);
LeaveCriticalSection
(
&
reader
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
reader_GetAllocateForStream
(
IWMSyncReader2
*
iface
,
DWORD
stream_num
,
IWMReaderAllocatorEx
**
allocator
)
...
...
dlls/wmvcore/tests/wmvcore.c
View file @
5aa60f77
...
...
@@ -3491,7 +3491,6 @@ static void test_sync_reader_allocator(void)
hr
=
IWMSyncReader2_SetAllocateForOutput
(
reader
,
-
1
,
&
callback
.
IWMReaderAllocatorEx_iface
);
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IWMSyncReader2_SetAllocateForStream
(
reader
,
0
,
&
callback
.
IWMReaderAllocatorEx_iface
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#lx.
\n
"
,
hr
);
...
...
@@ -3508,7 +3507,6 @@ static void test_sync_reader_allocator(void)
hr
=
IWMSyncReader2_SetAllocateForStream
(
reader
,
1
,
&
callback
.
IWMReaderAllocatorEx_iface
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForOutput
(
reader
,
0
,
&
allocator
);
...
...
@@ -3527,7 +3525,6 @@ static void test_sync_reader_allocator(void)
ok
(
allocator
==
&
callback
.
IWMReaderAllocatorEx_iface
,
"Got allocator %p.
\n
"
,
allocator
);
hr
=
IWMSyncReader2_SetAllocateForStream
(
reader
,
1
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForOutput
(
reader
,
0
,
&
allocator
);
...
...
@@ -3574,7 +3571,6 @@ static void test_sync_reader_allocator(void)
hr
=
IWMSyncReader2_GetStreamNumberForOutput
(
reader
,
0
,
&
stream_num
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IWMSyncReader2_SetAllocateForStream
(
reader
,
stream_num
,
&
callback
.
IWMReaderAllocatorEx_iface
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IWMSyncReader2_SetReadStreamSamples
(
reader
,
stream_num
,
TRUE
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
...
...
@@ -3588,7 +3584,6 @@ static void test_sync_reader_allocator(void)
hr
=
IWMSyncReader2_GetNextSample
(
reader
,
stream_num
,
&
sample
,
&
pts
,
&
duration
,
&
flags
,
&
output_num
,
&
stream_num
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
sample
->
lpVtbl
==
&
buffer_vtbl
,
"Buffer vtbl didn't match.
\n
"
);
INSSBuffer_Release
(
sample
);
...
...
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