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
496a7035
Commit
496a7035
authored
Jun 04, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Implement GetCurrentSource().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fae575ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
Makefile.in
dlls/mfmediaengine/Makefile.in
+1
-1
main.c
dlls/mfmediaengine/main.c
+22
-2
No files found.
dlls/mfmediaengine/Makefile.in
View file @
496a7035
MODULE
=
mfmediaengine.dll
IMPORTLIB
=
mfmediaengine
IMPORTS
=
mfplat mf mfuuid uuid
IMPORTS
=
oleaut32
mfplat mf mfuuid uuid
EXTRADLLFLAGS
=
-mno-cygwin
...
...
dlls/mfmediaengine/main.c
View file @
496a7035
...
...
@@ -88,6 +88,7 @@ struct media_engine
HRESULT
extended_code
;
IMFMediaSession
*
session
;
IMFSourceResolver
*
resolver
;
BSTR
current_source
;
CRITICAL_SECTION
cs
;
};
...
...
@@ -499,6 +500,7 @@ static void free_media_engine(struct media_engine *engine)
IMFAttributes_Release
(
engine
->
attributes
);
if
(
engine
->
resolver
)
IMFSourceResolver_Release
(
engine
->
resolver
);
SysFreeString
(
engine
->
current_source
);
DeleteCriticalSection
(
&
engine
->
cs
);
heap_free
(
engine
);
}
...
...
@@ -577,6 +579,11 @@ static HRESULT WINAPI media_engine_SetSource(IMFMediaEngine *iface, BSTR url)
EnterCriticalSection
(
&
engine
->
cs
);
SysFreeString
(
engine
->
current_source
);
engine
->
current_source
=
NULL
;
if
(
url
)
engine
->
current_source
=
SysAllocString
(
url
);
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS
,
0
,
0
);
if
(
url
)
...
...
@@ -602,9 +609,22 @@ static HRESULT WINAPI media_engine_SetSource(IMFMediaEngine *iface, BSTR url)
static
HRESULT
WINAPI
media_engine_GetCurrentSource
(
IMFMediaEngine
*
iface
,
BSTR
*
url
)
{
FIXME
(
"(%p, %p): stub.
\n
"
,
iface
,
url
);
struct
media_engine
*
engine
=
impl_from_IMFMediaEngine
(
iface
);
HRESULT
hr
=
S_OK
;
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
url
);
*
url
=
NULL
;
EnterCriticalSection
(
&
engine
->
cs
);
if
(
engine
->
current_source
)
{
if
(
!
(
*
url
=
SysAllocString
(
engine
->
current_source
)))
hr
=
E_OUTOFMEMORY
;
}
LeaveCriticalSection
(
&
engine
->
cs
);
return
hr
;
}
static
USHORT
WINAPI
media_engine_GetNetworkState
(
IMFMediaEngine
*
iface
)
...
...
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