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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
3 deletions
+46
-3
main.c
dlls/mfplat/main.c
+46
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+0
-2
No files found.
dlls/mfplat/main.c
View file @
e079edf8
...
@@ -1795,6 +1795,7 @@ typedef struct bytestream
...
@@ -1795,6 +1795,7 @@ typedef struct bytestream
{
{
struct
attributes
attributes
;
struct
attributes
attributes
;
IMFByteStream
IMFByteStream_iface
;
IMFByteStream
IMFByteStream_iface
;
IMFGetService
IMFGetService_iface
;
IMFAsyncCallback
read_callback
;
IMFAsyncCallback
read_callback
;
IMFAsyncCallback
write_callback
;
IMFAsyncCallback
write_callback
;
IStream
*
stream
;
IStream
*
stream
;
...
@@ -1809,6 +1810,11 @@ static inline mfbytestream *impl_from_IMFByteStream(IMFByteStream *iface)
...
@@ -1809,6 +1810,11 @@ static inline mfbytestream *impl_from_IMFByteStream(IMFByteStream *iface)
return
CONTAINING_RECORD
(
iface
,
mfbytestream
,
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
)
static
struct
bytestream
*
impl_from_read_callback_IMFAsyncCallback
(
IMFAsyncCallback
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
struct
bytestream
,
read_callback
);
return
CONTAINING_RECORD
(
iface
,
struct
bytestream
,
read_callback
);
...
@@ -2013,9 +2019,13 @@ static HRESULT WINAPI bytestream_QueryInterface(IMFByteStream *iface, REFIID rii
...
@@ -2013,9 +2019,13 @@ static HRESULT WINAPI bytestream_QueryInterface(IMFByteStream *iface, REFIID rii
{
{
*
out
=
&
stream
->
attributes
.
IMFAttributes_iface
;
*
out
=
&
stream
->
attributes
.
IMFAttributes_iface
;
}
}
else
if
(
stream
->
IMFGetService_iface
.
lpVtbl
&&
IsEqualIID
(
riid
,
&
IID_IMFGetService
))
{
*
out
=
&
stream
->
IMFGetService_iface
;
}
else
else
{
{
FIXME
(
"(%s, %p)
\n
"
,
debugstr_guid
(
riid
),
out
);
WARN
(
"Unsupported %s.
\n
"
,
debugstr_guid
(
riid
)
);
*
out
=
NULL
;
*
out
=
NULL
;
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
}
}
...
@@ -2621,6 +2631,40 @@ static const IMFAsyncCallbackVtbl bytestream_file_write_callback_vtbl =
...
@@ -2621,6 +2631,40 @@ static const IMFAsyncCallbackVtbl bytestream_file_write_callback_vtbl =
bytestream_file_write_callback_Invoke
,
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.@)
* MFCreateFile (mfplat.@)
*/
*/
...
@@ -2696,6 +2740,7 @@ HRESULT WINAPI MFCreateFile(MF_FILE_ACCESSMODE accessmode, MF_FILE_OPENMODE open
...
@@ -2696,6 +2740,7 @@ HRESULT WINAPI MFCreateFile(MF_FILE_ACCESSMODE accessmode, MF_FILE_OPENMODE open
}
}
object
->
IMFByteStream_iface
.
lpVtbl
=
&
mfbytestream_vtbl
;
object
->
IMFByteStream_iface
.
lpVtbl
=
&
mfbytestream_vtbl
;
object
->
attributes
.
IMFAttributes_iface
.
lpVtbl
=
&
mfbytestream_attributes_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
->
read_callback
.
lpVtbl
=
&
bytestream_file_read_callback_vtbl
;
object
->
write_callback
.
lpVtbl
=
&
bytestream_file_write_callback_vtbl
;
object
->
write_callback
.
lpVtbl
=
&
bytestream_file_write_callback_vtbl
;
InitializeCriticalSection
(
&
object
->
cs
);
InitializeCriticalSection
(
&
object
->
cs
);
...
...
dlls/mfplat/tests/mfplat.c
View file @
e079edf8
...
@@ -1146,9 +1146,7 @@ static void test_file_stream(void)
...
@@ -1146,9 +1146,7 @@ static void test_file_stream(void)
ok
(
hr
==
E_NOINTERFACE
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFByteStream_QueryInterface
(
bytestream
,
&
IID_IMFGetService
,
(
void
**
)
&
unk
);
hr
=
IMFByteStream_QueryInterface
(
bytestream
,
&
IID_IMFGetService
,
(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to get interface pointer, hr %#x.
\n
"
,
hr
);
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
);
hr
=
IMFByteStream_GetCapabilities
(
bytestream
,
&
caps
);
...
...
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