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
9446458f
Commit
9446458f
authored
Jan 29, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/session: Add a stub for IMFTopologyNodeAttributeEditor.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
21ae610d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
0 deletions
+66
-0
session.c
dlls/mf/session.c
+57
-0
mf.c
dlls/mf/tests/mf.c
+9
-0
No files found.
dlls/mf/session.c
View file @
9446458f
...
...
@@ -213,6 +213,7 @@ struct media_session
IMFGetService
IMFGetService_iface
;
IMFRateSupport
IMFRateSupport_iface
;
IMFRateControl
IMFRateControl_iface
;
IMFTopologyNodeAttributeEditor
IMFTopologyNodeAttributeEditor_iface
;
IMFAsyncCallback
commands_callback
;
IMFAsyncCallback
events_callback
;
IMFAsyncCallback
sink_finalizer_callback
;
...
...
@@ -362,6 +363,11 @@ static struct media_session *impl_session_from_IMFRateControl(IMFRateControl *if
return
CONTAINING_RECORD
(
iface
,
struct
media_session
,
IMFRateControl_iface
);
}
static
struct
media_session
*
impl_session_from_IMFTopologyNodeAttributeEditor
(
IMFTopologyNodeAttributeEditor
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
media_session
,
IMFTopologyNodeAttributeEditor_iface
);
}
static
struct
session_op
*
impl_op_from_IUnknown
(
IUnknown
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
session_op
,
IUnknown_iface
);
...
...
@@ -1999,6 +2005,10 @@ static HRESULT WINAPI session_get_service_GetService(IMFGetService *iface, REFGU
{
return
IMFLocalMFTRegistration_QueryInterface
(
&
local_mft_registration
,
riid
,
obj
);
}
else
if
(
IsEqualGUID
(
service
,
&
MF_TOPONODE_ATTRIBUTE_EDITOR_SERVICE
))
{
*
obj
=
&
session
->
IMFTopologyNodeAttributeEditor_iface
;
}
else
if
(
IsEqualGUID
(
service
,
&
MR_VIDEO_RENDER_SERVICE
))
{
IMFStreamSink
*
stream_sink
;
...
...
@@ -3566,6 +3576,52 @@ static const IMFRateControlVtbl session_rate_control_vtbl =
session_rate_control_GetRate
,
};
static
HRESULT
WINAPI
node_attribute_editor_QueryInterface
(
IMFTopologyNodeAttributeEditor
*
iface
,
REFIID
riid
,
void
**
obj
)
{
TRACE
(
"%p, %s, %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualIID
(
riid
,
&
IID_IMFTopologyNodeAttributeEditor
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
obj
=
iface
;
IMFTopologyNodeAttributeEditor_AddRef
(
iface
);
return
S_OK
;
}
WARN
(
"Unsupported interface %s.
\n
"
,
debugstr_guid
(
riid
));
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
node_attribute_editor_AddRef
(
IMFTopologyNodeAttributeEditor
*
iface
)
{
struct
media_session
*
session
=
impl_session_from_IMFTopologyNodeAttributeEditor
(
iface
);
return
IMFMediaSession_AddRef
(
&
session
->
IMFMediaSession_iface
);
}
static
ULONG
WINAPI
node_attribute_editor_Release
(
IMFTopologyNodeAttributeEditor
*
iface
)
{
struct
media_session
*
session
=
impl_session_from_IMFTopologyNodeAttributeEditor
(
iface
);
return
IMFMediaSession_Release
(
&
session
->
IMFMediaSession_iface
);
}
static
HRESULT
WINAPI
node_attribute_editor_UpdateNodeAttributes
(
IMFTopologyNodeAttributeEditor
*
iface
,
TOPOID
id
,
DWORD
count
,
MFTOPONODE_ATTRIBUTE_UPDATE
*
updates
)
{
FIXME
(
"%p, %s, %u, %p.
\n
"
,
iface
,
wine_dbgstr_longlong
(
id
),
count
,
updates
);
return
E_NOTIMPL
;
}
static
const
IMFTopologyNodeAttributeEditorVtbl
node_attribute_editor_vtbl
=
{
node_attribute_editor_QueryInterface
,
node_attribute_editor_AddRef
,
node_attribute_editor_Release
,
node_attribute_editor_UpdateNodeAttributes
,
};
/***********************************************************************
* MFCreateMediaSession (mf.@)
*/
...
...
@@ -3585,6 +3641,7 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses
object
->
IMFGetService_iface
.
lpVtbl
=
&
session_get_service_vtbl
;
object
->
IMFRateSupport_iface
.
lpVtbl
=
&
session_rate_support_vtbl
;
object
->
IMFRateControl_iface
.
lpVtbl
=
&
session_rate_control_vtbl
;
object
->
IMFTopologyNodeAttributeEditor_iface
.
lpVtbl
=
&
node_attribute_editor_vtbl
;
object
->
commands_callback
.
lpVtbl
=
&
session_commands_callback_vtbl
;
object
->
events_callback
.
lpVtbl
=
&
session_events_callback_vtbl
;
object
->
sink_finalizer_callback
.
lpVtbl
=
&
session_sink_finalizer_callback_vtbl
;
...
...
dlls/mf/tests/mf.c
View file @
9446458f
...
...
@@ -1176,6 +1176,15 @@ static void test_media_session(void)
check_interface
(
session
,
&
IID_IMFGetService
,
TRUE
);
check_interface
(
session
,
&
IID_IMFAttributes
,
FALSE
);
check_interface
(
session
,
&
IID_IMFTopologyNodeAttributeEditor
,
FALSE
);
hr
=
MFGetService
((
IUnknown
*
)
session
,
&
MF_TOPONODE_ATTRIBUTE_EDITOR_SERVICE
,
&
IID_IMFTopologyNodeAttributeEditor
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
check_interface
(
unk
,
&
IID_IMFMediaSession
,
FALSE
);
IUnknown_Release
(
unk
);
hr
=
MFGetService
((
IUnknown
*
)
session
,
&
MF_RATE_CONTROL_SERVICE
,
&
IID_IMFRateSupport
,
(
void
**
)
&
rate_support
);
ok
(
hr
==
S_OK
,
"Failed to get rate support interface, 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