Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
83f59518
Commit
83f59518
authored
May 08, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Add IMFGetService stub for media session.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
37a7b651
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
session.c
dlls/mf/session.c
+46
-0
mf.c
dlls/mf/tests/mf.c
+5
-0
No files found.
dlls/mf/session.c
View file @
83f59518
...
...
@@ -36,6 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
struct
media_session
{
IMFMediaSession
IMFMediaSession_iface
;
IMFGetService
IMFGetService_iface
;
LONG
refcount
;
IMFMediaEventQueue
*
event_queue
;
};
...
...
@@ -92,6 +93,11 @@ static inline struct media_session *impl_from_IMFMediaSession(IMFMediaSession *i
return
CONTAINING_RECORD
(
iface
,
struct
media_session
,
IMFMediaSession_iface
);
}
static
struct
media_session
*
impl_from_IMFGetService
(
IMFGetService
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
media_session
,
IMFGetService_iface
);
}
static
struct
presentation_clock
*
impl_from_IMFPresentationClock
(
IMFPresentationClock
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
presentation_clock
,
IMFPresentationClock_iface
);
...
...
@@ -136,6 +142,12 @@ static HRESULT WINAPI mfsession_QueryInterface(IMFMediaSession *iface, REFIID ri
IMFMediaSession_AddRef
(
iface
);
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFGetService
))
{
*
out
=
&
session
->
IMFGetService_iface
;
IMFMediaSession_AddRef
(
iface
);
return
S_OK
;
}
WARN
(
"Unsupported %s.
\n
"
,
debugstr_guid
(
riid
));
*
out
=
NULL
;
...
...
@@ -301,6 +313,39 @@ static const IMFMediaSessionVtbl mfmediasessionvtbl =
mfsession_GetFullTopology
,
};
static
HRESULT
WINAPI
session_get_service_QueryInterface
(
IMFGetService
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
media_session
*
session
=
impl_from_IMFGetService
(
iface
);
return
IMFMediaSession_QueryInterface
(
&
session
->
IMFMediaSession_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
session_get_service_AddRef
(
IMFGetService
*
iface
)
{
struct
media_session
*
session
=
impl_from_IMFGetService
(
iface
);
return
IMFMediaSession_AddRef
(
&
session
->
IMFMediaSession_iface
);
}
static
ULONG
WINAPI
session_get_service_Release
(
IMFGetService
*
iface
)
{
struct
media_session
*
session
=
impl_from_IMFGetService
(
iface
);
return
IMFMediaSession_Release
(
&
session
->
IMFMediaSession_iface
);
}
static
HRESULT
WINAPI
session_get_service_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
session_get_service_vtbl
=
{
session_get_service_QueryInterface
,
session_get_service_AddRef
,
session_get_service_Release
,
session_get_service_GetService
,
};
/***********************************************************************
* MFCreateMediaSession (mf.@)
*/
...
...
@@ -319,6 +364,7 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses
return
E_OUTOFMEMORY
;
object
->
IMFMediaSession_iface
.
lpVtbl
=
&
mfmediasessionvtbl
;
object
->
IMFGetService_iface
.
lpVtbl
=
&
session_get_service_vtbl
;
object
->
refcount
=
1
;
if
(
FAILED
(
hr
=
MFCreateEventQueue
(
&
object
->
event_queue
)))
{
...
...
dlls/mf/tests/mf.c
View file @
83f59518
...
...
@@ -944,6 +944,7 @@ todo_wine
static
void
test_media_session
(
void
)
{
IMFMediaSession
*
session
;
IMFGetService
*
gs
;
IUnknown
*
unk
;
HRESULT
hr
;
...
...
@@ -956,6 +957,10 @@ static void test_media_session(void)
hr
=
IMFMediaSession_QueryInterface
(
session
,
&
IID_IMFAttributes
,
(
void
**
)
&
unk
);
ok
(
hr
==
E_NOINTERFACE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaSession_QueryInterface
(
session
,
&
IID_IMFGetService
,
(
void
**
)
&
gs
);
ok
(
hr
==
S_OK
,
"Failed to get interface, hr %#x.
\n
"
,
hr
);
IMFGetService_Release
(
gs
);
test_session_events
(
session
);
IMFMediaSession_Release
(
session
);
...
...
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