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
c64f919b
Commit
c64f919b
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 quality manager on session creation.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
76a347a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
session.c
dlls/mf/session.c
+22
-0
mf.c
dlls/mf/tests/mf.c
+8
-0
No files found.
dlls/mf/session.c
View file @
c64f919b
...
...
@@ -70,6 +70,7 @@ struct media_session
IMFPresentationClock
*
clock
;
IMFRateControl
*
clock_rate_control
;
IMFTopoLoader
*
topo_loader
;
IMFQualityManager
*
quality_manager
;
struct
list
topologies
;
enum
session_state
state
;
CRITICAL_SECTION
cs
;
...
...
@@ -332,6 +333,8 @@ static ULONG WINAPI mfsession_Release(IMFMediaSession *iface)
IMFRateControl_Release
(
session
->
clock_rate_control
);
if
(
session
->
topo_loader
)
IMFTopoLoader_Release
(
session
->
topo_loader
);
if
(
session
->
quality_manager
)
IMFQualityManager_Release
(
session
->
quality_manager
);
DeleteCriticalSection
(
&
session
->
cs
);
heap_free
(
session
);
}
...
...
@@ -761,6 +764,7 @@ static const IMFRateControlVtbl session_rate_control_vtbl =
*/
HRESULT
WINAPI
MFCreateMediaSession
(
IMFAttributes
*
config
,
IMFMediaSession
**
session
)
{
BOOL
without_quality_manager
=
FALSE
;
struct
media_session
*
object
;
HRESULT
hr
;
...
...
@@ -806,11 +810,29 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses
WARN
(
"Failed to create custom topology loader, hr %#x.
\n
"
,
hr
);
}
}
if
(
SUCCEEDED
(
IMFAttributes_GetGUID
(
config
,
&
MF_SESSION_QUALITY_MANAGER
,
&
clsid
)))
{
if
(
!
(
without_quality_manager
=
IsEqualGUID
(
&
clsid
,
&
GUID_NULL
)))
{
if
(
FAILED
(
hr
=
CoCreateInstance
(
&
clsid
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMFQualityManager
,
(
void
**
)
&
object
->
quality_manager
)))
{
WARN
(
"Failed to create custom quality manager, hr %#x.
\n
"
,
hr
);
}
}
}
}
if
(
!
object
->
topo_loader
&&
FAILED
(
hr
=
MFCreateTopoLoader
(
&
object
->
topo_loader
)))
goto
failed
;
if
(
!
object
->
quality_manager
&&
!
without_quality_manager
&&
FAILED
(
hr
=
MFCreateStandardQualityManager
(
&
object
->
quality_manager
)))
{
goto
failed
;
}
*
session
=
&
object
->
IMFMediaSession_iface
;
return
S_OK
;
...
...
dlls/mf/tests/mf.c
View file @
c64f919b
...
...
@@ -1055,6 +1055,14 @@ todo_wine
ok
(
hr
==
S_OK
,
"Failed to create media session, hr %#x.
\n
"
,
hr
);
IMFMediaSession_Release
(
session
);
/* Disabled quality manager. */
hr
=
IMFAttributes_SetGUID
(
attributes
,
&
MF_SESSION_QUALITY_MANAGER
,
&
GUID_NULL
);
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
();
...
...
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