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
76a347a5
Commit
76a347a5
authored
Sep 24, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Create topology loader of session creation.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
000a552d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
session.c
dlls/mf/session.c
+20
-0
mf.c
dlls/mf/tests/mf.c
+14
-0
No files found.
dlls/mf/session.c
View file @
76a347a5
...
...
@@ -69,6 +69,7 @@ struct media_session
IMFMediaEventQueue
*
event_queue
;
IMFPresentationClock
*
clock
;
IMFRateControl
*
clock_rate_control
;
IMFTopoLoader
*
topo_loader
;
struct
list
topologies
;
enum
session_state
state
;
CRITICAL_SECTION
cs
;
...
...
@@ -329,6 +330,8 @@ static ULONG WINAPI mfsession_Release(IMFMediaSession *iface)
IMFPresentationClock_Release
(
session
->
clock
);
if
(
session
->
clock_rate_control
)
IMFRateControl_Release
(
session
->
clock_rate_control
);
if
(
session
->
topo_loader
)
IMFTopoLoader_Release
(
session
->
topo_loader
);
DeleteCriticalSection
(
&
session
->
cs
);
heap_free
(
session
);
}
...
...
@@ -791,6 +794,23 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses
goto
failed
;
}
if
(
config
)
{
GUID
clsid
;
if
(
SUCCEEDED
(
IMFAttributes_GetGUID
(
config
,
&
MF_SESSION_TOPOLOADER
,
&
clsid
)))
{
if
(
FAILED
(
hr
=
CoCreateInstance
(
&
clsid
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMFTopoLoader
,
(
void
**
)
&
object
->
topo_loader
)))
{
WARN
(
"Failed to create custom topology loader, hr %#x.
\n
"
,
hr
);
}
}
}
if
(
!
object
->
topo_loader
&&
FAILED
(
hr
=
MFCreateTopoLoader
(
&
object
->
topo_loader
)))
goto
failed
;
*
session
=
&
object
->
IMFMediaSession_iface
;
return
S_OK
;
...
...
dlls/mf/tests/mf.c
View file @
76a347a5
...
...
@@ -954,6 +954,7 @@ static void test_media_session(void)
IMFRateControl
*
rate_control
,
*
rate_control2
;
MFCLOCK_PROPERTIES
clock_props
;
IMFRateSupport
*
rate_support
;
IMFAttributes
*
attributes
;
IMFMediaSession
*
session
;
IMFGetService
*
gs
;
IMFClock
*
clock
;
...
...
@@ -1043,6 +1044,19 @@ todo_wine
IMFMediaSession_Release
(
session
);
/* Custom topology loader, GUID is not registered. */
hr
=
MFCreateAttributes
(
&
attributes
,
1
);
ok
(
hr
==
S_OK
,
"Failed to create attributes, hr %#x.
\n
"
,
hr
);
hr
=
IMFAttributes_SetGUID
(
attributes
,
&
MF_SESSION_TOPOLOADER
,
&
MF_SESSION_TOPOLOADER
);
ok
(
hr
==
S_OK
,
"Failed to set attribute, hr %#x.
\n
"
,
hr
);
hr
=
MFCreateMediaSession
(
attributes
,
&
session
);
ok
(
hr
==
S_OK
,
"Failed to create media session, hr %#x.
\n
"
,
hr
);
IMFMediaSession_Release
(
session
);
IMFAttributes_Release
(
attributes
);
hr
=
MFShutdown
();
ok
(
hr
==
S_OK
,
"Shutdown failure, 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