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
342d7797
Commit
342d7797
authored
Apr 07, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplay: Implement GetURL().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ebe55863
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
Makefile.in
dlls/mfplay/Makefile.in
+1
-1
player.c
dlls/mfplay/player.c
+21
-2
No files found.
dlls/mfplay/Makefile.in
View file @
342d7797
MODULE
=
mfplay.dll
IMPORTLIB
=
mfplay
IMPORTS
=
mfplat mf user32 uuid mfuuid
IMPORTS
=
mfplat mf
ole32
user32 uuid mfuuid
EXTRADLLFLAGS
=
-mno-cygwin
-Wb
,--prefer-native
...
...
dlls/mfplay/player.c
View file @
342d7797
...
...
@@ -24,6 +24,7 @@
#include "winbase.h"
#include "mfapi.h"
#include "mfplay.h"
#include "mferror.h"
#include "wine/debug.h"
#include "wine/heap.h"
...
...
@@ -55,6 +56,7 @@ struct media_item
IMFMediaSource
*
source
;
IMFPresentationDescriptor
*
pd
;
DWORD_PTR
user_data
;
WCHAR
*
url
;
};
struct
media_player
...
...
@@ -308,6 +310,7 @@ static ULONG WINAPI media_item_Release(IMFPMediaItem *iface)
IMFMediaSource_Release
(
item
->
source
);
if
(
item
->
pd
)
IMFPresentationDescriptor_Release
(
item
->
pd
);
free
(
item
->
url
);
heap_free
(
item
);
}
...
...
@@ -329,9 +332,19 @@ static HRESULT WINAPI media_item_GetMediaPlayer(IMFPMediaItem *iface,
static
HRESULT
WINAPI
media_item_GetURL
(
IMFPMediaItem
*
iface
,
LPWSTR
*
url
)
{
FIXME
(
"%p, %p.
\n
"
,
iface
,
url
);
struct
media_item
*
item
=
impl_from_IMFPMediaItem
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
url
);
if
(
!
item
->
url
)
return
MF_E_NOT_FOUND
;
if
(
!
(
*
url
=
CoTaskMemAlloc
((
wcslen
(
item
->
url
)
+
1
)
*
sizeof
(
*
item
->
url
))))
return
E_OUTOFMEMORY
;
wcscpy
(
*
url
,
item
->
url
);
return
S_OK
;
}
static
HRESULT
WINAPI
media_item_GetObject
(
IMFPMediaItem
*
iface
,
IUnknown
**
obj
)
...
...
@@ -769,6 +782,12 @@ static HRESULT WINAPI media_player_CreateMediaItemFromURL(IMFPMediaPlayer *iface
if
(
FAILED
(
hr
=
create_media_item
(
iface
,
user_data
,
&
item
)))
return
hr
;
if
(
url
&&
!
(
item
->
url
=
wcsdup
(
url
)))
{
IMFPMediaItem_Release
(
&
item
->
IMFPMediaItem_iface
);
return
E_OUTOFMEMORY
;
}
if
(
sync
)
{
*
ret
=
NULL
;
...
...
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