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
2ba08dc0
Commit
2ba08dc0
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_GetAllocateForStream.
parent
5aa60f77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
18 deletions
+22
-18
wm_reader.c
dlls/winegstreamer/wm_reader.c
+22
-4
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+0
-14
No files found.
dlls/winegstreamer/wm_reader.c
View file @
2ba08dc0
...
...
@@ -2497,11 +2497,29 @@ static HRESULT WINAPI reader_SetAllocateForStream(IWMSyncReader2 *iface, DWORD s
return
S_OK
;
}
static
HRESULT
WINAPI
reader_GetAllocateForStream
(
IWMSyncReader2
*
iface
,
DWORD
stream_num
,
IWMReaderAllocatorEx
**
allocator
)
static
HRESULT
WINAPI
reader_GetAllocateForStream
(
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
);
if
(
!
allocator
)
return
E_INVALIDARG
;
EnterCriticalSection
(
&
reader
->
cs
);
if
(
!
(
stream
=
wm_reader_get_stream_by_stream_number
(
reader
,
stream_number
)))
{
LeaveCriticalSection
(
&
reader
->
cs
);
return
E_INVALIDARG
;
}
if
((
*
allocator
=
stream
->
stream_allocator
))
IWMReaderAllocatorEx_AddRef
(
*
allocator
);
LeaveCriticalSection
(
&
reader
->
cs
);
return
S_OK
;
}
static
const
IWMSyncReader2Vtbl
reader_vtbl
=
...
...
dlls/wmvcore/tests/wmvcore.c
View file @
2ba08dc0
...
...
@@ -3481,12 +3481,10 @@ static void test_sync_reader_allocator(void)
hr
=
IWMSyncReader2_GetAllocateForOutput
(
reader
,
-
1
,
&
allocator
);
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
);
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
1
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IWMSyncReader2_SetAllocateForOutput
(
reader
,
-
1
,
&
callback
.
IWMReaderAllocatorEx_iface
);
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#lx.
\n
"
,
hr
);
...
...
@@ -3500,9 +3498,7 @@ static void test_sync_reader_allocator(void)
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
1
,
&
allocator
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
...
...
@@ -3514,14 +3510,10 @@ static void test_sync_reader_allocator(void)
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
2
,
&
allocator
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
1
,
&
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_SetAllocateForStream
(
reader
,
1
,
NULL
);
...
...
@@ -3532,9 +3524,7 @@ static void test_sync_reader_allocator(void)
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
1
,
&
allocator
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
...
...
@@ -3546,9 +3536,7 @@ static void test_sync_reader_allocator(void)
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
1
,
&
allocator
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
hr
=
IWMSyncReader2_GetAllocateForOutput
(
reader
,
0
,
&
allocator
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
...
...
@@ -3562,9 +3550,7 @@ static void test_sync_reader_allocator(void)
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
allocator
);
allocator
=
(
void
*
)
0xdeadbeef
;
hr
=
IWMSyncReader2_GetAllocateForStream
(
reader
,
1
,
&
allocator
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
allocator
,
"Got allocator %p.
\n
"
,
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