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
4bbb7b66
Commit
4bbb7b66
authored
Jun 02, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Duplicate configuration attributes.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
13aafb43
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
Makefile.in
dlls/mfmediaengine/Makefile.in
+1
-1
main.c
dlls/mfmediaengine/main.c
+15
-10
No files found.
dlls/mfmediaengine/Makefile.in
View file @
4bbb7b66
MODULE
=
mfmediaengine.dll
IMPORTLIB
=
mfmediaengine
IMPORTS
=
mf mfuuid uuid
IMPORTS
=
mf
plat mf
mfuuid uuid
EXTRADLLFLAGS
=
-mno-cygwin
...
...
dlls/mfmediaengine/main.c
View file @
4bbb7b66
...
...
@@ -23,6 +23,7 @@
#include "windef.h"
#include "winbase.h"
#include "mfapi.h"
#include "mfmediaengine.h"
#include "mferror.h"
#include "dxgi.h"
...
...
@@ -72,9 +73,7 @@ struct media_engine
IMFAsyncCallback
session_events
;
LONG
refcount
;
IMFMediaEngineNotify
*
callback
;
UINT64
playback_hwnd
;
DXGI_FORMAT
output_format
;
IMFDXGIDeviceManager
*
dxgi_manager
;
IMFAttributes
*
attributes
;
enum
media_engine_mode
mode
;
unsigned
int
flags
;
double
playback_rate
;
...
...
@@ -192,10 +191,10 @@ static void free_media_engine(struct media_engine *engine)
{
if
(
engine
->
callback
)
IMFMediaEngineNotify_Release
(
engine
->
callback
);
if
(
engine
->
dxgi_manager
)
IMFDXGIDeviceManager_Release
(
engine
->
dxgi_manager
);
if
(
engine
->
session
)
IMFMediaSession_Release
(
engine
->
session
);
if
(
engine
->
attributes
)
IMFAttributes_Release
(
engine
->
attributes
);
DeleteCriticalSection
(
&
engine
->
cs
);
heap_free
(
engine
);
}
...
...
@@ -750,6 +749,8 @@ static ULONG WINAPI media_engine_factory_Release(IMFMediaEngineClassFactory *ifa
static
HRESULT
init_media_engine
(
DWORD
flags
,
IMFAttributes
*
attributes
,
struct
media_engine
*
engine
)
{
DXGI_FORMAT
output_format
;
UINT64
playback_hwnd
;
HRESULT
hr
;
engine
->
IMFMediaEngine_iface
.
lpVtbl
=
&
media_engine_vtbl
;
...
...
@@ -772,11 +773,15 @@ static HRESULT init_media_engine(DWORD flags, IMFAttributes *attributes, struct
if
(
FAILED
(
hr
=
IMFMediaSession_BeginGetEvent
(
engine
->
session
,
&
engine
->
session_events
,
NULL
)))
return
hr
;
IMFAttributes_GetUINT64
(
attributes
,
&
MF_MEDIA_ENGINE_PLAYBACK_HWND
,
&
engine
->
playback_hwnd
);
IMFAttributes_GetUnknown
(
attributes
,
&
MF_MEDIA_ENGINE_DXGI_MANAGER
,
&
IID_IMFDXGIDeviceManager
,
(
void
**
)
&
engine
->
dxgi_manager
);
hr
=
IMFAttributes_GetUINT32
(
attributes
,
&
MF_MEDIA_ENGINE_VIDEO_OUTPUT_FORMAT
,
&
engine
->
output_format
);
if
(
engine
->
playback_hwnd
)
/* FIXME: handle MF_MEDIA_ENGINE_PLAYBACK_VISUAL */
if
(
FAILED
(
hr
=
MFCreateAttributes
(
&
engine
->
attributes
,
0
)))
return
hr
;
if
(
FAILED
(
hr
=
IMFAttributes_CopyAllItems
(
attributes
,
engine
->
attributes
)))
return
hr
;
IMFAttributes_GetUINT64
(
attributes
,
&
MF_MEDIA_ENGINE_PLAYBACK_HWND
,
&
playback_hwnd
);
hr
=
IMFAttributes_GetUINT32
(
attributes
,
&
MF_MEDIA_ENGINE_VIDEO_OUTPUT_FORMAT
,
&
output_format
);
if
(
playback_hwnd
)
/* FIXME: handle MF_MEDIA_ENGINE_PLAYBACK_VISUAL */
engine
->
mode
=
MEDIA_ENGINE_RENDERING_MODE
;
else
{
...
...
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