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
e079edf8
Commit
e079edf8
authored
Mar 22, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Add IMFGetService stub for file-based bytestream.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
12812772
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
4 deletions
+47
-4
main.c
dlls/mfplat/main.c
+46
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+1
-3
No files found.
dlls/mfplat/main.c
View file @
e079edf8
...
...
@@ -1795,6 +1795,7 @@ typedef struct bytestream
{
struct
attributes
attributes
;
IMFByteStream
IMFByteStream_iface
;
IMFGetService
IMFGetService_iface
;
IMFAsyncCallback
read_callback
;
IMFAsyncCallback
write_callback
;
IStream
*
stream
;
...
...
@@ -1809,6 +1810,11 @@ static inline mfbytestream *impl_from_IMFByteStream(IMFByteStream *iface)
return
CONTAINING_RECORD
(
iface
,
mfbytestream
,
IMFByteStream_iface
);
}
static
struct
bytestream
*
impl_bytestream_from_IMFGetService
(
IMFGetService
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
bytestream
,
IMFGetService_iface
);
}
static
struct
bytestream
*
impl_from_read_callback_IMFAsyncCallback
(
IMFAsyncCallback
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
bytestream
,
read_callback
);
...
...
@@ -2013,9 +2019,13 @@ static HRESULT WINAPI bytestream_QueryInterface(IMFByteStream *iface, REFIID rii
{
*
out
=
&
stream
->
attributes
.
IMFAttributes_iface
;
}
else
if
(
stream
->
IMFGetService_iface
.
lpVtbl
&&
IsEqualIID
(
riid
,
&
IID_IMFGetService
))
{
*
out
=
&
stream
->
IMFGetService_iface
;
}
else
{
FIXME
(
"(%s, %p)
\n
"
,
debugstr_guid
(
riid
),
out
);
WARN
(
"Unsupported %s.
\n
"
,
debugstr_guid
(
riid
)
);
*
out
=
NULL
;
return
E_NOINTERFACE
;
}
...
...
@@ -2621,6 +2631,40 @@ static const IMFAsyncCallbackVtbl bytestream_file_write_callback_vtbl =
bytestream_file_write_callback_Invoke
,
};
static
HRESULT
WINAPI
bytestream_file_getservice_QueryInterface
(
IMFGetService
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
bytestream
*
stream
=
impl_bytestream_from_IMFGetService
(
iface
);
return
IMFByteStream_QueryInterface
(
&
stream
->
IMFByteStream_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
bytestream_file_getservice_AddRef
(
IMFGetService
*
iface
)
{
struct
bytestream
*
stream
=
impl_bytestream_from_IMFGetService
(
iface
);
return
IMFByteStream_AddRef
(
&
stream
->
IMFByteStream_iface
);
}
static
ULONG
WINAPI
bytestream_file_getservice_Release
(
IMFGetService
*
iface
)
{
struct
bytestream
*
stream
=
impl_bytestream_from_IMFGetService
(
iface
);
return
IMFByteStream_Release
(
&
stream
->
IMFByteStream_iface
);
}
static
HRESULT
WINAPI
bytestream_file_getservice_GetService
(
IMFGetService
*
iface
,
REFGUID
service
,
REFIID
riid
,
void
**
obj
)
{
FIXME
(
"%p, %s, %s, %p.
\n
"
,
iface
,
debugstr_guid
(
service
),
debugstr_guid
(
riid
),
obj
);
return
E_NOTIMPL
;
}
static
const
IMFGetServiceVtbl
bytestream_file_getservice_vtbl
=
{
bytestream_file_getservice_QueryInterface
,
bytestream_file_getservice_AddRef
,
bytestream_file_getservice_Release
,
bytestream_file_getservice_GetService
,
};
/***********************************************************************
* MFCreateFile (mfplat.@)
*/
...
...
@@ -2696,6 +2740,7 @@ HRESULT WINAPI MFCreateFile(MF_FILE_ACCESSMODE accessmode, MF_FILE_OPENMODE open
}
object
->
IMFByteStream_iface
.
lpVtbl
=
&
mfbytestream_vtbl
;
object
->
attributes
.
IMFAttributes_iface
.
lpVtbl
=
&
mfbytestream_attributes_vtbl
;
object
->
IMFGetService_iface
.
lpVtbl
=
&
bytestream_file_getservice_vtbl
;
object
->
read_callback
.
lpVtbl
=
&
bytestream_file_read_callback_vtbl
;
object
->
write_callback
.
lpVtbl
=
&
bytestream_file_write_callback_vtbl
;
InitializeCriticalSection
(
&
object
->
cs
);
...
...
dlls/mfplat/tests/mfplat.c
View file @
e079edf8
...
...
@@ -1146,10 +1146,8 @@ static void test_file_stream(void)
ok
(
hr
==
E_NOINTERFACE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFByteStream_QueryInterface
(
bytestream
,
&
IID_IMFGetService
,
(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to get interface pointer, hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
IUnknown_Release
(
unk
);
hr
=
IMFByteStream_GetCapabilities
(
bytestream
,
&
caps
);
ok
(
hr
==
S_OK
,
"Failed to get stream capabilities, hr %#x.
\n
"
,
hr
);
...
...
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