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
57afb52d
Commit
57afb52d
authored
Aug 22, 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_GetAllocateForOutput.
parent
7eb50d5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
18 deletions
+23
-18
wm_reader.c
dlls/winegstreamer/wm_reader.c
+23
-4
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+0
-14
No files found.
dlls/winegstreamer/wm_reader.c
View file @
57afb52d
...
...
@@ -2444,11 +2444,30 @@ static HRESULT WINAPI reader_SetAllocateForOutput(IWMSyncReader2 *iface, DWORD o
return
S_OK
;
}
static
HRESULT
WINAPI
reader_GetAllocateForOutput
(
IWMSyncReader2
*
iface
,
DWORD
output
_num
,
IWMReaderAllocatorEx
**
allocator
)
static
HRESULT
WINAPI
reader_GetAllocateForOutput
(
IWMSyncReader2
*
iface
,
DWORD
output
,
IWMReaderAllocatorEx
**
allocator
)
{
struct
wm_reader
*
This
=
impl_from_IWMSyncReader2
(
iface
);
FIXME
(
"(%p)->(%lu %p): stub!
\n
"
,
This
,
output_num
,
allocator
);
return
E_NOTIMPL
;
struct
wm_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
struct
wm_stream
*
stream
;
TRACE
(
"reader %p, output %lu, allocator %p.
\n
"
,
reader
,
output
,
allocator
);
if
(
!
allocator
)
return
E_INVALIDARG
;
EnterCriticalSection
(
&
reader
->
cs
);
if
(
!
(
stream
=
get_stream_by_output_number
(
reader
,
output
)))
{
LeaveCriticalSection
(
&
reader
->
cs
);
return
E_INVALIDARG
;
}
stream
=
reader
->
streams
+
output
;
if
((
*
allocator
=
stream
->
output_allocator
))
IWMReaderAllocatorEx_AddRef
(
*
allocator
);
LeaveCriticalSection
(
&
reader
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
reader_SetAllocateForStream
(
IWMSyncReader2
*
iface
,
DWORD
stream_num
,
IWMReaderAllocatorEx
*
allocator
)
...
...
dlls/wmvcore/tests/wmvcore.c
View file @
57afb52d
...
...
@@ -3479,13 +3479,11 @@ static void test_sync_reader_allocator(void)
hr
=
IWMSyncReader2_GetAllocateForOutput
(
reader
,
-
1
,
&
allocator
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
0
,
&
allocator
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IWMSyncReader2_GetAllocateForOutput
(
reader
,
0
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
1
,
NULL
);
todo_wine
...
...
@@ -3499,9 +3497,7 @@ static void test_sync_reader_allocator(void)
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForOutput
(
reader
,
0
,
&
allocator
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
1
,
&
allocator
);
...
...
@@ -3516,9 +3512,7 @@ static void test_sync_reader_allocator(void)
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForOutput
(
reader
,
0
,
&
allocator
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
2
,
&
allocator
);
...
...
@@ -3537,9 +3531,7 @@ static void test_sync_reader_allocator(void)
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForOutput
(
reader
,
0
,
&
allocator
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
1
,
&
allocator
);
...
...
@@ -3553,9 +3545,7 @@ static void test_sync_reader_allocator(void)
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForOutput
(
reader
,
1
,
&
allocator
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
1
,
&
allocator
);
...
...
@@ -3564,18 +3554,14 @@ static void test_sync_reader_allocator(void)
todo_wine
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
hr
=
IWMSyncReader2_GetAllocateForOutput
(
reader
,
0
,
&
allocator
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
allocator
==
&
callback
.
IWMReaderAllocatorEx_iface
,
"Got allocator %p.
\n
"
,
allocator
);
hr
=
IWMSyncReader2_SetAllocateForOutput
(
reader
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForOutput
(
reader
,
0
,
&
allocator
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
1
,
&
allocator
);
...
...
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